models

package
v0.0.0-...-1b8c1d8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category struct {
	ID          primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
	Category_id string             `json:"category_id,omitempty" bson:"category_id,omitempty"`
	Title       string             `json:"title,omitempty" binding:"required" bson:"title,omitempty"`
	Image       string             `json:"image,omitempty" bson:"image,omitempty"`
	CreatedAt   time.Time          `json:"created_at,omitempty" bson:"created_at,omitempty"`
	UpdatedAt   time.Time          `json:"updated_at,omitempty" bson:"updated_at,omitempty"`
}

type Food

type Food struct {
	ID          primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
	Name        string             `json:"name" binding:"required" bson:"name"`
	Description string             `json:"description" binding:"required" bson:"description"`
	Price       float64            `json:"price" binding:"required" bson:"price"`
	Image       string             `json:"image" binding:"required" bson:"image"`
	Food_id     string             `json:"food_id"  bson:"food_id"`
	Menu_id     string             `json:"menu_id" binding:"required" bson:"menu_id"`
	CreatedAt   time.Time          `json:"created_at,omitempty" bson:"created_at,omitempty"`
	UpdatedAt   time.Time          `json:"updated_at,omitempty" bson:"updated_at,omitempty"`
}

type Invoice

type Invoice struct {
	ID               primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
	Invoice_id       string             `json:"invoice_id" binding:"required" bson:"invoice_id"`
	Order_id         string             `json:"order_id" binding:"required" bson:"order_id"`
	Payment_method   string             `json:"payment_method" binding:"required" validate:"eq=CARD|eq=CASH|eq=" bson:"payment_method"`
	Payment_status   string             `json:"payment_status" binding:"required" bson:"payment_status"`
	Payment_due_date time.Time          `json:"payment_due_date" binding:"required" bson:"payment_due_date"`
	Total_amount     float64            `json:"total_amount" binding:"required" bson:"total_amount"`
	CreatedAt        time.Time          `json:"created_at,omitempty" bson:"created_at,omitempty"`
	UpdatedAt        time.Time          `json:"updated_at,omitempty" bson:"updated_at,omitempty"`
}
type Menu struct {
	ID          primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
	Name        string             `json:"name" binding:"required" bson:"name"`
	Description string             `json:"description" binding:"required" bson:"description"`
	Start_Date  time.Time          `json:"start_date" binding:"required" bson:"start_date"`
	End_Date    time.Time          `json:"end_date" binding:"required" bson:"end_date"`
	Menu_id     string             `json:"menu_id" binding:"required" bson:"menu_id"`
	CreatedAt   time.Time          `json:"created_at,omitempty" bson:"created_at,omitempty"`
	UpdatedAt   time.Time          `json:"updated_at,omitempty" bson:"updated_at,omitempty"`
}

type Order

type Order struct {
	ID           primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
	Order_id     string             `json:"order_id"  bson:"order_id"`
	Table_id     string             `json:"table_id" binding:"required" bson:"table_id"`
	Order_status string             `json:"order_status" binding:"required" bson:"order_status"`
	Order_date   time.Time          `json:"order_date" bson:"order_date"`
	Total_amount float64            `json:"total_amount" binding:"required" bson:"total_amount"`
	CreatedAt    time.Time          `json:"created_at,omitempty" bson:"created_at,omitempty"`
	UpdatedAt    time.Time          `json:"updated_at,omitempty" bson:"updated_at,omitempty"`
}

type OrderItem

type OrderItem struct {
	ID            primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
	Food_id       string             `json:"food_id" binding:"required" bson:"food_id"`
	Order_id      string             `json:"order_id" binding:"required" bson:"order_id"`
	Order_item_id string             `json:"order_item_id" bson:"order_item_id"`
	Quantity      string             `json:"quantity" binding:"required" validate:"eq=S|eq=M|eq=L" bson:"quantity"`
	Total_amount  float64            `json:"total_amount" binding:"required" bson:"total_amount"`
	CreatedAt     time.Time          `json:"created_at,omitempty" bson:"created_at,omitempty"`
	UpdatedAt     time.Time          `json:"updated_at,omitempty" bson:"updated_at,omitempty"`
}

type Restaurant

type Restaurant struct {
	ID            primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
	Restaurant_id string             `json:"restaurant_id" binding:"required" bson:"restaurant_id"`
	Title         string             `json:"title" binding:"required" bson:"title"`
	Image         string             `json:"image" binding:"required" bson:"image"`
	Time          string             `json:"time" binding:"required" bson:"time"`
	Pickup        bool               `json:"pickup" binding:"required" bson:"pickup"`
	Delivery      bool               `json:"delivery" binding:"required" bson:"delivery"`
	CreatedAt     time.Time          `json:"created_at,omitempty" bson:"created_at,omitempty"`
	UpdatedAt     time.Time          `json:"updated_at,omitempty" bson:"updated_at,omitempty"`
	Rating        float64            `json:"rating" binding:"required" bson:"rating"`
	RatingCount   int                `json:"ratingCount" binding:"required" bson:"ratingCount"`
	Menu          []Menu             `json:"menu" binding:"required" bson:"menu"`
}

type Table

type Table struct {
	ID               primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
	Number_of_guests int                `json:"number_of_guests" binding:"required" bson:"number_of_guests"`
	Table_id         string             `json:"table_id" binding:"required" bson:"table_id"`
	Table_number     int                `json:"table_number" binding:"required" bson:"table_number"`
	Table_status     string             `json:"table_status" binding:"required" bson:"table_status"`
	CreatedAt        time.Time          `json:"created_at,omitempty" bson:"created_at,omitempty"`
	UpdatedAt        time.Time          `json:"updated_at,omitempty" bson:"updated_at,omitempty"`
}

type User

type User struct {
	ID           primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
	First_name   string             `json:"first_name" binding:"required" bson:"first_name"`
	Last_name    string             `json:"last_name" binding:"required" bson:"last_name"`
	Email        string             `json:"email" binding:"required" bson:"email"`
	Password     string             `json:"password" binding:"required" bson:"password"`
	Avatar       string             `json:"avatar" bson:"avatar"`
	Phone        string             `json:"phone" binding:"required" bson:"phone"`
	Role         string             `json:"role" validate:"eq=Admin|eq=User" bson:"role"`
	CreatedAt    time.Time          `json:"created_at,omitempty" bson:"created_at,omitempty"`
	UpdatedAt    time.Time          `json:"updated_at,omitempty" bson:"updated_at,omitempty"`
	User_id      string             `json:"user_id" bson:"user_id"`
	Token        string             `json:"token,omitempty" bson:"token,omitempty"`
	RefreshToken string             `json:"refresh_token,omitempty" bson:"refresh_token,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL