Skip to content

Handle audit fields in a reusable way. #18

@Angeluz-07

Description

@Angeluz-07

Currently we have audit fields repeated in several models. We need to make them reusable somehow. To solve we could use an abstraction, an utility of flask-restplus or using raw dicts.
e.g. :

# ./technologies_api.py

technology_response = ns.inherit('TechnologyResponse', technology, {
    'id': fields.String(...),
    'created_at': fields.Date(...),
    'created_by': fields.String(...),
    'tenant_id': fields.String(...),
})


# ./projects_api.py

project_response = ns.inherit('ProjectResponse', project, {
    'id': fields.String(...),
    'created_at': fields.Date(...),
    'tenant_id': fields.String(... ),
})

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions