You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
|
|
|
|
|
|
class EquipmentCreate(BaseModel):
|
|
|
|
plan_year: str
|
|
|
|
purchasing_authority: str
|
|
|
|
department: str
|
|
|
|
equipment_name: str
|
|
|
|
quantity: int
|
|
|
|
budget_unit_price: float
|
|
|
|
final_unit_price: float
|
|
|
|
purchase_item_no: str
|
|
|
|
progress: str
|
|
|
|
delete_flag: int = 0
|
|
|
|
|
|
|
|
|
|
|
|
class Equipment(EquipmentCreate):
|
|
|
|
id: int
|
|
|
|
|
|
|
|
class ConfigDict:
|
|
|
|
from_attributes = True
|
|
|
|
|
|
|
|
|
|
|
|
class DeviceCreate(BaseModel):
|
|
|
|
year: int
|
|
|
|
name: str
|
|
|
|
auth: int
|
|
|
|
dep: str
|
|
|
|
num: int
|
|
|
|
pPrice: float
|
|
|
|
dPrice: float
|
|
|
|
proNum: str
|
|
|
|
process: int
|
|
|
|
delFlag: int = 0
|
|
|
|
|
|
|
|
|
|
|
|
class Device(DeviceCreate):
|
|
|
|
id: int
|
|
|
|
|
|
|
|
class ConfigDict:
|
|
|
|
from_attributes = True
|