model

package
v0.0.0-...-1742bff Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Code generated by goctl. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound        = mon.ErrNotFound
	ErrInvalidObjectId = errors.New("invalid objectId")
)
View Source
var ErrNotFound = sqlx.ErrNotFound

Functions

This section is empty.

Types

type OauthUserFans

type OauthUserFans struct {
	ID primitive.ObjectID `bson:"_id,omitempty" json:"id,omitempty"`
	// TODO: Fill your own fields
	UpdateAt time.Time `bson:"updateAt,omitempty" json:"updateAt,omitempty"`
	CreateAt time.Time `bson:"createAt,omitempty" json:"createAt,omitempty"`
}

type OauthUserFansModel

type OauthUserFansModel interface {
	// contains filtered or unexported methods
}

OauthUserFansModel is an interface to be customized, add more methods here, and implement the added methods in customOauthUserFansModel.

func NewOauthUserFansModel

func NewOauthUserFansModel(url, db, collection string) OauthUserFansModel

NewOauthUserFansModel returns a model for the mongo.

type User

type User struct {
	Id         int64          `db:"id"`          // 用户ID
	Username   string         `db:"username"`    // 用户账号
	Password   string         `db:"password"`    // 密码
	Nickname   string         `db:"nickname"`    // 用户昵称
	Remark     sql.NullString `db:"remark"`      // 备注
	DeptId     sql.NullInt64  `db:"dept_id"`     // 部门ID
	PostIds    sql.NullString `db:"post_ids"`    // 岗位编号数组
	Email      string         `db:"email"`       // 用户邮箱
	Mobile     string         `db:"mobile"`      // 手机号码
	Sex        int64          `db:"sex"`         // 用户性别
	Avatar     string         `db:"avatar"`      // 头像地址
	Status     int64          `db:"status"`      // 帐号状态(0正常 1停用)
	LoginIp    string         `db:"login_ip"`    // 最后登录IP
	LoginDate  sql.NullTime   `db:"login_date"`  // 最后登录时间
	Creator    string         `db:"creator"`     // 创建者
	CreateTime time.Time      `db:"create_time"` // 创建时间
	Updater    string         `db:"updater"`     // 更新者
	UpdateTime time.Time      `db:"update_time"` // 更新时间
	Deleted    byte           `db:"deleted"`     // 是否删除
}

type UserModel

type UserModel interface {
	// contains filtered or unexported methods
}

UserModel is an interface to be customized, add more methods here, and implement the added methods in customUserModel.

func NewUserModel

func NewUserModel(conn sqlx.SqlConn, c cache.CacheConf) UserModel

NewUserModel returns a model for the database table.

Jump to

Keyboard shortcuts

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