model

package
v0.0.0-...-0874fcc Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	gorm.Model
	UserId uint `gorm:"index;unique" `
	// Users     Users
	HouseName string `json:"house_name" validate:"required"`
	Street    string `json:"street" validate:"required"`
	City      string `json:"city" validate:"required"`
	State     string `json:"state" validate:"required"`
	Pin       string `json:"pin" validate:"required"`
}

type Admin

type Admin struct {
	gorm.Model

	Username string `json:"username" validate:"required"`
	Email    string `json:"email" validate:"required,email"`
	Password string `json:"password" validate:"required"`

	Refresh string `json:"refresh"`
}

type Cart

type Cart struct {
	gorm.Model
	CartID    int `gorm:"auto_increment"`
	UserId    string
	ProductId uint
	Quantity  int
	Image     string
	Price     float64
	Total     float64
}

type CartTotal

type CartTotal struct {
	gorm.Model
	CartID int     `json:"-"`
	Total  float64 `json:"-"`
}

type Combine

type Combine struct {
	UserId       int
	Name         string
	Username     string
	Phone        string
	Mail         string
	Verification bool
	Housename    string
	Street       string
	City         string
	Pin          string
	State        string
}

type CombinedProductInfo

type CombinedProductInfo struct {
	ID              int     `json:"id"`
	ProductCategory string  `json:"pro_category"`
	ProductName     string  `json:"pro_name"`
	Price           float64 `json:"price"`
	ImageOne        string  `json:"img_one"`
	ImageTwo        string  `json:"img_two"`
	ImageThree      string  `json:"img_three"`
}

type Extractaddress

type Extractaddress struct {
	UserID    uint
	Housename string
	Street    string
	City      string
	Pin       string
	State     string
}

type Invoice

type Invoice struct {
	OrderId     string
	ProductName string

	Quantity string
	Price    string
	Total    string
	Name     string
	Phone    string
}

type OTP

type OTP struct {
	OTP string `json:"otp"`
}

type Order

type Order struct {
	gorm.Model

	OrderId string `json:"order_id" gorm:"primary_key;unique;not null"`
	UserID  uint   `gorm:"not null" json:"user_id"`

	ProductID uint `json:"product_id"`

	AddressID uint `json:"address_id"`

	Quantity int     `json:"quantity"`
	Price    float64 `json:"price"`

	Total           float64
	ShippmentStatus string `json:"status"`

	Aprovel bool `json:"approvel"`
}

type OrderRespAdmin

type OrderRespAdmin struct {
	OrderID       uint   `json:"order_id"`
	UserID        uint   `json:"user_id"`
	ProductID     uint   `json:"product_id"`
	Quantity      int    `json:"quantity"`
	Price         int    `json:"price"`
	Status        string `json:"status"`
	PaymentStatus bool   `json:"payment_status"`
}

type PersonalInformation

type PersonalInformation struct {
	UserId       int
	Name         string
	Username     string
	Phone        string
	Mail         string
	Verification bool
}

type ProductImage

type ProductImage struct {
	gorm.Model
	ProductId uint   `json:"product_id"`
	ImageOne  string `json:"img_one"`
	ImgTwo    string `json:"img_two"`
	ImgThree  string `json:"img_three"`
}

type ProductImageInfo

type ProductImageInfo struct {
	ProductId  int
	ImageOne   string
	ImageTwo   string
	ImageThree string
}

type ProductInfo

type ProductInfo struct {
	ID              int
	ProductCategory string
	ProductName     string
	Price           float64
}

type Products

type Products struct {
	gorm.Model
	Product_Category string  `json:"pro_category"`
	Product_Name     string  `json:"pro_name"`
	Price            float64 `json:"price"`
}

type UserInfo

type UserInfo struct {
	Name        string
	Username    string
	Email       string
	Password    string
	Phone       string
	CountryCode string
	Verified    bool

	HouseName string
	Street    string
	City      string
	State     string
	Pin       string
}

type Users

type Users struct {
	gorm.Model

	Name        string `json:"name" validate:"required"`
	Username    string `json:"username"  gorm:"index;unique" validate:"required"`
	Email       string `json:"email" validate:"required,email" `
	Password    string `json:"password" validate:"required" `
	Phone       string `json:"phone" validate:"required"`
	CountryCode string `json:"country_code" validate:"required"`
	Verified    bool
	OTP         string
	Status      bool   `json:"status"`
	Blocked     bool   `json:"block_status"`
	Refresh     string `json:"refresh"`
}

Jump to

Keyboard shortcuts

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