Models
$3
| Field | Type | Description |
|-------------|---------------|----------------------------------------------------|
| id | Int | Primary key, auto-incremented. |
| username | String | Unique username, limited to 255 characters. |
| email | String | Unique email, limited to 255 characters. |
| mobile | String | Mobile number, limited to 255 characters. |
| password | String | Password, encrypted and limited to 255 characters. |
| role | Role | Role of the user, defaults to 'seller'. |
| createdAt | DateTime | Timestamp of creation, defaults to current time. |
| updatedAt | DateTime | Timestamp of the last update, automatically set. |
| deletedAt | DateTime? | Soft delete timestamp, nullable. |
| bannedAt | DateTime? | Soft ban timestamp, nullable. |
| confirmedAt | DateTime? | Account confirmation timestamp, nullable. |
| stores | Store[] | List of stores owned by the user. |
| access | UserOnStore[] | List of stores to which the user has access. |
$3
| Field | Type | Description |
|-----------------|---------------|--------------------------------------------------|
| id | Int | Primary key, auto-incremented. |
| name | String | Name of the store, limited to 255 characters. |
| slug | String | Unique slug for the store. |
| active | Boolean | Status of the store, defaults to 'false'. |
| paymentPerMonth | Int | Monthly payment amount, defaults to 7. |
| paymentHistory | DateTime[] | Array of payment timestamps, defaults to empty. |
| createdAt | DateTime | Timestamp of creation, defaults to current time. |
| updatedAt | DateTime | Timestamp of the last update, automatically set. |
| deletedAt | DateTime? | Soft delete timestamp, nullable. |
| bannedAt | DateTime? | Soft ban timestamp, nullable. |
| owner | User | Reference to the owner of the store. |
| ownerId | Int | Foreign key to the owner. |
| access | UserOnStore[] | List of users with access to the store. |
| products | Product[] | List of products in the store. |
| merchants | Merchant[] | List of merchants associated with the store. |
$3
| Field | Type | Description |
|---------|------------------|------------------------------------------------------|
| id | Int | Primary key, auto-incremented. |
| service | MerchantServices | Type of merchant service (e.g., wayforpay). |
| token | String | Encrypted token for authentication. |
| data | Json | JSON data related to the merchant. |
| store | Store | Reference to the store associated with the merchant. |
| storeId | Int | Foreign key to the store. |
$3
| Field | Type | Description |
|-----------------|---------------------|-----------------------------------------------------------|
| id | Int | Primary key, auto-incremented. |
| name | String | Name of the product, limited to 255 characters. |
| slug | String | Unique slug for the product. |
| description | String | Detailed description of the product. |
| metaTitle | String | Meta title for SEO, limited to 255 characters. |
| metaDescription | String | Meta description for SEO, limited to 255 characters. |
| price | Float | Price of the product. |
| priceCompare | Float? | Comparison price, nullable. |
| discount | Float? | Discount percentage, nullable. |
| draft | Boolean | Whether the product is in draft mode, defaults to 'true'. |
| weight | Int? | Weight of the product, nullable. |
| height | Int? | Height of the product, nullable. |
| width | Int? | Width of the product, nullable. |
| length | Int? | Length of the product, nullable. |
| createdAt | DateTime | Timestamp of creation, defaults to current time. |
| updatedAt | DateTime | Timestamp of the last update, automatically set. |
| deletedAt | DateTime? | Soft delete timestamp, nullable. |
| diactivatedAt | DateTime? | Soft deactivation timestamp, nullable. |
| store | Store | Reference to the store the product belongs to. |
| storeId | Int | Foreign key to the store. |
| categories | ProductOnCategory[] | Categories this product belongs to. |
| orders | Order[] | Orders associated with this product. |
$3
| Field | Type | Description |
|-----------------|---------------------|------------------------------------------------------|
| id | Int | Primary key, auto-incremented. |
| name | String | Name of the category, limited to 255 characters. |
| slug | String | Unique slug for the category. |
| description | String | Detailed description of the category. |
| metaTitle | String | Meta title for SEO, limited to 255 characters. |
| metaDescription | String | Meta description for SEO, limited to 255 characters. |
| createdAt | DateTime | Timestamp of creation, defaults to current time. |
| updatedAt | DateTime | Timestamp of the last update, automatically set. |
| deletedAt | DateTime? | Soft delete timestamp, nullable. |
| products | ProductOnCategory[] | Products associated with this category. |
$3
| Field | Type | Description |
|-----------|---------|------------------------------------------|
| id | Int | Primary key, auto-incremented. |
| shipping | String | Shipping details for the order. |
| message | String | Message or instructions, stored as text. |
| paid | Float | Amount paid for the order. |
| data | Json | JSON data associated with the order. |
| product | Product | Reference to the product in the order. |
| productId | Int | Foreign key to the product. |
$3
| Field | Type | Description |
|---------|-------|---------------------------|
| user | User | Reference to the user. |
| userId | Int | Foreign key to the user. |
| store | Store | Reference to the store. |
| storeId | Int | Foreign key to the store. |
$3
| Field | Type | Description |
|------------|----------|------------------------------|
| product | Product | Reference to the product. |
| productId | Int | Foreign key to the product. |
| category | Category | Reference to the category. |
| categoryId | Int | Foreign key to the category. |