zou 0.20.83__py3-none-any.whl → 0.20.84__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- zou/__init__.py +1 -1
- zou/app/blueprints/comments/resources.py +32 -35
- zou/app/blueprints/concepts/resources.py +23 -8
- zou/app/blueprints/crud/asset_instance.py +272 -0
- zou/app/blueprints/crud/attachment_file.py +263 -0
- zou/app/blueprints/crud/base.py +176 -69
- zou/app/blueprints/crud/budget.py +278 -0
- zou/app/blueprints/crud/budget_entry.py +269 -0
- zou/app/blueprints/crud/chat.py +282 -0
- zou/app/blueprints/crud/chat_message.py +286 -0
- zou/app/blueprints/crud/comments.py +312 -1
- zou/app/blueprints/crud/custom_action.py +268 -0
- zou/app/blueprints/crud/day_off.py +298 -0
- zou/app/blueprints/crud/department.py +268 -0
- zou/app/blueprints/crud/entity.py +297 -3
- zou/app/blueprints/crud/entity_link.py +303 -0
- zou/app/blueprints/crud/entity_type.py +269 -0
- zou/app/blueprints/crud/event.py +197 -0
- zou/app/blueprints/crud/file_status.py +268 -0
- zou/app/blueprints/crud/hardware_item.py +268 -0
- zou/app/blueprints/crud/metadata_descriptor.py +312 -0
- zou/app/blueprints/crud/milestone.py +302 -1
- zou/app/blueprints/crud/news.py +285 -0
- zou/app/blueprints/crud/notification.py +287 -0
- zou/app/blueprints/crud/organisation.py +269 -0
- zou/app/blueprints/crud/output_file.py +34 -10
- zou/app/blueprints/crud/output_type.py +30 -10
- zou/app/blueprints/crud/person.py +407 -2
- zou/app/blueprints/crud/playlist.py +322 -4
- zou/app/blueprints/crud/plugin.py +269 -0
- zou/app/blueprints/crud/preview_background_file.py +272 -0
- zou/app/blueprints/crud/preview_file.py +280 -9
- zou/app/blueprints/crud/production_schedule_version.py +569 -0
- zou/app/blueprints/crud/project.py +440 -0
- zou/app/blueprints/crud/project_status.py +268 -0
- zou/app/blueprints/crud/salary_scale.py +185 -5
- zou/app/blueprints/crud/schedule_item.py +305 -0
- zou/app/blueprints/crud/search_filter.py +302 -0
- zou/app/blueprints/crud/search_filter_group.py +270 -0
- zou/app/blueprints/crud/software.py +30 -10
- zou/app/blueprints/crud/status_automation.py +296 -2
- zou/app/blueprints/crud/studio.py +268 -0
- zou/app/blueprints/crud/subscription.py +279 -0
- zou/app/blueprints/crud/task.py +325 -5
- zou/app/blueprints/crud/task_status.py +301 -0
- zou/app/blueprints/crud/task_type.py +283 -0
- zou/app/blueprints/crud/time_spent.py +327 -0
- zou/app/blueprints/crud/working_file.py +273 -10
- zou/app/blueprints/export/csv/assets.py +15 -5
- zou/app/blueprints/export/csv/base.py +12 -3
- zou/app/blueprints/export/csv/casting.py +32 -5
- zou/app/blueprints/export/csv/edits.py +15 -5
- zou/app/blueprints/export/csv/persons.py +24 -0
- zou/app/blueprints/export/csv/playlists.py +16 -5
- zou/app/blueprints/export/csv/projects.py +23 -0
- zou/app/blueprints/export/csv/shots.py +15 -5
- zou/app/blueprints/export/csv/task_types.py +23 -0
- zou/app/blueprints/export/csv/tasks.py +24 -0
- zou/app/blueprints/export/csv/time_spents.py +24 -0
- zou/app/blueprints/files/resources.py +928 -377
- zou/app/blueprints/news/resources.py +7 -5
- zou/app/blueprints/persons/resources.py +644 -271
- zou/app/blueprints/playlists/resources.py +154 -72
- zou/app/blueprints/previews/resources.py +473 -228
- zou/app/blueprints/projects/__init__.py +5 -0
- zou/app/blueprints/projects/resources.py +987 -420
- zou/app/blueprints/search/resources.py +44 -32
- zou/app/blueprints/shots/resources.py +1338 -88
- zou/app/blueprints/source/csv/assets.py +44 -6
- zou/app/blueprints/source/csv/casting.py +43 -6
- zou/app/blueprints/source/csv/edits.py +47 -9
- zou/app/blueprints/source/csv/persons.py +43 -4
- zou/app/blueprints/source/csv/shots.py +47 -6
- zou/app/blueprints/source/csv/task_type_estimations.py +95 -35
- zou/app/blueprints/source/kitsu.py +433 -11
- zou/app/blueprints/source/otio.py +215 -20
- zou/app/blueprints/source/shotgun/assets.py +146 -0
- zou/app/blueprints/source/shotgun/base.py +85 -14
- zou/app/blueprints/source/shotgun/episode.py +124 -0
- zou/app/blueprints/source/shotgun/import_errors.py +105 -14
- zou/app/blueprints/source/shotgun/notes.py +132 -0
- zou/app/blueprints/source/shotgun/person.py +163 -0
- zou/app/blueprints/source/shotgun/project.py +120 -0
- zou/app/blueprints/source/shotgun/scene.py +120 -0
- zou/app/blueprints/source/shotgun/sequence.py +134 -0
- zou/app/blueprints/source/shotgun/shot.py +166 -0
- zou/app/blueprints/source/shotgun/status.py +129 -0
- zou/app/blueprints/source/shotgun/steps.py +138 -0
- zou/app/blueprints/source/shotgun/tasks.py +199 -0
- zou/app/blueprints/source/shotgun/team.py +132 -0
- zou/app/blueprints/source/shotgun/versions.py +155 -0
- zou/app/blueprints/tasks/resources.py +1197 -308
- zou/app/models/metadata_descriptor.py +1 -0
- zou/app/services/persons_service.py +1 -1
- zou/app/services/projects_service.py +45 -1
- zou/app/services/time_spents_service.py +1 -1
- zou/migrations/versions/a1b2c3d4e5f6_add_position_to_metadata_descriptor.py +32 -0
- {zou-0.20.83.dist-info → zou-0.20.84.dist-info}/METADATA +18 -18
- {zou-0.20.83.dist-info → zou-0.20.84.dist-info}/RECORD +103 -102
- {zou-0.20.83.dist-info → zou-0.20.84.dist-info}/WHEEL +0 -0
- {zou-0.20.83.dist-info → zou-0.20.84.dist-info}/entry_points.txt +0 -0
- {zou-0.20.83.dist-info → zou-0.20.84.dist-info}/licenses/LICENSE +0 -0
- {zou-0.20.83.dist-info → zou-0.20.84.dist-info}/top_level.txt +0 -0
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from flask_jwt_extended import jwt_required
|
|
2
|
+
|
|
1
3
|
from zou.app.blueprints.crud.base import BaseModelsResource, BaseModelResource
|
|
2
4
|
|
|
3
5
|
from zou.app.models.salary_scale import Budget
|
|
@@ -7,6 +9,138 @@ class BudgetsResource(BaseModelsResource):
|
|
|
7
9
|
def __init__(self):
|
|
8
10
|
BaseModelsResource.__init__(self, Budget)
|
|
9
11
|
|
|
12
|
+
@jwt_required()
|
|
13
|
+
def get(self):
|
|
14
|
+
"""
|
|
15
|
+
Get budgets
|
|
16
|
+
---
|
|
17
|
+
tags:
|
|
18
|
+
- Crud
|
|
19
|
+
description: Retrieve all budgets. Supports filtering via query
|
|
20
|
+
parameters and pagination.
|
|
21
|
+
parameters:
|
|
22
|
+
- in: query
|
|
23
|
+
name: page
|
|
24
|
+
required: false
|
|
25
|
+
schema:
|
|
26
|
+
type: integer
|
|
27
|
+
example: 1
|
|
28
|
+
description: Page number for pagination
|
|
29
|
+
- in: query
|
|
30
|
+
name: limit
|
|
31
|
+
required: false
|
|
32
|
+
schema:
|
|
33
|
+
type: integer
|
|
34
|
+
example: 50
|
|
35
|
+
description: Number of results per page
|
|
36
|
+
- in: query
|
|
37
|
+
name: relations
|
|
38
|
+
required: false
|
|
39
|
+
schema:
|
|
40
|
+
type: boolean
|
|
41
|
+
default: false
|
|
42
|
+
example: false
|
|
43
|
+
description: Whether to include relations
|
|
44
|
+
responses:
|
|
45
|
+
200:
|
|
46
|
+
description: Budgets retrieved successfully
|
|
47
|
+
content:
|
|
48
|
+
application/json:
|
|
49
|
+
schema:
|
|
50
|
+
oneOf:
|
|
51
|
+
- type: array
|
|
52
|
+
items:
|
|
53
|
+
type: object
|
|
54
|
+
- type: object
|
|
55
|
+
properties:
|
|
56
|
+
data:
|
|
57
|
+
type: array
|
|
58
|
+
items:
|
|
59
|
+
type: object
|
|
60
|
+
example: []
|
|
61
|
+
total:
|
|
62
|
+
type: integer
|
|
63
|
+
example: 100
|
|
64
|
+
nb_pages:
|
|
65
|
+
type: integer
|
|
66
|
+
example: 2
|
|
67
|
+
limit:
|
|
68
|
+
type: integer
|
|
69
|
+
example: 50
|
|
70
|
+
offset:
|
|
71
|
+
type: integer
|
|
72
|
+
example: 0
|
|
73
|
+
page:
|
|
74
|
+
type: integer
|
|
75
|
+
example: 1
|
|
76
|
+
400:
|
|
77
|
+
description: Invalid filter format or query error
|
|
78
|
+
"""
|
|
79
|
+
return super().get()
|
|
80
|
+
|
|
81
|
+
@jwt_required()
|
|
82
|
+
def post(self):
|
|
83
|
+
"""
|
|
84
|
+
Create budget
|
|
85
|
+
---
|
|
86
|
+
tags:
|
|
87
|
+
- Crud
|
|
88
|
+
description: Create a new budget with data provided in the request
|
|
89
|
+
body. JSON format is expected.
|
|
90
|
+
requestBody:
|
|
91
|
+
required: true
|
|
92
|
+
content:
|
|
93
|
+
application/json:
|
|
94
|
+
schema:
|
|
95
|
+
type: object
|
|
96
|
+
required:
|
|
97
|
+
- project_id
|
|
98
|
+
properties:
|
|
99
|
+
project_id:
|
|
100
|
+
type: string
|
|
101
|
+
format: uuid
|
|
102
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
103
|
+
name:
|
|
104
|
+
type: string
|
|
105
|
+
example: Budget Q1
|
|
106
|
+
revision:
|
|
107
|
+
type: integer
|
|
108
|
+
example: 1
|
|
109
|
+
responses:
|
|
110
|
+
201:
|
|
111
|
+
description: Budget created successfully
|
|
112
|
+
content:
|
|
113
|
+
application/json:
|
|
114
|
+
schema:
|
|
115
|
+
type: object
|
|
116
|
+
properties:
|
|
117
|
+
id:
|
|
118
|
+
type: string
|
|
119
|
+
format: uuid
|
|
120
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
121
|
+
project_id:
|
|
122
|
+
type: string
|
|
123
|
+
format: uuid
|
|
124
|
+
example: b24a6ea4-ce75-4665-a070-57453082c25
|
|
125
|
+
name:
|
|
126
|
+
type: string
|
|
127
|
+
example: Budget Q1
|
|
128
|
+
revision:
|
|
129
|
+
type: integer
|
|
130
|
+
example: 1
|
|
131
|
+
created_at:
|
|
132
|
+
type: string
|
|
133
|
+
format: date-time
|
|
134
|
+
example: "2024-01-15T10:30:00Z"
|
|
135
|
+
updated_at:
|
|
136
|
+
type: string
|
|
137
|
+
format: date-time
|
|
138
|
+
example: "2024-01-15T10:30:00Z"
|
|
139
|
+
400:
|
|
140
|
+
description: Invalid data format or validation error
|
|
141
|
+
"""
|
|
142
|
+
return super().post()
|
|
143
|
+
|
|
10
144
|
|
|
11
145
|
class BudgetResource(BaseModelResource):
|
|
12
146
|
protected_fields = [
|
|
@@ -19,3 +153,147 @@ class BudgetResource(BaseModelResource):
|
|
|
19
153
|
|
|
20
154
|
def __init__(self):
|
|
21
155
|
BaseModelResource.__init__(self, Budget)
|
|
156
|
+
|
|
157
|
+
@jwt_required()
|
|
158
|
+
def get(self, instance_id):
|
|
159
|
+
"""
|
|
160
|
+
Get budget
|
|
161
|
+
---
|
|
162
|
+
tags:
|
|
163
|
+
- Crud
|
|
164
|
+
description: Retrieve a budget by its ID and return it as a JSON
|
|
165
|
+
object. Supports including relations.
|
|
166
|
+
parameters:
|
|
167
|
+
- in: path
|
|
168
|
+
name: instance_id
|
|
169
|
+
required: true
|
|
170
|
+
schema:
|
|
171
|
+
type: string
|
|
172
|
+
format: uuid
|
|
173
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
174
|
+
- in: query
|
|
175
|
+
name: relations
|
|
176
|
+
required: false
|
|
177
|
+
schema:
|
|
178
|
+
type: boolean
|
|
179
|
+
default: true
|
|
180
|
+
example: true
|
|
181
|
+
description: Whether to include relations
|
|
182
|
+
responses:
|
|
183
|
+
200:
|
|
184
|
+
description: Budget retrieved successfully
|
|
185
|
+
content:
|
|
186
|
+
application/json:
|
|
187
|
+
schema:
|
|
188
|
+
type: object
|
|
189
|
+
properties:
|
|
190
|
+
id:
|
|
191
|
+
type: string
|
|
192
|
+
format: uuid
|
|
193
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
194
|
+
project_id:
|
|
195
|
+
type: string
|
|
196
|
+
format: uuid
|
|
197
|
+
example: b24a6ea4-ce75-4665-a070-57453082c25
|
|
198
|
+
name:
|
|
199
|
+
type: string
|
|
200
|
+
example: Budget Q1
|
|
201
|
+
revision:
|
|
202
|
+
type: integer
|
|
203
|
+
example: 1
|
|
204
|
+
created_at:
|
|
205
|
+
type: string
|
|
206
|
+
format: date-time
|
|
207
|
+
example: "2024-01-15T10:30:00Z"
|
|
208
|
+
updated_at:
|
|
209
|
+
type: string
|
|
210
|
+
format: date-time
|
|
211
|
+
example: "2024-01-15T10:30:00Z"
|
|
212
|
+
400:
|
|
213
|
+
description: Invalid ID format or query error
|
|
214
|
+
"""
|
|
215
|
+
return super().get(instance_id)
|
|
216
|
+
|
|
217
|
+
@jwt_required()
|
|
218
|
+
def put(self, instance_id):
|
|
219
|
+
"""
|
|
220
|
+
Update budget
|
|
221
|
+
---
|
|
222
|
+
tags:
|
|
223
|
+
- Crud
|
|
224
|
+
description: Update a budget with data provided in the request
|
|
225
|
+
body. JSON format is expected.
|
|
226
|
+
parameters:
|
|
227
|
+
- in: path
|
|
228
|
+
name: instance_id
|
|
229
|
+
required: true
|
|
230
|
+
schema:
|
|
231
|
+
type: string
|
|
232
|
+
format: uuid
|
|
233
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
234
|
+
requestBody:
|
|
235
|
+
required: true
|
|
236
|
+
content:
|
|
237
|
+
application/json:
|
|
238
|
+
schema:
|
|
239
|
+
type: object
|
|
240
|
+
properties:
|
|
241
|
+
name:
|
|
242
|
+
type: string
|
|
243
|
+
example: Updated Budget Q1
|
|
244
|
+
responses:
|
|
245
|
+
200:
|
|
246
|
+
description: Budget updated successfully
|
|
247
|
+
content:
|
|
248
|
+
application/json:
|
|
249
|
+
schema:
|
|
250
|
+
type: object
|
|
251
|
+
properties:
|
|
252
|
+
id:
|
|
253
|
+
type: string
|
|
254
|
+
format: uuid
|
|
255
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
256
|
+
project_id:
|
|
257
|
+
type: string
|
|
258
|
+
format: uuid
|
|
259
|
+
example: b24a6ea4-ce75-4665-a070-57453082c25
|
|
260
|
+
name:
|
|
261
|
+
type: string
|
|
262
|
+
example: Updated Budget Q1
|
|
263
|
+
created_at:
|
|
264
|
+
type: string
|
|
265
|
+
format: date-time
|
|
266
|
+
example: "2024-01-15T10:30:00Z"
|
|
267
|
+
updated_at:
|
|
268
|
+
type: string
|
|
269
|
+
format: date-time
|
|
270
|
+
example: "2024-01-15T11:00:00Z"
|
|
271
|
+
400:
|
|
272
|
+
description: Invalid data format or validation error
|
|
273
|
+
"""
|
|
274
|
+
return super().put(instance_id)
|
|
275
|
+
|
|
276
|
+
@jwt_required()
|
|
277
|
+
def delete(self, instance_id):
|
|
278
|
+
"""
|
|
279
|
+
Delete budget
|
|
280
|
+
---
|
|
281
|
+
tags:
|
|
282
|
+
- Crud
|
|
283
|
+
description: Delete a budget by its ID. Returns empty response on
|
|
284
|
+
success.
|
|
285
|
+
parameters:
|
|
286
|
+
- in: path
|
|
287
|
+
name: instance_id
|
|
288
|
+
required: true
|
|
289
|
+
schema:
|
|
290
|
+
type: string
|
|
291
|
+
format: uuid
|
|
292
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
293
|
+
responses:
|
|
294
|
+
204:
|
|
295
|
+
description: Budget deleted successfully
|
|
296
|
+
400:
|
|
297
|
+
description: Integrity error or cannot delete
|
|
298
|
+
"""
|
|
299
|
+
return super().delete(instance_id)
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from flask_jwt_extended import jwt_required
|
|
2
|
+
|
|
1
3
|
from zou.app.blueprints.crud.base import BaseModelsResource, BaseModelResource
|
|
2
4
|
|
|
3
5
|
from zou.app.models.salary_scale import BudgetEntry
|
|
@@ -8,8 +10,275 @@ class BudgetEntriesResource(BaseModelsResource):
|
|
|
8
10
|
def __init__(self):
|
|
9
11
|
BaseModelsResource.__init__(self, BudgetEntry)
|
|
10
12
|
|
|
13
|
+
@jwt_required()
|
|
14
|
+
def get(self):
|
|
15
|
+
"""
|
|
16
|
+
Get budget entries
|
|
17
|
+
---
|
|
18
|
+
tags:
|
|
19
|
+
- Crud
|
|
20
|
+
description: Retrieve all budget entries. Supports filtering via
|
|
21
|
+
query parameters and pagination.
|
|
22
|
+
parameters:
|
|
23
|
+
- in: query
|
|
24
|
+
name: page
|
|
25
|
+
required: false
|
|
26
|
+
schema:
|
|
27
|
+
type: integer
|
|
28
|
+
example: 1
|
|
29
|
+
description: Page number for pagination
|
|
30
|
+
- in: query
|
|
31
|
+
name: limit
|
|
32
|
+
required: false
|
|
33
|
+
schema:
|
|
34
|
+
type: integer
|
|
35
|
+
example: 50
|
|
36
|
+
description: Number of results per page
|
|
37
|
+
- in: query
|
|
38
|
+
name: relations
|
|
39
|
+
required: false
|
|
40
|
+
schema:
|
|
41
|
+
type: boolean
|
|
42
|
+
default: false
|
|
43
|
+
example: false
|
|
44
|
+
description: Whether to include relations
|
|
45
|
+
responses:
|
|
46
|
+
200:
|
|
47
|
+
description: Budget entries retrieved successfully
|
|
48
|
+
content:
|
|
49
|
+
application/json:
|
|
50
|
+
schema:
|
|
51
|
+
oneOf:
|
|
52
|
+
- type: array
|
|
53
|
+
items:
|
|
54
|
+
type: object
|
|
55
|
+
- type: object
|
|
56
|
+
properties:
|
|
57
|
+
data:
|
|
58
|
+
type: array
|
|
59
|
+
items:
|
|
60
|
+
type: object
|
|
61
|
+
example: []
|
|
62
|
+
total:
|
|
63
|
+
type: integer
|
|
64
|
+
example: 100
|
|
65
|
+
nb_pages:
|
|
66
|
+
type: integer
|
|
67
|
+
example: 2
|
|
68
|
+
limit:
|
|
69
|
+
type: integer
|
|
70
|
+
example: 50
|
|
71
|
+
offset:
|
|
72
|
+
type: integer
|
|
73
|
+
example: 0
|
|
74
|
+
page:
|
|
75
|
+
type: integer
|
|
76
|
+
example: 1
|
|
77
|
+
400:
|
|
78
|
+
description: Invalid filter format or query error
|
|
79
|
+
"""
|
|
80
|
+
return super().get()
|
|
81
|
+
|
|
82
|
+
@jwt_required()
|
|
83
|
+
def post(self):
|
|
84
|
+
"""
|
|
85
|
+
Create budget entry
|
|
86
|
+
---
|
|
87
|
+
tags:
|
|
88
|
+
- Crud
|
|
89
|
+
description: Create a new budget entry with data provided in the
|
|
90
|
+
request body. JSON format is expected.
|
|
91
|
+
requestBody:
|
|
92
|
+
required: true
|
|
93
|
+
content:
|
|
94
|
+
application/json:
|
|
95
|
+
schema:
|
|
96
|
+
type: object
|
|
97
|
+
required:
|
|
98
|
+
- budget_id
|
|
99
|
+
properties:
|
|
100
|
+
budget_id:
|
|
101
|
+
type: string
|
|
102
|
+
format: uuid
|
|
103
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
104
|
+
amount:
|
|
105
|
+
type: number
|
|
106
|
+
example: 1000.0
|
|
107
|
+
responses:
|
|
108
|
+
201:
|
|
109
|
+
description: Budget entry created successfully
|
|
110
|
+
content:
|
|
111
|
+
application/json:
|
|
112
|
+
schema:
|
|
113
|
+
type: object
|
|
114
|
+
properties:
|
|
115
|
+
id:
|
|
116
|
+
type: string
|
|
117
|
+
format: uuid
|
|
118
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
119
|
+
budget_id:
|
|
120
|
+
type: string
|
|
121
|
+
format: uuid
|
|
122
|
+
example: b24a6ea4-ce75-4665-a070-57453082c25
|
|
123
|
+
amount:
|
|
124
|
+
type: number
|
|
125
|
+
example: 1000.0
|
|
126
|
+
created_at:
|
|
127
|
+
type: string
|
|
128
|
+
format: date-time
|
|
129
|
+
example: "2024-01-15T10:30:00Z"
|
|
130
|
+
updated_at:
|
|
131
|
+
type: string
|
|
132
|
+
format: date-time
|
|
133
|
+
example: "2024-01-15T10:30:00Z"
|
|
134
|
+
400:
|
|
135
|
+
description: Invalid data format or validation error
|
|
136
|
+
"""
|
|
137
|
+
return super().post()
|
|
138
|
+
|
|
11
139
|
|
|
12
140
|
class BudgetEntryResource(BaseModelResource):
|
|
13
141
|
|
|
14
142
|
def __init__(self):
|
|
15
143
|
BaseModelResource.__init__(self, BudgetEntry)
|
|
144
|
+
|
|
145
|
+
@jwt_required()
|
|
146
|
+
def get(self, instance_id):
|
|
147
|
+
"""
|
|
148
|
+
Get budget entry
|
|
149
|
+
---
|
|
150
|
+
tags:
|
|
151
|
+
- Crud
|
|
152
|
+
description: Retrieve a budget entry by its ID and return it as a
|
|
153
|
+
JSON object. Supports including relations.
|
|
154
|
+
parameters:
|
|
155
|
+
- in: path
|
|
156
|
+
name: instance_id
|
|
157
|
+
required: true
|
|
158
|
+
schema:
|
|
159
|
+
type: string
|
|
160
|
+
format: uuid
|
|
161
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
162
|
+
- in: query
|
|
163
|
+
name: relations
|
|
164
|
+
required: false
|
|
165
|
+
schema:
|
|
166
|
+
type: boolean
|
|
167
|
+
default: true
|
|
168
|
+
example: true
|
|
169
|
+
description: Whether to include relations
|
|
170
|
+
responses:
|
|
171
|
+
200:
|
|
172
|
+
description: Budget entry retrieved successfully
|
|
173
|
+
content:
|
|
174
|
+
application/json:
|
|
175
|
+
schema:
|
|
176
|
+
type: object
|
|
177
|
+
properties:
|
|
178
|
+
id:
|
|
179
|
+
type: string
|
|
180
|
+
format: uuid
|
|
181
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
182
|
+
budget_id:
|
|
183
|
+
type: string
|
|
184
|
+
format: uuid
|
|
185
|
+
example: b24a6ea4-ce75-4665-a070-57453082c25
|
|
186
|
+
amount:
|
|
187
|
+
type: number
|
|
188
|
+
example: 1000.0
|
|
189
|
+
created_at:
|
|
190
|
+
type: string
|
|
191
|
+
format: date-time
|
|
192
|
+
example: "2024-01-15T10:30:00Z"
|
|
193
|
+
updated_at:
|
|
194
|
+
type: string
|
|
195
|
+
format: date-time
|
|
196
|
+
example: "2024-01-15T10:30:00Z"
|
|
197
|
+
400:
|
|
198
|
+
description: Invalid ID format or query error
|
|
199
|
+
"""
|
|
200
|
+
return super().get(instance_id)
|
|
201
|
+
|
|
202
|
+
@jwt_required()
|
|
203
|
+
def put(self, instance_id):
|
|
204
|
+
"""
|
|
205
|
+
Update budget entry
|
|
206
|
+
---
|
|
207
|
+
tags:
|
|
208
|
+
- Crud
|
|
209
|
+
description: Update a budget entry with data provided in the
|
|
210
|
+
request body. JSON format is expected.
|
|
211
|
+
parameters:
|
|
212
|
+
- in: path
|
|
213
|
+
name: instance_id
|
|
214
|
+
required: true
|
|
215
|
+
schema:
|
|
216
|
+
type: string
|
|
217
|
+
format: uuid
|
|
218
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
219
|
+
requestBody:
|
|
220
|
+
required: true
|
|
221
|
+
content:
|
|
222
|
+
application/json:
|
|
223
|
+
schema:
|
|
224
|
+
type: object
|
|
225
|
+
properties:
|
|
226
|
+
amount:
|
|
227
|
+
type: number
|
|
228
|
+
example: 1500.0
|
|
229
|
+
responses:
|
|
230
|
+
200:
|
|
231
|
+
description: Budget entry updated successfully
|
|
232
|
+
content:
|
|
233
|
+
application/json:
|
|
234
|
+
schema:
|
|
235
|
+
type: object
|
|
236
|
+
properties:
|
|
237
|
+
id:
|
|
238
|
+
type: string
|
|
239
|
+
format: uuid
|
|
240
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
241
|
+
budget_id:
|
|
242
|
+
type: string
|
|
243
|
+
format: uuid
|
|
244
|
+
example: b24a6ea4-ce75-4665-a070-57453082c25
|
|
245
|
+
amount:
|
|
246
|
+
type: number
|
|
247
|
+
example: 1500.0
|
|
248
|
+
created_at:
|
|
249
|
+
type: string
|
|
250
|
+
format: date-time
|
|
251
|
+
example: "2024-01-15T10:30:00Z"
|
|
252
|
+
updated_at:
|
|
253
|
+
type: string
|
|
254
|
+
format: date-time
|
|
255
|
+
example: "2024-01-15T11:00:00Z"
|
|
256
|
+
400:
|
|
257
|
+
description: Invalid data format or validation error
|
|
258
|
+
"""
|
|
259
|
+
return super().put(instance_id)
|
|
260
|
+
|
|
261
|
+
@jwt_required()
|
|
262
|
+
def delete(self, instance_id):
|
|
263
|
+
"""
|
|
264
|
+
Delete budget entry
|
|
265
|
+
---
|
|
266
|
+
tags:
|
|
267
|
+
- Crud
|
|
268
|
+
description: Delete a budget entry by its ID. Returns empty
|
|
269
|
+
response on success.
|
|
270
|
+
parameters:
|
|
271
|
+
- in: path
|
|
272
|
+
name: instance_id
|
|
273
|
+
required: true
|
|
274
|
+
schema:
|
|
275
|
+
type: string
|
|
276
|
+
format: uuid
|
|
277
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
278
|
+
responses:
|
|
279
|
+
204:
|
|
280
|
+
description: Budget entry deleted successfully
|
|
281
|
+
400:
|
|
282
|
+
description: Integrity error or cannot delete
|
|
283
|
+
"""
|
|
284
|
+
return super().delete(instance_id)
|