49c813778b
- Restructure table models - Remove React/Next.js frontend (in favor of HTMX)
63 lines
1.5 KiB
Python
63 lines
1.5 KiB
Python
from sqlmodel import SQLModel
|
|
from enum import Enum
|
|
|
|
class UserRole(str, Enum):
|
|
"""User roles for system access.
|
|
|
|
Attributes:
|
|
ADMIN (str): Administrator with full access.
|
|
WRITE (str): User with write permissions.
|
|
READ_ONLY (str): User with read-only permissions.
|
|
"""
|
|
ADMIN = "admin"
|
|
WRITE = "write"
|
|
READ_ONLY = "read_only"
|
|
|
|
class TransactionType(str, Enum):
|
|
"""Types of financial transactions.
|
|
|
|
Attributes:
|
|
SALE (str): Sale transaction.
|
|
PURCHASE (str): Purchase transaction.
|
|
CREDIT (str): Credit transaction.
|
|
"""
|
|
SALE = "sell"
|
|
PURCHASE = "buy"
|
|
CREDIT = "credit"
|
|
|
|
class TransactionStatus(str, Enum):
|
|
"""Possible statuses of a transaction.
|
|
|
|
Attributes:
|
|
UNPAID (str): Transaction not paid.
|
|
PARTIALLY_PAID (str): Transaction partially paid.
|
|
PAID (str): Transaction fully paid.
|
|
CANCELLED (str): Transaction cancelled.
|
|
"""
|
|
UNPAID = "unpaid"
|
|
PARTIALLY_PAID = "partially_paid"
|
|
PAID = "paid"
|
|
CANCELLED = 'cancelled'
|
|
|
|
class PartnerType(str, Enum):
|
|
"""Types of business partners.
|
|
|
|
Attributes:
|
|
CLIENT (str): Client partner.
|
|
SUPPLIER (str): Supplier partner.
|
|
"""
|
|
CLIENT = "client"
|
|
SUPPLIER = "supplier"
|
|
|
|
class PaymentMethod(str, Enum):
|
|
"""Payment methods available.
|
|
|
|
Attributes:
|
|
MOMO (str): Mobile money.
|
|
BANK (str): Bank transfer.
|
|
CASH (str): Cash payment.
|
|
"""
|
|
MOMO = "momo"
|
|
BANK = "bank"
|
|
CASH = "cash"
|