This commit is contained in:
@@ -8,6 +8,8 @@ import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"quyun/v2/pkg/fields"
|
||||
|
||||
"go.ipao.vip/gen"
|
||||
"go.ipao.vip/gen/types"
|
||||
"gorm.io/gorm"
|
||||
@@ -17,17 +19,17 @@ const TableNameUser = "users"
|
||||
|
||||
// User mapped from table <users>
|
||||
type User struct {
|
||||
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true" json:"id"`
|
||||
CreatedAt time.Time `gorm:"column:created_at;type:timestamp without time zone;not null;default:now()" json:"created_at"`
|
||||
UpdatedAt time.Time `gorm:"column:updated_at;type:timestamp without time zone;not null;default:now()" json:"updated_at"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:timestamp without time zone" json:"deleted_at"`
|
||||
Status int16 `gorm:"column:status;type:smallint;not null" json:"status"`
|
||||
OpenID string `gorm:"column:open_id;type:character varying(128);not null" json:"open_id"`
|
||||
Username string `gorm:"column:username;type:character varying(128);not null" json:"username"`
|
||||
Avatar string `gorm:"column:avatar;type:text" json:"avatar"`
|
||||
Metas types.JSON `gorm:"column:metas;type:jsonb;not null;default:{}" json:"metas"`
|
||||
AuthToken types.JSON `gorm:"column:auth_token;type:jsonb;not null;default:{}" json:"auth_token"`
|
||||
Balance int64 `gorm:"column:balance;type:bigint;not null" json:"balance"`
|
||||
ID int64 `gorm:"column:id;type:bigint;primaryKey;autoIncrement:true" json:"id"`
|
||||
CreatedAt time.Time `gorm:"column:created_at;type:timestamp without time zone;not null;default:now()" json:"created_at"`
|
||||
UpdatedAt time.Time `gorm:"column:updated_at;type:timestamp without time zone;not null;default:now()" json:"updated_at"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:timestamp without time zone" json:"deleted_at"`
|
||||
Status fields.UserStatus `gorm:"column:status;type:smallint;not null" json:"status"`
|
||||
OpenID string `gorm:"column:open_id;type:character varying(128);not null" json:"open_id"`
|
||||
Username string `gorm:"column:username;type:character varying(128);not null" json:"username"`
|
||||
Avatar string `gorm:"column:avatar;type:text" json:"avatar"`
|
||||
Metas types.JSONType[fields.UserMetas] `gorm:"column:metas;type:jsonb;not null;default:{}" json:"metas"`
|
||||
AuthToken types.JSONType[fields.UserAuthToken] `gorm:"column:auth_token;type:jsonb;not null;default:{}" json:"auth_token"`
|
||||
Balance int64 `gorm:"column:balance;type:bigint;not null" json:"balance"`
|
||||
}
|
||||
|
||||
// Quick operations without importing query package
|
||||
|
||||
Reference in New Issue
Block a user