MCPcopy Create free account
hub / github.com/0010aor/FlashNotes / Card

Class Card

backend/src/flashcards/models.py:24–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22
23
24class Card(SQLModel, table=True):
25 id: uuid.UUID | None = Field(default_factory=uuid.uuid4, primary_key=True)
26 front: str = Field(max_length=3000)
27 back: str = Field(max_length=3000)
28 collection_id: uuid.UUID = Field(foreign_key="collection.id", index=True)
29 collection: Collection = Relationship(back_populates="cards")
30 created_at: datetime = Field(default_factory=lambda: datetime.now(timezone.utc))
31 updated_at: datetime = Field(default_factory=lambda: datetime.now(timezone.utc))
32 practice_cards: list["PracticeCard"] = Relationship(
33 back_populates="card", sa_relationship_kwargs={"cascade": "all, delete"}
34 )
35
36
37class PracticeSession(SQLModel, table=True):

Callers 5

test_cardsFunction · 0.90
multiple_collectionsFunction · 0.90
create_cardsFunction · 0.90
create_collectionFunction · 0.70
create_cardFunction · 0.70

Calls

no outgoing calls

Tested by 2

test_cardsFunction · 0.72
multiple_collectionsFunction · 0.72