Gurucool_Test / schemas /user_permission.py
ashwinR's picture
Upload 245 files
b7a7f32
raw
history blame
590 Bytes
from typing import Optional
from pydantic import BaseModel
# shared properties
class UserPermissionBase(BaseModel):
name: str
# properties to recieve via
class UserPermissionCreate(UserPermissionBase):
pass
# properties to recive via API on Update
class UserPermissionUpdate(UserPermissionBase):
pass
# properties to return via the api
class UserPermissionInDBBase(UserPermissionBase):
id: Optional[int]
class Config:
orm_mode = True
class UserPermissionInDB(UserPermissionInDBBase):
pass
class UserPermission(UserPermissionInDBBase):
pass