33 lines
652 B
Python
33 lines
652 B
Python
import uuid
|
|
from datetime import datetime
|
|
from typing import List, Optional
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
from schemas import DBBase
|
|
|
|
|
|
class ProjectBase(BaseModel):
|
|
name: str = None
|
|
|
|
|
|
# 解析请求json 创建项目
|
|
class ProjectCreate(ProjectBase):
|
|
name: str = Field(..., title='项目名')
|
|
game: str = Field(..., title='游戏代号')
|
|
|
|
|
|
# 查询某个项目看板
|
|
class ProjectKanban(DBBase):
|
|
pass
|
|
|
|
|
|
# --------------------------------------------------------------
|
|
# 数据库模型
|
|
class ProjectDB(DBBase):
|
|
name: str
|
|
game: str
|
|
user_id: str
|
|
members: List[str] = []
|
|
create_date: datetime = datetime.now()
|