class DelphiModel(db.Model, Serializable): __tablename__ = "delphimodel" id = db.Column(db.String, primary_key=True) icm_metadata = db.relationship( "ICMMetadata", backref="delphimodel", lazy=True, uselist=False ) model = db.Column(db.PickleType)
class ICMMetadata(db.Model, Serializable): """ Placeholder docstring for class ICMMetadata. """ __tablename__ = "icmmetadata" id = db.Column(db.String, primary_key=True, default=str(uuid4())) icmProvider = db.Column( db.Enum("BAE", "BBN", "STR", "DUMMY"), nullable=True ) title = db.Column(db.String, nullable=True) version = db.Column(db.Integer, nullable=True) created = db.Column(db.String, nullable=True) createdByUser_id = db.Column( db.Integer, db.ForeignKey("user.id"), nullable=True ) createdByUser = db.relationship("User", foreign_keys=[createdByUser_id]) lastAccessed = db.Column(db.String, nullable=True) lastAccessedByUser_id = db.Column( db.Integer, db.ForeignKey("user.id"), nullable=True ) lastAccessedByUser = db.relationship( "User", foreign_keys=[lastAccessedByUser_id] ) lastUpdated = db.Column(db.String, nullable=True) lastUpdatedByUser_id = db.Column( db.Integer, db.ForeignKey("user.id"), nullable=True ) lastUpdatedByUser = db.relationship( "User", foreign_keys=[lastUpdatedByUser_id] ) estimatedNumberOfPrimitives = db.Column(db.Integer, nullable=True) lifecycleState = db.Column( db.Enum( "PROPOSED", "APPROVED", "EXPERIMENTAL", "OPERATIONAL", "SUSPENDED", "ARCHIVED", "CREATED", ), nullable=True, ) derivation = db.Column(JsonEncodedList, nullable=True) model_id = db.Column(db.String, db.ForeignKey("delphimodel.id")) __mapper_args__ = {"polymorphic_identity": "ICMMetadata"}