compass/backend/models/resource_model.py
2024-04-24 20:18:09 -04:00

16 lines
557 B
Python

from pydantic import BaseModel, Field
from enum import Enum
from typing import List
from datetime import datetime
from typing import Optional
from .enum_for_models import ProgramTypeEnum
class Resource(BaseModel):
id: int | None = None
name: str = Field(..., max_length=150, description="The name of the resource")
summary: str = Field(..., max_length=300, description="The summary of the resource")
link: str = Field(..., max_length=150, description="link to the resource")
program: ProgramTypeEnum
created_at: Optional[datetime]