feat: attributes in cards and projects
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
from schemas.attribute import AttributeSchema
|
||||
from schemas.base import BaseSchema, OkMessageSchema
|
||||
from schemas.module import ModuleSchema
|
||||
|
||||
|
||||
# region Entities
|
||||
@@ -10,6 +9,13 @@ class BaseProjectSchema(BaseSchema):
|
||||
name: str
|
||||
|
||||
|
||||
class ModuleSchema(BaseSchema):
|
||||
id: int
|
||||
key: str
|
||||
label: str
|
||||
is_deleted: bool
|
||||
|
||||
|
||||
class ProjectSchema(BaseProjectSchema):
|
||||
id: int
|
||||
attributes: list[AttributeSchema]
|
||||
@@ -32,6 +38,16 @@ class UpdateProjectRequest(BaseSchema):
|
||||
project: ProjectSchema
|
||||
|
||||
|
||||
class UpdateModulesRequest(BaseSchema):
|
||||
project_id: int
|
||||
module_ids: list[int]
|
||||
|
||||
|
||||
class UpdateAttributesRequest(BaseSchema):
|
||||
project_id: int
|
||||
attribute_ids: list[int]
|
||||
|
||||
|
||||
# endregion
|
||||
|
||||
|
||||
@@ -52,4 +68,16 @@ class UpdateProjectResponse(OkMessageSchema):
|
||||
class DeleteProjectResponse(OkMessageSchema):
|
||||
pass
|
||||
|
||||
|
||||
class GetAllModulesResponse(BaseSchema):
|
||||
modules: list[ModuleSchema]
|
||||
|
||||
|
||||
class UpdateModulesResponse(OkMessageSchema):
|
||||
pass
|
||||
|
||||
|
||||
class UpdateAttributesResponse(OkMessageSchema):
|
||||
pass
|
||||
|
||||
# endregion
|
||||
|
||||
Reference in New Issue
Block a user