mirror of
https://github.com/cssgunc/compass.git
synced 2025-04-09 22:00:18 -04:00
18 lines
613 B
Python
18 lines
613 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
|
|
from .tag_model import Tag
|
|
|
|
|
|
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: datetime | None = None
|
|
tags: List[Tag] = []
|