model

package
v0.0.0-...-e7c3345 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: MulanPSL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddUser

type AddUser struct {
	Nickname   string `json:"nickname" binding:"required"`
	Username   string `json:"username" binding:"required"`
	Password   string `json:"password" binding:"required"`
	RePassword string `json:"re_password" binding:"required"`
	Phone      string `json:"phone" binding:"required"`
}

AddUser 添加用户

type Demo

type Demo struct {
	Id            int    `xorm:"pk autoincr not null int(11) 'id'" json:"id"`
	Title         string `xorm:"not null comment('名称') varchar(200) 'title'" json:"title"`
	Pic           string `xorm:"default '' comment('店内照片') varchar(900) 'pic'" json:"pic"`
	ProvCode      int    `xorm:"not null comment('省份id') int(11) 'prov_code'" json:"provCode"`
	CityCode      int    `xorm:"not null comment('城市id') int(11) 'city_code'" json:"cityCode"`
	Address       string `xorm:"not null comment('详细地址') varchar(200) 'address'" json:"address"`
	Notice        string `xorm:"comment('公告') text 'notice'" json:"notice"`
	HeadName      string `xorm:"not null comment('负责人名称') varchar(10) 'head_name'" json:"headName"`
	HeadPhone     string `xorm:"not null comment('负责人手机号') char(11) 'head_phone'" json:"headPhone"`
	StaffName     string `xorm:"default '' comment('员工名称') varchar(10) 'staff_name'" json:"staffName"`
	StaffPhone    string `xorm:"default '' comment('员工手机号') char(11) 'staff_phone'" json:"staffPhone"`
	IsStart       int    `xorm:"default 1 comment('是否营业(正常1  关闭2)') tinyint(1) 'is_start'" json:"isStart"`
	WorkTime      int    `xorm:"default 1 comment('营业时间(早1  中2  晚3)') tinyint(1) 'work_time'" json:"workTime"`
	OrderPhone    string `xorm:"default '' comment('接单电话') char(11) 'order_phone'" json:"orderPhone"`
	DisType       int    `xorm:"default 1 comment('配送费类型(免费1  份2  单3)') tinyint(1) 'dis_type'" json:"disType"`
	DisPrice      int    `xorm:"default 0 comment('配送费金额') int(11) 'dis_price'" json:"disPrice"`
	MealboxPrice  int    `xorm:"default 0 comment('餐盒费') int(11) 'mealbox_price'" json:"mealboxPrice"`
	ReserveStatus int    `xorm:"default 1 comment('预定功能(开启1  关闭2)') tinyint(1) 'reserve_status'" json:"reserveStatus"`
	IsFrozen      int    `xorm:"default 1 comment('是否冻结账户(开启1  冻结2)') tinyint(1) 'is_frozen'" json:"isFrozen"`
	Commission    string `xorm:"comment('抽佣规则') text 'commission'" json:"commission"`
	CreateTime    int    `xorm:"default NULL int(10) 'create_time' created" json:"createTime"`
	UpdateTime    int    `xorm:"default NULL int(10) 'update_time' updated" json:"updateTime"`
	DeleteTime    int    `xorm:"default NULL int(10) 'delete_time' deleted" json:"deleteTime"`
	UpdateUid     int    `xorm:"default 0 int(11) 'update_uid'" json:"updateUid"`
}

Demo demo表

type DemoListModel

type DemoListModel struct {
	Name string `json:"name"`
}

type DemoModel

type DemoModel struct {
	Name string `json:"name"`
}

type DemoSearchModel

type DemoSearchModel struct {
	Name string `json:"name"`
}

type DetailUser

type DetailUser struct {
	Id         int        `json:"id"`
	Nickname   string     `json:"nickname"`
	Username   string     `json:"username"`
	Phone      string     `json:"phone"`
	CreateTime jsonl.Time `json:"create_time"`
}

DetailUser 用户信息

type LoginUser

type LoginUser struct {
	Username string `json:"username" binding:"required"`
	Password string `json:"password" binding:"required"`
}

LoginUser 用户登录

type SearchUser

type SearchUser struct {
	Page            int        `json:"page" binding:"required"`
	Limit           int        `json:"limit" binding:"required"`
	CreateTimeStart jsonl.Time `json:"create_time_start"`
	CreateTimeEnd   jsonl.Time `json:"create_time_end"`
}

UserList 用户列表

type Token

type Token struct {
	Id             int         `json:"id" xorm:"pk autoincr unsigned not null int(11) 'id'"`
	Uid            int         `json:"uid" xorm:"default 0 not null int(11) 'uid'"`
	Token          string      `json:"token" xorm:"unique not null varchar(50) 'token'"`
	ExpirationTime int         `json:"expiration_time" xorm:"not null comment('过期时间') int(11) 'expiration_time'"`
	CreateTime     jsonl.Time  `json:"create_time" xorm:"default '0000-00-00 00:00:00' comment('创建时间') datetime 'create_time' created"`
	UpdateTime     jsonl.Time  `json:"-" xorm:"default '0000-00-00 00:00:00' comment('修改时间') datetime 'update_time' updated"`
	DeleteTime     *jsonl.Time `json:"-" xorm:"default '0000-00-00 00:00:00' comment('删除时间') datetime 'delete_time' deleted"`
	LastUpdateId   string      `json:"-" xorm:"default '' comment('最后修改用户标识') varchar(50) 'last_update_id'"`
}

func (*Token) TableComment

func (th *Token) TableComment() string

TableComment 设置表注释

type UpdateUser

type UpdateUser struct {
	Nickname   string     `json:"nickname"`
	Password   string     `json:"password"`
	Phone      string     `json:"phone"`
	UpdateTime jsonl.Time `json:"-" xorm:"default '0000-00-00 00:00:00' comment('修改时间') datetime 'update_time' updated"`
}

UpdateUser 修改用户

type User

type User struct {
	Id           int         `json:"id" xorm:"pk autoincr unsigned not null int(11) 'id'"`
	Nickname     string      `json:"nickname" xorm:"default '' not null comment('昵称') varchar(50) 'nickname'"`
	Username     string      `json:"username" xorm:"default '' not null comment('账号') varchar(50) 'username'"`
	Password     string      `json:"password" xorm:"default '' not null comment('密码') varchar(100) 'password'"`
	Phone        string      `json:"phone" xorm:"default '' comment('电话号') char(11) 'phone'"`
	CreateTime   jsonl.Time  `json:"create_time" xorm:"default '0000-00-00 00:00:00' comment('创建时间') datetime 'create_time' created"`
	UpdateTime   jsonl.Time  `json:"-" xorm:"default '0000-00-00 00:00:00' comment('修改时间') datetime 'update_time' updated"`
	DeleteTime   *jsonl.Time `json:"-" xorm:"default '0000-00-00 00:00:00' comment('删除时间') datetime 'delete_time' deleted"`
	LastUpdateId string      `json:"-" xorm:"default '' comment('最后修改用户标识') varchar(50) 'last_update_id'"`
}

func (*User) TableComment

func (th *User) TableComment() string

TableComment 设置表注释

Jump to

Keyboard shortcuts

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