File size: 590 Bytes
b7a7f32
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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