-
Notifications
You must be signed in to change notification settings - Fork 0
/
model.py
104 lines (78 loc) · 1.79 KB
/
model.py
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
from dataclasses import dataclass
from datetime import datetime
@dataclass
class LegalEntity:
id: int = -1
contact_phone: str = None
address: str = None
name: str = None
@dataclass
class Contract:
id: int = -1
legal_entity_id: int = None
creation_time: datetime = None
deadline_time: datetime = None
is_finished: bool = None
is_violated: bool = None
price: float = None
resources: list[int] = None
@dataclass
class Standard:
id: int = -1
name: str = None
description: str = None
@dataclass
class ProductionLine:
id: int = -1
standard_id: int = None
production_start_time: datetime = None
production_finish_time: datetime = None
resources: list[int] = None
results: list[int] = None
workers: list[int] = None
machines: list[int] = None
@dataclass
class Resource:
id: int = -1
type_id: int = None
type: str = None
production_line_id: int = None
parent_production_line_id: int = None
description: str = None
flour_grade_id: int = None
flour_grade: str = None
vitreousness: int = None
contamination: int = None
grinding_grade_id: int = None
grinding_grade: str = None
contract_id: int = None
@dataclass
class Machine:
id: int = -1
is_powered: bool = None
type_id: int = None
type: str = None
@dataclass
class Worker:
id: int = -1
chief_id: int = None
role_id: int = None
role: str = None
name: str = None
@dataclass
class ResourceType:
id: int = -1
name: str = None
is_producible: bool = None
@dataclass
class _Primitive:
id: int = -1
name: str = None
class Role(_Primitive):
pass
class MachineType(_Primitive):
pass
class FlourGrade(_Primitive):
pass
class GrindingGrade(_Primitive):
pass