self-generated, convex styled prefixed id for all tables
This commit is contained in:
+2
-4
@@ -1,13 +1,11 @@
|
||||
from sqlalchemy import Column, DateTime, String
|
||||
from sqlalchemy.sql import func
|
||||
|
||||
from .base import Base, gen_uuid
|
||||
from .base import AutoID, Base
|
||||
|
||||
class User(Base):
|
||||
class User(Base, AutoID):
|
||||
__tablename__ = "users"
|
||||
|
||||
id = Column(String, primary_key=True, default=gen_uuid)
|
||||
|
||||
google_id = Column(String, unique=True, index=True)
|
||||
email = Column(String, unique=True, index=True)
|
||||
name = Column(String)
|
||||
|
||||
Reference in New Issue
Block a user