Shop Models Documentation
Shop Model Overview
The Shop model represents vendor shops, including details like contact information, location, images, and timestamps.
Shop Model
| Field Name |
Type |
Required |
Description |
vendor |
ForeignKey (Vendor) |
Yes |
Links to the Vendor model. Represents the shop owner. |
shop_name |
CharField (max_length=355) |
No |
The name of the shop. |
phone_number |
CharField (max_length=355) |
No |
Contact phone number for the shop. |
description |
TextField |
No |
Additional details about the shop. |
shop_location |
CharField (max_length=355) |
No |
Physical or virtual location of the shop. |
warehouse_location |
CharField (max_length=355) |
No |
Warehouse location of the shop. |
shop_image |
ImageField |
No |
The shop's main image. Supported formats: jpg, jpeg, png, gif, bmp, tiff, webp, svg. |
shop_cover_image |
ImageField |
No |
The shop's cover image. Supported formats: jpg, jpeg, png, gif, bmp, tiff, webp, svg. |
created_at |
DateTimeField |
No |
Timestamp indicating when the shop was created (auto). |
updated_at |
DateTimeField |
No |
Timestamp indicating when the shop information was last updated (auto). |
- Database Table Name:
tbl_shop_details
String Representation
- Returns
{vendor.company_name}
ShopFollowers Model
| Field Name |
Type |
Description |
shop |
ForeignKey |
Links to the Shop model. Represents the shop being followed. |
user |
ForeignKey |
Links to the User model. Represents the user following the shop. |
has_followed |
BooleanField |
Indicates if the user is currently following the shop. |
created_at |
DateTimeField |
Timestamp indicating when the follow action was initiated. |
updated_at |
DateTimeField |
Timestamp indicating when the follow information was last updated. |
ShopReviewsRatings Model
| Field Name |
Type |
Description |
shop |
ForeignKey |
Links to the Shop model. Represents the shop being reviewed. |
user |
ForeignKey |
Links to the User model. Represents the user providing the review. |
rating |
CharField |
The star rating given to the shop (1 to 5). |
review_text |
TextField |
The textual review of the shop. |
review_image1 |
ImageField |
The first image in the review. Supported formats: jpg, png, jpeg. |
review_image2 |
ImageField |
The second image in the review. Supported formats: jpg, png, jpeg. |
review_image3 |
ImageField |
The third image in the review. Supported formats: jpg, png, jpeg. |
review_image4 |
ImageField |
The fourth image in the review. Supported formats: jpg, png, jpeg. |
review_image5 |
ImageField |
The fifth image in the review. Supported formats: jpg, png, jpeg. |
review_video |
FileField |
A video review. Supported formats: mp4, mov, avi, mkv. |
created_at |
DateTimeField |
Timestamp indicating when the review was created. |
updated_at |
DateTimeField |
Timestamp indicating when the review information was last updated. |