MCPcopy Create free account
hub / github.com/tortoise/tortoise-orm / Event

Class Event

tests/testmodels.py:102–129  ·  view source on GitHub ↗

Events on the calendar

Source from the content-addressed store, hash-verified

100
101
102class Event(Model):
103 """Events on the calendar"""
104
105 event_id = fields.BigIntField(primary_key=True)
106 #: The name
107 name = fields.TextField()
108 #: What tournaments is a happenin'
109 tournament: fields.ForeignKeyRelation[Tournament] = fields.ForeignKeyField(
110 to="models.Tournament", related_name="events"
111 )
112 reporter: fields.ForeignKeyNullableRelation[Reporter] = fields.ForeignKeyField(
113 to=Reporter, null=True
114 )
115 participants: fields.ManyToManyRelation["Team"] = fields.ManyToManyField(
116 "models.Team",
117 related_name="events",
118 through="event_team",
119 backward_key="idEvent",
120 )
121 modified = fields.DatetimeField(auto_now=True)
122 token = fields.TextField(default=generate_token)
123 alias = fields.IntField(null=True)
124
125 class Meta:
126 ordering = ["name"]
127
128 def __str__(self):
129 return self.name
130
131
132class ModelTestPydanticMetaBackwardRelations1(Model):

Callers 7

test_filteringFunction · 0.90
test_aggregationFunction · 0.90
test_m2mFunction · 0.90
test_fk_unsavedFunction · 0.90
latest_earliest_dataFunction · 0.90
test_relationsFunction · 0.90

Calls

no outgoing calls

Tested by 7

test_filteringFunction · 0.72
test_aggregationFunction · 0.72
test_m2mFunction · 0.72
test_fk_unsavedFunction · 0.72
latest_earliest_dataFunction · 0.72
test_relationsFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…