Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Order ¶
type Order struct { ID primitive.ObjectID `json:"_id" bson:"_id"` Cart []ProductUser `json:"orderList" bson:"orderList"` OrderedAt time.Time `json:"orderedAt" bson:"orderedAt"` Price uint64 `json:"totalPrice" bson:"totalPrice"` Discount int64 `json:"discount" bson:"discount"` PaymentMethod Payment `json:"paymentMethod" bson:"paymentMethod"` }
type ProductUser ¶
type User ¶
type User struct { ID primitive.ObjectID `json:"_id" bson:"_id"` FirstName *string `json:"firstName" validate:"required,min=2,max=30"` LastName *string `json:"lastName" validate:"required,min=2,max=30"` Password *string `json:"password" validate:"required,min=6"` Email *string `json:"email" validate:"email, required"` Phone *string `json:"phone" validate:"required"` Token *string `json:"tokens"` RefreshToken *string `json:"refreshToken"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` UserID string `json:"userId"` UserCart []ProductUser `json:"userCart" bson:"userCart"` AddressDetails []Address `json:"address" bson:"address"` OrderStatus []Order `json:"orders" bson:"orders"` }
Click to show internal directories.
Click to hide internal directories.