forked from xzelencikova/ngo_naruc_project_be
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodels.py
58 lines (50 loc) · 1.51 KB
/
models.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
from flask_restx import fields
from namespaces.ns_naruc import api
question_model = api.model("Question", {
"question": fields.String,
"category": fields.String,
"order": fields.Integer,
"icon": fields.String
})
user_model_signin = api.model("user_model_signin", {
"name": fields.String,
"surname": fields.String,
"email": fields.String,
"role": fields.String,
"password": fields.String
})
user_model = api.model("Login User", {
"name": fields.String,
"surname": fields.String,
"email": fields.String,
"role": fields.String
})
user_password = api.model("User password", {
"password": fields.String
})
login_model = api.model("Login Data", {
"email": fields.String(required=True, description="User email"),
"password": fields.String(required=True, description="User password")
})
question_rating_model = api.model("Question Rating", {
"question_id": fields.String,
"question": fields.String,
"rating": fields.Integer,
"category": fields.String,
"icon": fields.String
})
rating_model = api.model("Rating", {
"date_rated": fields.Date,
"rated_by_user_id": fields.String,
"client_id": fields.String,
"phase_no": fields.Integer,
"questions_rating": fields.List(fields.Nested(question_rating_model))
})
client_model = api.model("Add client", {
"name": fields.String,
"surname": fields.String,
"registration_date": fields.String,
"contract_no": fields.String,
"last_phase": fields.Integer,
"active": fields.Boolean
})