web.py 2.69 KB
Newer Older
Wei Shoulin's avatar
C9  
Wei Shoulin committed
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
import dataclasses
from typing import Optional
from .common import BaseModel
from datetime import datetime

@dataclasses.dataclass
class SysMenu(BaseModel):
    menu_id: int = 0
    menu_name: str = ''
    title: str = ''
    icon: str = ''
    path: str = ''
    paths: str = ''
    menu_type: str = ''
    action: str = ''
    permission: str = ''
    parent_id: int = 0
    no_cache: bool = False
    breadcrumb: str = ''
    component: str = ''
    sort: int = 0
    visible: str = ''
    is_frame: str = ''
    create_by: int = 0
    update_by: int = 0
    created_at: str = ''
    updated_at: str = ''
    children: list = dataclasses.field(default_factory=list)

@dataclasses.dataclass
class SysRole(BaseModel):
    role_id: int = 0
    role_name: str = ''
    status: str = ''
    role_key: str = ''
    role_sort: int = 0
    flag: str = ''
    remark: str = ''
    admin: bool = False
    data_scope: str = ''
    create_by: int = 0
    update_by: int = 0
    created_at: str = ''
    updated_at: str = ''
    menuIds: list[int] = dataclasses.field(default_factory=list)
    menus: list[SysMenu] = dataclasses.field(default_factory=list)

@dataclasses.dataclass
class SysUser(BaseModel):
    user_id: int = 0
    username: str = ''
    truename: str = ''
    password: str = ''
    mobile: str = ''
    role_id: int = 0
    salt: str = ''
    instrument: str = ''
    avatar: str = ''
    gender: str = ''
    email: str = ''
    remark: str = ''
    status: str = ''
    last_login_ip: str = ''
    last_login_time: str = ''
    create_by: int = 0
    update_by: int = 0
    created_at: str = ''
    updated_at: str = ''
    role: SysRole = None

@dataclasses.dataclass
class SysConfig(BaseModel):
    config_id: int = 0
    config_name: str = ''
    config_key: str = ''
    config_value: str = ''
    config_type: str = ''
    is_frontend: str = ''
    remark: str = ''
    create_by: int = 0
    update_by: int = 0
    created_at: str = ''
    updated_at: str = ''

@dataclasses.dataclass
class SysDictData(BaseModel):
    dict_code: int = 0
    dict_sort: int = 0
    dict_label: str = ''
    dict_value: str = ''
    dict_type: str = ''
    css_class: str = ''
    list_class: str = ''
    is_default: str = ''
    status: int = 0
    remark: str = ''
    create_by: int = 0
    update_by: int = 0
    created_at: str = ''
    updated_at: str = ''

@dataclasses.dataclass
class SysDictType(BaseModel):
    dict_id: int = 0
    dict_name: str = ''
    dict_type: str = ''
    status: int = 0
    remark: str = ''
    create_by: int = 0
    update_by: int = 0
    created_at: str = ''
    updated_at: str = ''
    
@dataclasses.dataclass
class ProcessMessage(BaseModel):
    msg_id: str = ''
    pipeline_id: str = ''
    msg_body: str = ''