mirror of
https://github.com/sstent/AICyclingCoach.git
synced 2026-01-26 09:02:30 +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 |