# Path: m2core/data_schemes/db_system_scheme.py
# class CreatedMixin:
# class SortMixin:
# class M2PermissionCheckMixin:
# class M2Permission(BaseModel):
# class M2Role(BaseModel):
# class M2RolePermission(BaseModel):
# class M2UserMixin:
# class M2UserRole(BaseModel):
#     def can(self, permission_rule: Permission) -> bool:
#     def enum_member(self):
#     def from_enum_member(cls, member: Permission):
#     def get_role_permissions(self) -> List[str]:
#     def dump_role_permissions(self):
#     def set_permissions(self, permissions: list):
#     def add_permission(self, permission_system_name: str):


from sqlalchemy import Column, BigInteger, Integer, String, func
from m2core.data_schemes.db_system_scheme import M2UserRole, M2Role, M2Error, BaseModel, CreatedMixin
import bcrypt


class User(BaseModel, CreatedMixin):
    id = Column(BigInteger, primary_key=True)
    email = Column(String(100), nullable=False, unique=True)
    password = Column(String(255))

# Path: m2core/data_schemes/db_system_scheme.py
# class CreatedMixin:
# class SortMixin:
# class M2PermissionCheckMixin:
# class M2Permission(BaseModel):
# class M2Role(BaseModel):
# class M2RolePermission(BaseModel):
# class M2UserMixin:
# class M2UserRole(BaseModel):
#     def can(self, permission_rule: Permission) -> bool:
#     def enum_member(self):
#     def from_enum_member(cls, member: Permission):
#     def get_role_permissions(self) -> List[str]:
#     def dump_role_permissions(self):
#     def set_permissions(self, permissions: list):
#     def add_permission(self, permission_system_name: str):


# Path: example/models/users.py
from sqlalchemy import Column, BigInteger, Integer, String, func
from m2core.data_schemes.db_system_scheme import M2UserRole, M2Role, M2Error, BaseModel, CreatedMixin
import bcrypt



class User(BaseModel, CreatedMixin):
    id = Column(BigInteger, primary_key=True)
    email = Column(String(100), nullable=False, unique=True)
    password = Column(String(255))

    name = Column(String(255), info={'custom_param_for_json_scheme_1': '11111', 'custom_param_for_json_scheme_2': True})