first push
This commit is contained in:
19
backend/models/TrainingProjectDetails.py
Normal file
19
backend/models/TrainingProjectDetails.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from database.database import db
|
||||
|
||||
class TrainingProjectDetails(db.Model):
|
||||
__tablename__ = 'training_project_details'
|
||||
|
||||
id = db.Column(db.Integer, primary_key=True, unique=True, autoincrement=True)
|
||||
project_id = db.Column(db.Integer, nullable=False, unique=True)
|
||||
annotation_projects = db.Column(db.JSON, nullable=False)
|
||||
class_map = db.Column(db.JSON)
|
||||
description = db.Column(db.JSON)
|
||||
|
||||
def to_dict(self):
|
||||
return {
|
||||
'id': self.id,
|
||||
'project_id': self.project_id,
|
||||
'annotation_projects': self.annotation_projects,
|
||||
'class_map': self.class_map,
|
||||
'description': self.description
|
||||
}
|
||||
Reference in New Issue
Block a user