mirror of
https://github.com/sstent/aicyclingcoach-go.git
synced 2026-01-25 16:41:48 +00:00
17 lines
295 B
Python
17 lines
295 B
Python
from pydantic import BaseModel
|
|
from typing import Optional
|
|
|
|
class RuleBase(BaseModel):
|
|
name: str
|
|
description: Optional[str] = None
|
|
condition: str
|
|
priority: int = 0
|
|
|
|
class RuleCreate(RuleBase):
|
|
pass
|
|
|
|
class Rule(RuleBase):
|
|
id: str
|
|
|
|
class Config:
|
|
orm_mode = True |