Files
geMoldInsight/src/inventory/schemas/customer_schemas.py
T

25 lines
519 B
Python
Raw Normal View History

2026-03-08 22:58:25 +08:00
from pydantic import BaseModel
from typing import Optional
class CustomerCreate(BaseModel):
code: Optional[str] = None
name: str
contact_person: Optional[str] = None
phone: Optional[str] = None
email: Optional[str] = None
address: Optional[str] = None
class CustomerResponse(BaseModel):
id: int
code: Optional[str]
name: str
contact_person: Optional[str]
phone: Optional[str]
email: Optional[str]
is_active: bool
class Config:
from_attributes = True