mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
wip: add more schemas
This commit is contained in:
parent
732b14866c
commit
b4dcc14749
15 changed files with 319 additions and 8 deletions
26
apps/api/src/rewrite/services/db/organizations.py
Normal file
26
apps/api/src/rewrite/services/db/organizations.py
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
from typing import Optional
|
||||
from sqlmodel import Field, SQLModel
|
||||
|
||||
|
||||
class OrganizationBase(SQLModel):
|
||||
name: str
|
||||
description: Optional[str] = ""
|
||||
slug: str
|
||||
email: str
|
||||
logo_image: Optional[str] = ""
|
||||
|
||||
|
||||
class Organization(OrganizationBase, table=True):
|
||||
id: Optional[int] = Field(default=None, primary_key=True)
|
||||
org_uuid: str
|
||||
creation_date: str
|
||||
update_date: str
|
||||
|
||||
|
||||
class OrganizationCreate(OrganizationBase):
|
||||
pass
|
||||
|
||||
|
||||
class OrganizationRead(OrganizationBase):
|
||||
id: int
|
||||
org_uuid: str
|
||||
Loading…
Add table
Add a link
Reference in a new issue