- Backend: FastAPI app with all models, services, schemas, routes - Admin Panel: Next.js dashboard with all modules (CRM, POS, repairs, warranties, billing, notifications, etc.) - Ecommerce: storefront (submodule) + product catalog - AI Agents: .agents/ skill library for Antigravity IDE - Docs: architecture, billing, notification gateway markdown - Submodules: Backend/OpenWA, Ecommerce/File 2/storefront
16 lines
717 B
Python
16 lines
717 B
Python
from sqlalchemy import Column, String, Boolean, DateTime
|
|
from sqlalchemy.sql import func
|
|
from app.core.database.db_session import Base
|
|
|
|
class Role(Base):
|
|
__tablename__ = "roles"
|
|
|
|
role_id = Column(String(26), primary_key=True)
|
|
role_name = Column(String(50), unique=True, nullable=False)
|
|
role_prefix = Column(String(10), nullable=False) # e.g. 'TEC', 'SLS', 'ADM'
|
|
description = Column(String(255), nullable=True)
|
|
is_system = Column(Boolean, default=False)
|
|
is_active = Column(Boolean, default=True)
|
|
created_at = Column(DateTime, server_default=func.now())
|
|
updated_at = Column(DateTime, server_default=func.now(), onupdate=func.now())
|
|
deleted_at = Column(DateTime, nullable=True)
|