from typing import Optional

from pydantic import BaseModel, EmailStr, HttpUrl

# Shared properties
class PaymentBase(BaseModel):
    item: Optional[str] = None
    amount: Optional[str] = None
    
# Properties to receive on video creation
class PaymentCreate(PaymentBase):
    item: str 
    amount: str 
    
# Properties to receive on video update
class PaymentUpdate(PaymentBase):
    pass

# Properties shared by models stored in DB
class PaymentBaseInDBBase(PaymentBase):
    id: int
    item: str
    amount: str
    payment_state: str
    
    class Config:
        orm_mode = True


# Properties to return to client
class Payment(PaymentBaseInDBBase):
    pass


# Properties properties stored in DB
class PaymentInDB(PaymentBaseInDBBase):
    pass