mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: init collections
This commit is contained in:
parent
727f17ba7c
commit
e6adbca562
4 changed files with 219 additions and 178 deletions
11
apps/api/src/db/collections_courses.py
Normal file
11
apps/api/src/db/collections_courses.py
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
from typing import Optional
|
||||
from sqlmodel import Field, SQLModel
|
||||
|
||||
|
||||
class CollectionCourse(SQLModel, table=True):
|
||||
id: Optional[int] = Field(default=None, primary_key=True)
|
||||
collection_id: int = Field(default=None, foreign_key="collection.id")
|
||||
course_id: int = Field(default=None, foreign_key="course.id")
|
||||
org_id: int = Field(default=None, foreign_key="organization.id")
|
||||
creation_date: str
|
||||
update_date: str
|
||||
Loading…
Add table
Add a link
Reference in a new issue