-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.py
28 lines (24 loc) · 843 Bytes
/
models.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from pydantic import BaseModel
from sqlmodel import Field, SQLModel
from datetime import datetime
class Settings(SQLModel, table=True):
servo_id: int | None = Field(default=None, primary_key=True)
madication_name: str
madication_properties: str | None
exp: datetime
class Medication_schedule(SQLModel, table=True):
medication_id: int | None = Field(default=None, primary_key=True)
date: datetime
quantity_servo1: int
quantity_servo2: int
quantity_servo3: int
quantity_servo4: int
class Storage(SQLModel, table=True):
storage_id: int | None = Field(default=None, primary_key=True)
servo_id: int
quantity: int
action_date: datetime
class Work_schedule(SQLModel, table=True):
work_id: int | None = Field(default=None, primary_key=True)
medication_id: int
work_date: datetime