youtu_server/gorm-gen/dao/model/app_user.gen.go

30 lines
1.7 KiB
Go

// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
package model
import (
"time"
)
const TableNameAppUser = "app_user"
// AppUser mapped from table <app_user>
type AppUser struct {
ID uint64 `gorm:"column:id;type:bigint unsigned;primaryKey;autoIncrement:true;index:idx_app_user_id,priority:1" json:"id"`
AppAccountID uint32 `gorm:"column:app_account_id;type:int unsigned;not null;uniqueIndex:app_account_id_open_id,priority:1;comment:app_account表外键" json:"app_account_id"` // app_account表外键
Openid string `gorm:"column:openid;type:varchar(255);not null;uniqueIndex:app_account_id_open_id,priority:2" json:"openid"`
Unionid string `gorm:"column:unionid;type:varchar(255);not null" json:"unionid"`
Nickname string `gorm:"column:nickname;type:varchar(255);not null;comment:昵称" json:"nickname"` // 昵称
Avatar string `gorm:"column:avatar;type:varchar(255);not null;comment:头像" json:"avatar"` // 头像
AnonymousOpenid string `gorm:"column:anonymous_openid;type:varchar(255);not null;comment:匿名openid" json:"anonymous_openid"` // 匿名openid
CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null;default:CURRENT_TIMESTAMP;comment:创建时间" json:"created_at"` // 创建时间
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;not null;default:CURRENT_TIMESTAMP;comment:更新时间" json:"updated_at"` // 更新时间
}
// TableName AppUser's table name
func (*AppUser) TableName() string {
return TableNameAppUser
}