Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /ParisNeo_lollms /backend /models /fun_fact.py
| from pydantic import BaseModel, Field, constr, ConfigDict | |
| from typing import Optional, List | |
| class WelcomeInfo(BaseModel): | |
| welcome_text: Optional[str] = None | |
| welcome_slogan: Optional[str] = None | |
| welcome_logo_url: Optional[str] = None | |
| fun_fact: str | |
| fun_fact_color: Optional[str] = None | |
| fun_fact_category: Optional[str] = None | |
| latex_builder_enabled: bool = False | |
| export_to_txt_enabled: bool = True | |
| export_to_markdown_enabled: bool = True | |
| export_to_html_enabled: bool = True | |
| export_to_pdf_enabled: bool = False | |
| export_to_docx_enabled: bool = False | |
| export_to_xlsx_enabled: bool = False | |
| export_to_pptx_enabled: bool = False | |
| class FunFactCategoryBase(BaseModel): | |
| name: constr(min_length=1, max_length=100) | |
| is_active: bool = True | |
| color: str = Field(default="#3B82F6", pattern=r"^#[0-9a-fA-F]{6}$") | |
| class FunFactCategoryCreate(FunFactCategoryBase): | |
| pass | |
| class FunFactCategoryUpdate(BaseModel): | |
| name: Optional[constr(min_length=1, max_length=100)] = None | |
| is_active: Optional[bool] = None | |
| color: Optional[str] = Field(None, pattern=r"^#[0-9a-fA-F]{6}$") | |
| class FunFactCategoryPublic(FunFactCategoryBase): | |
| model_config = ConfigDict(from_attributes=True) | |
| id: int | |
| class FunFactBase(BaseModel): | |
| content: constr(min_length=1) | |
| category_id: int | |
| class FunFactCreate(FunFactBase): | |
| pass | |
| class FunFactUpdate(BaseModel): | |
| content: Optional[constr(min_length=1)] = None | |
| category_id: Optional[int] = None | |
| class FunFactPublic(FunFactBase): | |
| model_config = ConfigDict(from_attributes=True) | |
| id: int | |
| category: FunFactCategoryPublic | |
| class FunFactExport(BaseModel): | |
| category: str | |
| content: str | |
| class FunFactsImportRequest(BaseModel): | |
| fun_facts: List[FunFactExport] | |
| class FunFactCategoryExport(FunFactCategoryBase): | |
| facts: List[str] | |
| class FunFactCategoryImport(FunFactCategoryBase): | |
| facts: List[str] | |
Xet Storage Details
- Size:
- 1.92 kB
- Xet hash:
- d3880e4c9fc8d8e7d50008510c7296dc140506a9477f9ab20522b5ac11973de5
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.