model

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Code generated by gormgen. DO NOT EDIT.

Code generated by gormgen. DO NOT EDIT.

Code generated by gormgen. DO NOT EDIT.

Code generated by gormgen. DO NOT EDIT.

Index

Constants

View Source
const (
	OrderTableName = "orders"
)
View Source
const (
	UserTableName = "user"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Order

type Order struct {
	Id         int64     `gorm:"column:id;primary_key" json:"id"`      // 主键
	Name       string    `gorm:"column:name" json:"name"`              // 名称
	Price      float64   `gorm:"column:price" json:"price"`            // 订单价格
	CreateTime time.Time `gorm:"column:create_time" json:"createTime"` // 创建时间
	UpdateTime time.Time `gorm:"column:update_time" json:"updateTime"` // 更新时间
	Deleted    int       `gorm:"column:deleted" json:"deleted"`        // 删除状态,1表示软删除
}

Order table model

func (*Order) TableName

func (order *Order) TableName() string

type OrderOption

type OrderOption struct {
	// contains filtered or unexported fields
}

Kernel struct for table operation

func NewOrderOption

func NewOrderOption() *OrderOption

func (*OrderOption) BuildPage added in v0.2.0

func (opt *OrderOption) BuildPage(db *gorm.DB) *gorm.DB

func (*OrderOption) BuildQuery added in v0.2.0

func (opt *OrderOption) BuildQuery(db *gorm.DB) *gorm.DB

func (*OrderOption) OrderBy

func (opt *OrderOption) OrderBy(value string) *OrderOption

func (*OrderOption) Select added in v0.2.0

func (opt *OrderOption) Select(fields ...string) *OrderOption

func (*OrderOption) SetPage

func (opt *OrderOption) SetPage(pageNum, pageSize int) *OrderOption

func (*OrderOption) Where added in v0.2.0

func (opt *OrderOption) Where(query string, args ...interface{}) *OrderOption

type User

type User struct {
	Id         int64     `gorm:"column:id;primary_key" json:"id"`      // 用户id
	Nickname   string    `gorm:"column:nickname" json:"nickname"`      // 昵称
	Username   string    `gorm:"column:username" json:"username"`      // 用户名
	Password   string    `gorm:"column:password" json:"password"`      // 登录密码
	Salt       string    `gorm:"column:salt" json:"salt"`              // 随机盐
	Phone      string    `gorm:"column:phone" json:"phone"`            // 手机号
	Status     string    `gorm:"column:status" json:"status"`          // 状态:Y-启用;N-禁用
	CreateTime time.Time `gorm:"column:create_time" json:"createTime"` // 创建时间
	UpdateTime time.Time `gorm:"column:update_time" json:"updateTime"` // 更新时间
	Deleted    int       `gorm:"column:deleted" json:"deleted"`        // 逻辑删除:0-正常,1-删除
}

User table model

func (*User) TableName

func (user *User) TableName() string

type UserOption

type UserOption struct {
	// contains filtered or unexported fields
}

Kernel struct for table operation

func NewUserOption

func NewUserOption() *UserOption

func (*UserOption) BuildPage added in v0.2.0

func (opt *UserOption) BuildPage(db *gorm.DB) *gorm.DB

func (*UserOption) BuildQuery added in v0.2.0

func (opt *UserOption) BuildQuery(db *gorm.DB) *gorm.DB

func (*UserOption) OrderBy

func (opt *UserOption) OrderBy(value string) *UserOption

func (*UserOption) Select added in v0.2.0

func (opt *UserOption) Select(fields ...string) *UserOption

func (*UserOption) SetPage

func (opt *UserOption) SetPage(pageNum, pageSize int) *UserOption

func (*UserOption) Where added in v0.2.0

func (opt *UserOption) Where(query string, args ...interface{}) *UserOption

Jump to

Keyboard shortcuts

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