model

package
v1.20.8 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: MIT Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const TableNameUserAddress = "user_address"
View Source
const TableNameUserInfo = "user_info"
View Source
const TableNameUserWx = "user_wx"

Variables

This section is empty.

Functions

This section is empty.

Types

type UserAddress

type UserAddress struct {
	*v.Model
	UserID    uint   `json:"userId"`    // 用户ID
	Contact   string `json:"contact"`   // 联系人
	Phone     string `json:"phone"`     // 手机号
	Province  string `json:"province"`  // 省
	City      string `json:"city"`      // 市
	District  string `json:"district"`  // 区
	Address   string `json:"address"`   // 地址
	IsDefault bool   `json:"isDefault"` // 是否默认
}

UserAddress 收货地址(参照 cool-admin-midway user 模块 UserAddressEntity)

func NewUserAddress

func NewUserAddress() *UserAddress

NewUserAddress 创建一个 UserAddress 模型实例

func (*UserAddress) TableName

func (*UserAddress) TableName() string

TableName UserAddress 的表名

type UserInfo

type UserInfo struct {
	*v.Model
	Unionid     *string `json:"unionid"`     // 登录唯一ID
	AvatarUrl   *string `json:"avatarUrl"`   // 头像
	NickName    *string `json:"nickName"`    // 昵称
	Phone       *string `json:"phone"`       // 手机号
	Gender      int     `json:"gender"`      // 性别 0-未知 1-男 2-女
	Status      int     `json:"status"`      // 状态 0-禁用 1-正常 2-已注销
	LoginType   int     `json:"loginType"`   // 登录方式 0-小程序 1-公众号 2-H5
	Password    *string `json:"password"`    // 密码
	Description *string `json:"description"` // 介绍
}

UserInfo 用户信息(参照 cool-admin-midway user 模块 UserInfoEntity)

func NewUserInfo

func NewUserInfo() *UserInfo

NewUserInfo 创建一个 UserInfo 模型实例

func (*UserInfo) TableName

func (*UserInfo) TableName() string

TableName UserInfo 的表名

type UserWx

type UserWx struct {
	*v.Model
	Unionid   *string `json:"unionid"`   // 微信unionid
	Openid    string  `json:"openid"`    // 微信openid
	AvatarUrl *string `json:"avatarUrl"` // 头像
	NickName  *string `json:"nickName"`  // 昵称
	Gender    int     `json:"gender"`    // 性别 0-未知 1-男 2-女
	Language  *string `json:"language"`  // 语言
	City      *string `json:"city"`      // 城市
	Province  *string `json:"province"`  // 省份
	Country   *string `json:"country"`   // 国家
	Type      int     `json:"type"`      // 类型 0-小程序 1-公众号 2-H5 3-APP
}

UserWx 微信用户(参照 cool-admin-midway user 模块 UserWxEntity)

func NewUserWx

func NewUserWx() *UserWx

NewUserWx 创建一个 UserWx 模型实例

func (*UserWx) TableName

func (*UserWx) TableName() string

TableName UserWx 的表名

Jump to

Keyboard shortcuts

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