Major addition. User register, login and update is now functional on frontend, removed UUID5 for UUID4 for users and many more changes
This commit is contained in:
1 parent
d87c280109
commit
d0690f2f06
67 files changed
+3389
-1066
No files matched your search
@@ -4,7 +4,7 @@ from typing import Optional
|
||||
from uuid import UUID
|
||||
|
||||
from sqlalchemy import Column
|
||||
from sqlmodel import Enum, Field, Relationship, SQLModel
|
||||
from sqlmodel import Enum, Field, Relationship, SQLModel, UniqueConstraint
|
||||
|
||||
|
||||
class UserRole(PyEnum):
|
||||
@@ -17,6 +17,9 @@ class UserRole(PyEnum):
|
||||
|
||||
class User(SQLModel, table=True):
|
||||
__tablename__ = "user"
|
||||
__table_args__ = (
|
||||
UniqueConstraint("email", "shop_id", name="uix_email_shop_id"),
|
||||
)
|
||||
|
||||
id: int = Field(primary_key=True)
|
||||
uuid: UUID = Field(nullable=False, unique=True)
|
||||
|
||||
Reference in new issue
Block a user