from typing import Optional from pydantic import BaseModel, EmailStr class CustomerBase(BaseModel): first_name: str last_name: str email: EmailStr phone: Optional[str] = None address: Optional[str] = None city: Optional[str] = None state: Optional[str] = None zip_code: Optional[str] = None country: Optional[str] = None class CustomerCreate(CustomerBase): pass class CustomerUpdate(BaseModel): first_name: Optional[str] = None last_name: Optional[str] = None email: Optional[EmailStr] = None phone: Optional[str] = None address: Optional[str] = None city: Optional[str] = None state: Optional[str] = None zip_code: Optional[str] = None country: Optional[str] = None class CustomerInDBBase(CustomerBase): id: int stripe_customer_id: Optional[str] = None class Config: orm_mode = True class Customer(CustomerInDBBase): pass