first commit

This commit is contained in:
jianxin committed 2023-09-02 17:24:47 +08:00
commit 438535fe98
29 files changed
+927

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
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)