Dish_Recognition/models/App_settings.py

16 lines
443 B
Python

# coding=utf-8
"""应用键值配置(总服务器与本地缓存均可使用)。"""
from sqlalchemy import Column, String, Text
from dao.db import Base
class AppSetting(Base):
__tablename__ = 'app_settings'
key = Column(String(50), primary_key=True, nullable=False, comment='配置键')
value = Column(Text, nullable=False, comment='配置值')
def to_dict(self):
return {'key': self.key, 'value': self.value}