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,6 +1,6 @@
from datetime import datetime
from sqlalchemy import Column, Integer, String, Sequence, Float
from sqlalchemy import Column, Integer, String, Sequence, Float, JSON
from sqlalchemy.orm import Session
from app.db import db_query, Base
@@ -38,11 +38,11 @@ class SiteUserData(Base):
# 下载体积
leeching_size = Column(Float, default=0)
# 做种人数, 种子大小 JSON
seeding_info = Column(String)
seeding_info = Column(JSON)
# 未读消息
message_unread = Column(Integer, default=0)
# 未读消息内容 JSON
message_unread_contents = Column(String)
message_unread_contents = Column(JSON)
# 错误信息
err_msg = Column(String)
# 更新日期