update
This commit is contained in:
parent
560dfa82ad
commit
b9455de0ff
@ -115,14 +115,14 @@ class ShippingOrderPackageDB(Base):
|
|||||||
|
|
||||||
id = Column(Integer, primary_key=True, autoincrement=True)
|
id = Column(Integer, primary_key=True, autoincrement=True)
|
||||||
orderid = Column(String(32), ForeignKey("shipping_orders.orderid"), index=True)
|
orderid = Column(String(32), ForeignKey("shipping_orders.orderid"), index=True)
|
||||||
station_id = Column(Integer, ForeignKey("stations.id"), index=True)
|
station_id = Column(Integer, nullable=True)
|
||||||
station_name = Column(String(50), nullable=False)
|
station_name = Column(String(50), nullable=False)
|
||||||
pickup_codes = Column(String(100), nullable=False)
|
pickup_codes = Column(String(100), nullable=False)
|
||||||
create_time = Column(DateTime(timezone=True), server_default=func.now())
|
create_time = Column(DateTime(timezone=True), server_default=func.now())
|
||||||
|
|
||||||
# Pydantic 模型
|
# Pydantic 模型
|
||||||
class OrderPackage(BaseModel):
|
class OrderPackage(BaseModel):
|
||||||
station_id: int = 0
|
station_id: Optional[int] = None
|
||||||
station_name: Optional[str] = None
|
station_name: Optional[str] = None
|
||||||
pickup_codes: str = Field(..., max_length=100)
|
pickup_codes: str = Field(..., max_length=100)
|
||||||
|
|
||||||
@ -205,7 +205,7 @@ class OrderInfo(BaseModel):
|
|||||||
class OrderPackageInfo(BaseModel):
|
class OrderPackageInfo(BaseModel):
|
||||||
id: int
|
id: int
|
||||||
orderid: str
|
orderid: str
|
||||||
station_id: int
|
station_id: Optional[int] = None
|
||||||
station_name: str
|
station_name: str
|
||||||
pickup_codes: str
|
pickup_codes: str
|
||||||
create_time: datetime
|
create_time: datetime
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user