from typing import Optional

from pydantic import BaseModel, EmailStr, HttpUrl

# Shared properties
class SimplePayBase(BaseModel):
    email: Optional[EmailStr] = None
    name : Optional[str] = None
    taxID: Optional[str] = None
    tradeDesc: Optional[str] = None
    item: Optional[str] = None
    amount: Optional[str] = None
    
# Properties to receive on video creation
class SimplePayCreate(SimplePayBase):
    email: EmailStr
    name : str
    tradeDesc: Optional[str] = None
    item: Optional[str] = None
    amount: Optional[str] = None
    
# Properties to receive on video update
class SimplePayUpdate(SimplePayBase):
    pass

# Properties shared by models stored in DB
class SimplePayInDBBase(SimplePayBase):
    id: int
    email: EmailStr
    name : str
    taxID: str
    tradeDesc: str
    item: str
    amount: str
    payment_state: str
    
    class Config:
        orm_mode = True


# Properties to return to client
class SimplePay(SimplePayInDBBase):
    pass


# Properties properties stored in DB
class SimplePayInDB(SimplePayInDBBase):
    pass
