20 lines
680 B
Python
20 lines
680 B
Python
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
|
|
}
|