You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
313 B
9 lines
313 B
1 month ago
|
# models.py
|
||
|
from flask_sqlalchemy import SQLAlchemy
|
||
|
|
||
|
db = SQLAlchemy()
|
||
|
|
||
|
class User(db.Model):
|
||
|
id = db.Column(db.Integer, primary_key=True)
|
||
|
username = db.Column(db.String(80), unique=True, nullable=False)
|
||
|
role = db.Column(db.String(20), nullable=False) # 角色字段,例如 '指挥者' 或 '成员'
|