nft.py 459 B

123456789101112131415161718192021222324
  1. from typing import Optional
  2. from pydantic import BaseModel
  3. # Shared properties
  4. class NftBase(BaseModel):
  5. hash: Optional[str] = None
  6. imgurl: Optional[str] = None
  7. userid: Optional[str] = True
  8. title: Optional[str] = None
  9. context: Optional[str] = None
  10. is_active: Optional[bool] = True
  11. category: Optional[str] = None
  12. class Config:
  13. orm_mode = True
  14. class NftCreate(NftBase):
  15. pass
  16. class NftUpdate(NftBase):
  17. pass