MCPcopy
hub / github.com/tortoise/tortoise-orm / Event

Class Event

examples/relations.py:24–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22
23
24class Event(Model):
25 id = fields.IntField(primary_key=True)
26 name = fields.TextField()
27 tournament: fields.ForeignKeyRelation[Tournament] = fields.ForeignKeyField(
28 Tournament, related_name="events"
29 )
30 # class Team does not defined before Event, so we have to use '{app}.{model_class}'
31 participants: fields.ManyToManyRelation["Team"] = fields.ManyToManyField(
32 "models.Team", related_name="events", through="event_team"
33 )
34
35 def __str__(self):
36 return self.name
37
38
39class Address(Model):

Callers 1

runFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…