Dev api 240111 (#377)

* feat(api): My subscription supports CIType sorting

* feat(api): db change
This commit is contained in:
pycook
2024-01-11 18:01:37 +08:00
committed by GitHub
parent 691051c254
commit 6e3f9478b3
7 changed files with 151 additions and 32 deletions

View File

@@ -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"