model

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: Apache-2.0 Imports: 1 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表示软删除
}

Kernel struct for table model

func (*Order) FieldNames

func (order *Order) FieldNames() []string

func (*Order) GetValueByField

func (order *Order) GetValueByField(field string) interface{}

func (*Order) TableName

func (order *Order) TableName() string

Order Table name

type OrderOption

type OrderOption struct {
	Order  *Order
	Fields []string
	// contains filtered or unexported fields
}

Kernel struct for table operation

func NewOrderOption

func NewOrderOption(target *Order, fields ...string) *OrderOption

func NewOrderOptionAll

func NewOrderOptionAll(target *Order) *OrderOption

func (*OrderOption) GetOrderBy

func (opt *OrderOption) GetOrderBy() string

func (*OrderOption) GetPage

func (opt *OrderOption) GetPage() *OrderPage

func (*OrderOption) OrderBy

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

func (*OrderOption) SetPage

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

type OrderPage

type OrderPage struct {
	PageNum  int
	PageSize int
}

Kernel struct for table operation

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-删除
}

Kernel struct for table model

func (*User) FieldNames

func (user *User) FieldNames() []string

func (*User) GetValueByField

func (user *User) GetValueByField(field string) interface{}

func (*User) TableName

func (user *User) TableName() string

User Table name

type UserOption

type UserOption struct {
	User   *User
	Fields []string
	// contains filtered or unexported fields
}

Kernel struct for table operation

func NewUserOption

func NewUserOption(target *User, fields ...string) *UserOption

func NewUserOptionAll

func NewUserOptionAll(target *User) *UserOption

func (*UserOption) GetOrderBy

func (opt *UserOption) GetOrderBy() string

func (*UserOption) GetPage

func (opt *UserOption) GetPage() *UserPage

func (*UserOption) OrderBy

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

func (*UserOption) SetPage

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

type UserPage

type UserPage struct {
	PageNum  int
	PageSize int
}

Kernel struct for table operation

Jump to

Keyboard shortcuts

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