File size: 608 Bytes
2e818da
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from pydantic import BaseModel, Field

from app.schemas.session import Intention


class ProjectFile(BaseModel):
    filename: str
    file_id: str  # full sha256 hex of the file bytes


class Project(BaseModel):
    project_id: str
    name: str
    created_at: float
    updated_at: float
    files: list[ProjectFile] = Field(default_factory=list)
    intention: Intention = Intention.LEARN
    title: str = ""


class ProjectDetail(Project):
    document_id: str = ""


class ProjectUpdateRequest(BaseModel):
    name: str | None = None
    intention: Intention | None = None
    title: str | None = None