From 639aa4ecab53e3977bc83667e931a6650ffc867e Mon Sep 17 00:00:00 2001 From: pycook Date: Thu, 11 Jan 2024 18:00:40 +0800 Subject: [PATCH] feat(api): db change --- cmdb-api/api/models/cmdb.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cmdb-api/api/models/cmdb.py b/cmdb-api/api/models/cmdb.py index f91f585..1619ac1 100644 --- a/cmdb-api/api/models/cmdb.py +++ b/cmdb-api/api/models/cmdb.py @@ -2,7 +2,6 @@ import datetime - from sqlalchemy.dialects.mysql import DOUBLE from api.extensions import db @@ -464,6 +463,15 @@ class PreferenceSearchOption(Model): option = db.Column(db.JSON) +class PreferenceCITypeOrder(Model): + __tablename__ = "c_pcto" + + uid = db.Column(db.Integer, index=True, nullable=False) + type_id = db.Column(db.Integer, db.ForeignKey('c_ci_types.id')) + order = db.Column(db.SmallInteger, default=0) + is_tree = db.Column(db.Boolean, default=False) # True is tree view, False is resource view + + # custom class CustomDashboard(Model): __tablename__ = "c_c_d"