update pay ui
This commit is contained in:
32
app_vx.py
32
app_vx.py
@@ -7296,38 +7296,6 @@ def api_user_activities():
|
||||
}), 500
|
||||
|
||||
|
||||
class UserFeedback(db.Model):
|
||||
"""用户反馈模型"""
|
||||
id = db.Column(db.Integer, primary_key=True)
|
||||
user_id = db.Column(db.Integer, db.ForeignKey('user.id'), nullable=False)
|
||||
type = db.Column(db.String(50), nullable=False) # 反馈类型
|
||||
content = db.Column(db.Text, nullable=False) # 反馈内容
|
||||
contact_info = db.Column(db.String(100)) # 联系方式
|
||||
status = db.Column(db.String(20), default='pending') # 状态:pending/processing/resolved/closed
|
||||
admin_reply = db.Column(db.Text) # 管理员回复
|
||||
created_at = db.Column(db.DateTime, default=beijing_now)
|
||||
updated_at = db.Column(db.DateTime, default=beijing_now, onupdate=beijing_now)
|
||||
|
||||
# 关联关系
|
||||
user = db.relationship('User', backref='feedbacks')
|
||||
|
||||
def __init__(self, user_id, type, content, contact_info=None):
|
||||
self.user_id = user_id
|
||||
self.type = type
|
||||
self.content = content
|
||||
self.contact_info = contact_info
|
||||
|
||||
def to_dict(self):
|
||||
return {
|
||||
'id': self.id,
|
||||
'type': self.type,
|
||||
'content': self.content,
|
||||
'contact_info': self.contact_info,
|
||||
'status': self.status,
|
||||
'admin_reply': self.admin_reply,
|
||||
'created_at': self.created_at.strftime('%Y-%m-%d %H:%M:%S'),
|
||||
'updated_at': self.updated_at.strftime('%Y-%m-%d %H:%M:%S')
|
||||
}
|
||||
|
||||
|
||||
# 通用错误处理
|
||||
|
||||
Reference in New Issue
Block a user