Files
wncloud/app/models/user.py
T
2023-09-02 17:26:38 +08:00

23 lines
566 B
Python

import uuid
from app.database import Base
from sqlalchemy import Column, Integer, String, Boolean, DateTime, ForeignKey
def gen_uuid():
return str(uuid.uuid4())
class User(Base):
__tablename__ = "user"
id = Column(Integer, primary_key=True, index=True)
uuid = Column(String(50), unique=True, default=gen_uuid)
username = Column(String(50), unique=True, index=True)
full_name = Column(String(50))
email = Column(String(50), unique=True, index=True)
hashed_password = Column(String(64))
deleted = Column(Integer, default=0)