add batch

This commit is contained in:
2025-05-21 15:48:59 -03:00
parent 7f4fec6e1e
commit 249116cc76
20 changed files with 786 additions and 627 deletions

View File

@@ -1,4 +1,4 @@
from typing import Annotated
from typing import Annotated, Literal
from uuid import uuid4
from layercake.extra_types import CnpjStr, CpfStr, NameStr
@@ -37,3 +37,11 @@ class Course(BaseModel):
name: str
cert: Cert | None = None
access_period: int = 90 # 3 months
class Enrollment(BaseModel):
id: UUID4 = Field(default_factory=uuid4)
user: User
course: Course
progress: int = Field(default=0, ge=0, le=100)
status: Literal['PENDING'] = 'PENDING'