feat(db): update model to support JSON

This commit is contained in:
InfinityPacer
2024-09-30 03:07:33 +08:00
parent 7c643432ee
commit daadfcffd8
12 changed files with 20 additions and 39 deletions

View File

@@ -1,4 +1,4 @@
from sqlalchemy import Column, Integer, String, Sequence
from sqlalchemy import Column, Integer, String, Sequence, JSON
from sqlalchemy.orm import Session
from app.db import db_query, db_update, Base
@@ -12,7 +12,7 @@ class SystemConfig(Base):
# 主键
key = Column(String, index=True)
# 值
value = Column(String, nullable=True)
value = Column(JSON, nullable=True)
@staticmethod
@db_query