Data Architecture & Database Schema
Centralized data management with 14 core tables · MariaDB 10.4+ · ACID compliance
nurses_users (id, persal_number, surname, name, district, position_id, department_id, is_supervisor, is_active)
uniform_orders (id, user_id, order_date, status, approved_by, approved_date, total_amount)
uniform_catalogue (id, category, item_name, price, sizes, max_quantity_per_order)
order_items (id, order_id, uniform_id, size, quantity, price, subtotal)
admin_users (id, username, password, email, full_name, role, district, is_active)
admin_audit_log (id, admin_id, action, description, ip_address, user_agent, created_at)
🔑 PK🔗 FKCentralized · Single source of truthIndexed for reporting
Process Flows
Registration & Activation Register → Validate → Pending → Activate → Active
|
Order & Approval Order → Pending → Review → Approve/Reject → Re-open → Approved/Delivered
✅ Order Pending
🔄 Review
⬆️ Approve
⬇️ Reject