Enums & Types
This document describes the enumeration types and constants used throughout the LuxMart API.
Role Types
User and store roles in the system.
| Value | Constant | Description |
|---|---|---|
"1" |
User | Regular customer |
"2" |
Admin | Administrator |
"3" |
Store | Merchant/store owner |
Language Types
Supported languages for user preferences and product translations.
| Value | Constant | Description |
|---|---|---|
"az" |
AZERBAIJANI | Azerbaijani |
"en" |
ENGLISH | English |
"es" |
SPANISH | Spanish |
"de" |
GERMAN | German |
Status Types
Product variant status values.
| Value | Constant | Description |
|---|---|---|
"1" |
Approved | Product is active and can be purchased |
"2" |
Reject | Product is rejected |
"3" |
Waiting | Product is pending approval |
"4" |
Expired | Product has expired |
Field Types
Attribute field types for product attributes.
| Value | Constant | Description |
|---|---|---|
"1" |
text | Text input field |
"2" |
select | Dropdown/select field |
"3" |
checkbox | Checkbox field |
"4" |
date | Date picker field |
Payment Types
Payment transaction status values.
| Value | Constant | Description |
|---|---|---|
"1" |
Not completed | Payment is pending |
"2" |
Success | Payment was successful |
"3" |
Failed | Payment failed |
Order Types
Order status values that track the order lifecycle.
Store-Managed Statuses
| Value | Constant | Description |
|---|---|---|
"1" |
Incoming | Order received by store |
"2" |
Packing | Order is being prepared |
"3" |
Ready For Admin | Order ready for shipping (transferred to admin) |
Admin-Managed Statuses
| Value | Constant | Description |
|---|---|---|
"4" |
Out For Delivery | Order has been shipped |
"5" |
Delivered | Order delivered to customer |
"6" |
Pickup Tasks | Order completed (pickup tasks done) |
Special Status
| Value | Constant | Description |
|---|---|---|
"7" |
Waiting | Order cancelled or awaiting payment |
Order Status Progression
Orders follow a specific status progression:
- Created:
status: "7",payment_status: "3"(awaiting payment) - Payment Success:
status: "1",payment_status: "1"(store receives order) - Store Processing:
"1"→"2"→"3"(store prepares order) - Admin Shipping:
"3"→"4"(admin ships order) - Delivery:
"4"→"5"→"6"(admin completes delivery)
Usage Notes
- Status values are stored as strings in the database
- Constants are used in Go code for type safety
- Status transitions are validated in the API
- Only certain status transitions are allowed (e.g., "1" → "2" → "3" for store orders)
- Status "7" (Waiting) is used for cancelled orders or orders awaiting payment