models

package
v0.0.0-...-98dbde5 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 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 Order

type Order struct {
	OrderId    uint   `gorm:"primaryKey" json:"id,omitempty"`
	OrderName  string `json:"order_name"`
	UserId     int    `json:"user_id"`
	User       User   `json:"user"`
	Invoice    string `json:"invoice"`
	Address    string `json:"address"`
	Telphone   string `json:"telphone"`
	Amount     int    `json:"amount"`
	Price      int    `json:"price"`
	TotalPrice int    `json:"total_price"`
	Status     string `json:"status"`
}

type Orders

type Orders []Order

type User

type User struct {
	UserId    uint      `gorm:"primaryKey" json:"id,omitempty"`
	FullName  string    `json:"full_name,omitempty"`
	UserName  string    `json:"user_name,omitempty"`
	Email     string    `json:"email,omitempty" validate:"required"`
	Role      string    `json:"role,omitempty"`
	Password  string    `json:"Password,omitempty" validate:"required"`
	Address   string    `json:"address,omitempty"`
	Phone     string    `json:"phone,omitempty"`
	CreatedAt time.Time `gorm:"default:now(); not null" json:"created_at"`
	UpdatedAt time.Time `gorm:"default:now(); not null" json:"updated_at"`
}

type Users

type Users []User

Jump to

Keyboard shortcuts

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