class ClauseEntityTypeMapping(db.Model): __tablename__ = 'clause_entity_type_mapping' id = db.Column(db.Integer, primary_key=True, autoincrement=True) clause_id = db.Column(db.Integer, db.ForeignKey('clause.id'), nullable=False, index=True) clause_uri = db.Column(db.String(255)) object_id = db.Column(db.Integer, index=True) object_uri = db.Column(db.String(255)) object_name = db.Column(db.String(255)) concept_id = db.Column(db.Integer, index=True) concept_uri = db.Column(db.String(255)) concept_name = db.Column(db.String(255)) description = db.Column(db.String(255)) condition = db.Column(db.String(255)) created_at = db.Column(db.TIMESTAMP, server_default=_text("CURRENT_TIMESTAMP"), default=db.func.now()) updated_at = db.Column( db.TIMESTAMP, server_default=_text("CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP"), default=db.func.now(), onupdate=db.func.now())
class AlgorithmMapping(db.Model): __tablename__ = 'algorithm_mapping' id = db.Column(db.Integer, primary_key=True, autoincrement=True) entity_type_uri = db.Column(db.String(255)) entity_type_id = db.Column(db.Integer, db.ForeignKey('entity_type.id'), index=True) algorithm = db.Column(db.String(255)) created_at = db.Column(db.TIMESTAMP, server_default=_text("CURRENT_TIMESTAMP"), default=db.func.now()) updated_at = db.Column( db.TIMESTAMP, server_default=_text("CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP"), default=db.func.now(), onupdate=db.func.now())
class Book(db.Model): __tablename__ = 'book' id = db.Column(db.Integer, primary_key=True, autoincrement=True) uri = db.Column(db.String(255), unique=True, index=True) public_time = db.Column(db.String(255)) public_org = db.Column(db.String(255)) description = db.Column(db.String(255)) field_id = db.Column(db.Integer, db.ForeignKey('field.id'), index=True) created_at = db.Column(db.TIMESTAMP, server_default=_text("CURRENT_TIMESTAMP"), default=db.func.now()) updated_at = db.Column( db.TIMESTAMP, server_default=_text("CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP"), default=db.func.now(), onupdate=db.func.now()) catalogs = db.relationship('Catalog', backref=db.backref('book', lazy='joined'), cascade='all, delete-orphan', lazy='select')
class PropertyType(db.Model): __tablename__ = 'property_type' id = db.Column(db.Integer, primary_key=True, autoincrement=True) uri = db.Column(db.String(255), nullable=False, index=True) display_name = db.Column(db.String(255), nullable=False) description = db.Column(db.String(255)) icon = db.Column(db.String(255)) field_type = db.Column(db.String(255)) is_entity = db.Column(db.SmallInteger, index=True, server_default=_text("'0'")) entity_type_id = db.Column(db.Integer, db.ForeignKey('entity_type.id'), nullable=False, index=True) created_at = db.Column(db.TIMESTAMP, server_default=_text("CURRENT_TIMESTAMP"), default=db.func.now()) updated_at = db.Column( db.TIMESTAMP, server_default=_text("CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP"), default=db.func.now(), onupdate=db.func.now())