Documentation
¶
Overview ¶
Code generated by goal-cli. DO NOT EDIT. versions:
goal-cli v0.5.24 go go1.24.0
updated_at: 2025-03-24 11:05:04 source: pro/Article.proto
Code generated by goal-cli. DO NOT EDIT. versions:
goal-cli v0.5.24 go go1.24.0
updated_at: 2025-03-24 11:05:04 source: pro/Project.proto
Code generated by goal-cli. DO NOT EDIT. versions:
goal-cli v0.5.24 go go1.24.0
updated_at: 2025-03-24 11:05:04 source: pro/user.proto
Index ¶
- Variables
- func ArticleMigrator() migrate.Migrator
- func ArticleModelLocalKeyGetter(key string) func(item *ArticleModel) any
- func ArticleModelMultiRelationSetter[T any](key contracts.RelationType) func(item *ArticleModel, value []any)
- func ArticleModelRelationGetter[T any](query func() *table.Table[T], foreignKey string) func(keys []any) map[string][]any
- func ArticleModelSingleRelationSetter[T any](key contracts.RelationType) func(item *ArticleModel, value []any)
- func ArticleModelThroughRelationGetter[T any](query func() *table.Table[T], ...) func(keys []any) map[string][]any
- func ArticleQuery() *table.Table[ArticleModel]
- func ArticleQueryWithExecutor(executor contracts.SqlExecutor) *table.Table[ArticleModel]
- func ProjectMigrator() migrate.Migrator
- func ProjectModelLocalKeyGetter(key string) func(item *ProjectModel) any
- func ProjectModelMultiRelationSetter[T any](key contracts.RelationType) func(item *ProjectModel, value []any)
- func ProjectModelRelationGetter[T any](query func() *table.Table[T], foreignKey string) func(keys []any) map[string][]any
- func ProjectModelSingleRelationSetter[T any](key contracts.RelationType) func(item *ProjectModel, value []any)
- func ProjectModelThroughRelationGetter[T any](query func() *table.Table[T], ...) func(keys []any) map[string][]any
- func ProjectQuery() *table.Table[ProjectModel]
- func ProjectQueryWithExecutor(executor contracts.SqlExecutor) *table.Table[ProjectModel]
- func UserAuthProvider(identify string) contracts.Authenticatable
- func UserMigrator() migrate.Migrator
- func UserModelLocalKeyGetter(key string) func(item *UserModel) any
- func UserModelMultiRelationSetter[T any](key contracts.RelationType) func(item *UserModel, value []any)
- func UserModelRelationGetter[T any](query func() *table.Table[T], foreignKey string) func(keys []any) map[string][]any
- func UserModelSingleRelationSetter[T any](key contracts.RelationType) func(item *UserModel, value []any)
- func UserModelThroughRelationGetter[T any](query func() *table.Table[T], ...) func(keys []any) map[string][]any
- func UserQuery() *table.Table[UserModel]
- func UserQueryWithExecutor(executor contracts.SqlExecutor) *table.Table[UserModel]
- type ArticleModel
- func (model *ArticleModel) Delete() contracts.Exception
- func (model *ArticleModel) Except(keys ...string) contracts.Fields
- func (model *ArticleModel) Exists() bool
- func (model *ArticleModel) Get(key string) any
- func (model *ArticleModel) GetCreatedAt() string
- func (model *ArticleModel) GetId() uint32
- func (model *ArticleModel) GetPrimaryKey() any
- func (model *ArticleModel) GetTitle() string
- func (model *ArticleModel) GetUpdatedAt() string
- func (model *ArticleModel) Hidden(fields ...string) *ArticleModel
- func (model *ArticleModel) Only(key ...string) contracts.Fields
- func (model *ArticleModel) Refresh() contracts.Exception
- func (model *ArticleModel) Save() contracts.Exception
- func (model *ArticleModel) Set(fields contracts.Fields)
- func (model *ArticleModel) SetCreatedAt(value string)
- func (model *ArticleModel) SetId(value uint32)
- func (model *ArticleModel) SetTitle(value string)
- func (model *ArticleModel) SetUpdatedAt(value string)
- func (model *ArticleModel) ToFields() contracts.Fields
- func (model *ArticleModel) Update(fields contracts.Fields) contracts.Exception
- type ArticleStatic
- type ProjectModel
- func (model *ProjectModel) Delete() contracts.Exception
- func (model *ProjectModel) Except(keys ...string) contracts.Fields
- func (model *ProjectModel) Exists() bool
- func (model *ProjectModel) Get(key string) any
- func (model *ProjectModel) GetCreatedAt() string
- func (model *ProjectModel) GetCreatorId() int32
- func (model *ProjectModel) GetDefaultBranch() string
- func (model *ProjectModel) GetGroupId() int32
- func (model *ProjectModel) GetId() uint64
- func (model *ProjectModel) GetKeyId() int32
- func (model *ProjectModel) GetName() string
- func (model *ProjectModel) GetPrimaryKey() any
- func (model *ProjectModel) GetProjectPath() string
- func (model *ProjectModel) GetRepoAddress() string
- func (model *ProjectModel) GetSettings() string
- func (model *ProjectModel) GetUpdatedAt() string
- func (model *ProjectModel) GetUuid() string
- func (model *ProjectModel) Hidden(fields ...string) *ProjectModel
- func (model *ProjectModel) Only(key ...string) contracts.Fields
- func (model *ProjectModel) Refresh() contracts.Exception
- func (model *ProjectModel) Save() contracts.Exception
- func (model *ProjectModel) Set(fields contracts.Fields)
- func (model *ProjectModel) SetCreatedAt(value string)
- func (model *ProjectModel) SetCreatorId(value int32)
- func (model *ProjectModel) SetDefaultBranch(value string)
- func (model *ProjectModel) SetGroupId(value int32)
- func (model *ProjectModel) SetId(value uint64)
- func (model *ProjectModel) SetKeyId(value int32)
- func (model *ProjectModel) SetName(value string)
- func (model *ProjectModel) SetProjectPath(value string)
- func (model *ProjectModel) SetRepoAddress(value string)
- func (model *ProjectModel) SetSettings(value string)
- func (model *ProjectModel) SetUpdatedAt(value string)
- func (model *ProjectModel) SetUser(value *UserModel)
- func (model *ProjectModel) SetUuid(value string)
- func (model *ProjectModel) ToFields() contracts.Fields
- func (model *ProjectModel) Update(fields contracts.Fields) contracts.Exception
- func (model *ProjectModel) User() *UserModel
- func (model *ProjectModel) UserQuery() contracts.QueryBuilder[UserModel]
- type ProjectStatic
- type UserModel
- func (model *UserModel) Delete() contracts.Exception
- func (model *UserModel) Except(keys ...string) contracts.Fields
- func (model *UserModel) Exists() bool
- func (model *UserModel) Get(key string) any
- func (model *UserModel) GetAuthenticatableKey() string
- func (model *UserModel) GetAvatar() string
- func (model *UserModel) GetChannel() string
- func (model *UserModel) GetCreatedAt() string
- func (model *UserModel) GetId() int64
- func (model *UserModel) GetName() string
- func (model *UserModel) GetOpenId() string
- func (model *UserModel) GetPassword() string
- func (model *UserModel) GetPrimaryKey() any
- func (model *UserModel) GetUpdatedAt() string
- func (model *UserModel) GetWechatInfo() *user.WechatInfoData
- func (model *UserModel) Hidden(fields ...string) *UserModel
- func (model *UserModel) Only(key ...string) contracts.Fields
- func (model *UserModel) Refresh() contracts.Exception
- func (model *UserModel) Save() contracts.Exception
- func (model *UserModel) Set(fields contracts.Fields)
- func (model *UserModel) SetAvatar(value string)
- func (model *UserModel) SetChannel(value string)
- func (model *UserModel) SetCreatedAt(value string)
- func (model *UserModel) SetId(value int64)
- func (model *UserModel) SetName(value string)
- func (model *UserModel) SetOpenId(value string)
- func (model *UserModel) SetPassword(value string)
- func (model *UserModel) SetUpdatedAt(value string)
- func (model *UserModel) SetWechatInfo(value *user.WechatInfoData)
- func (model *UserModel) ToFields() contracts.Fields
- func (model *UserModel) Update(fields contracts.Fields) contracts.Exception
- type UserStatic
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ProjectUserRelation contracts.RelationType = "user"
)
Functions ¶
func ArticleMigrator ¶ added in v0.4.3
func ArticleModelLocalKeyGetter ¶ added in v0.4.3
func ArticleModelLocalKeyGetter(key string) func(item *ArticleModel) any
func ArticleModelMultiRelationSetter ¶ added in v0.4.3
func ArticleModelMultiRelationSetter[T any](key contracts.RelationType) func(item *ArticleModel, value []any)
func ArticleModelRelationGetter ¶ added in v0.4.3
func ArticleModelSingleRelationSetter ¶ added in v0.4.3
func ArticleModelSingleRelationSetter[T any](key contracts.RelationType) func(item *ArticleModel, value []any)
func ArticleModelThroughRelationGetter ¶ added in v0.4.3
func ArticleQuery ¶
func ArticleQuery() *table.Table[ArticleModel]
func ArticleQueryWithExecutor ¶ added in v0.4.3
func ArticleQueryWithExecutor(executor contracts.SqlExecutor) *table.Table[ArticleModel]
func ProjectMigrator ¶ added in v0.5.5
func ProjectModelLocalKeyGetter ¶ added in v0.5.5
func ProjectModelLocalKeyGetter(key string) func(item *ProjectModel) any
func ProjectModelMultiRelationSetter ¶ added in v0.5.5
func ProjectModelMultiRelationSetter[T any](key contracts.RelationType) func(item *ProjectModel, value []any)
func ProjectModelRelationGetter ¶ added in v0.5.5
func ProjectModelSingleRelationSetter ¶ added in v0.5.5
func ProjectModelSingleRelationSetter[T any](key contracts.RelationType) func(item *ProjectModel, value []any)
func ProjectModelThroughRelationGetter ¶ added in v0.5.5
func ProjectQuery ¶ added in v0.5.5
func ProjectQuery() *table.Table[ProjectModel]
func ProjectQueryWithExecutor ¶ added in v0.5.5
func ProjectQueryWithExecutor(executor contracts.SqlExecutor) *table.Table[ProjectModel]
func UserAuthProvider ¶ added in v0.4.2
func UserAuthProvider(identify string) contracts.Authenticatable
func UserMigrator ¶ added in v0.4.2
func UserModelLocalKeyGetter ¶ added in v0.4.2
func UserModelMultiRelationSetter ¶ added in v0.4.2
func UserModelMultiRelationSetter[T any](key contracts.RelationType) func(item *UserModel, value []any)
func UserModelRelationGetter ¶ added in v0.4.2
func UserModelSingleRelationSetter ¶ added in v0.4.2
func UserModelSingleRelationSetter[T any](key contracts.RelationType) func(item *UserModel, value []any)
func UserModelThroughRelationGetter ¶ added in v0.4.2
func UserQueryWithExecutor ¶ added in v0.4.2
func UserQueryWithExecutor(executor contracts.SqlExecutor) *table.Table[UserModel]
Types ¶
type ArticleModel ¶
type ArticleModel struct {
Id uint32 `json:"id" query:"id" form:"id" db:"id;type:INT UNSIGNED;not null;primary key;AUTO_INCREMENT;"`
Title string `json:"title" query:"title" form:"title" db:"title;type:VARCHAR(255);not null;"`
CreatedAt string `json:"created_at" query:"created_at" form:"created_at" db:"created_at;type:timestamp;default CURRENT_TIMESTAMP;"`
UpdatedAt string `` /* 140-byte string literal not displayed */
// contains filtered or unexported fields
}
ArticleModel @timestamps
func NewArticleModel ¶ added in v0.4.3
func NewArticleModel(fields contracts.Fields) *ArticleModel
func (*ArticleModel) Delete ¶ added in v0.4.3
func (model *ArticleModel) Delete() contracts.Exception
func (*ArticleModel) Except ¶ added in v0.4.3
func (model *ArticleModel) Except(keys ...string) contracts.Fields
func (*ArticleModel) Exists ¶ added in v0.4.3
func (model *ArticleModel) Exists() bool
func (*ArticleModel) Get ¶ added in v0.4.3
func (model *ArticleModel) Get(key string) any
func (*ArticleModel) GetCreatedAt ¶ added in v0.4.3
func (model *ArticleModel) GetCreatedAt() string
func (*ArticleModel) GetId ¶ added in v0.4.3
func (model *ArticleModel) GetId() uint32
func (*ArticleModel) GetPrimaryKey ¶ added in v0.4.3
func (model *ArticleModel) GetPrimaryKey() any
func (*ArticleModel) GetTitle ¶ added in v0.4.3
func (model *ArticleModel) GetTitle() string
func (*ArticleModel) GetUpdatedAt ¶ added in v0.4.3
func (model *ArticleModel) GetUpdatedAt() string
func (*ArticleModel) Hidden ¶ added in v0.4.3
func (model *ArticleModel) Hidden(fields ...string) *ArticleModel
func (*ArticleModel) Only ¶ added in v0.4.3
func (model *ArticleModel) Only(key ...string) contracts.Fields
func (*ArticleModel) Refresh ¶ added in v0.4.3
func (model *ArticleModel) Refresh() contracts.Exception
func (*ArticleModel) Save ¶ added in v0.4.3
func (model *ArticleModel) Save() contracts.Exception
func (*ArticleModel) Set ¶ added in v0.4.3
func (model *ArticleModel) Set(fields contracts.Fields)
func (*ArticleModel) SetCreatedAt ¶ added in v0.4.3
func (model *ArticleModel) SetCreatedAt(value string)
func (*ArticleModel) SetId ¶ added in v0.4.3
func (model *ArticleModel) SetId(value uint32)
func (*ArticleModel) SetTitle ¶ added in v0.4.3
func (model *ArticleModel) SetTitle(value string)
func (*ArticleModel) SetUpdatedAt ¶ added in v0.4.3
func (model *ArticleModel) SetUpdatedAt(value string)
func (*ArticleModel) ToFields ¶ added in v0.4.3
func (model *ArticleModel) ToFields() contracts.Fields
type ArticleStatic ¶ added in v0.4.3
type ArticleStatic struct {
TableName string
Hidden []string
Indexes []string
With []contracts.RelationType
Appends map[string]func(model *ArticleModel) any
IdGetter func(model *ArticleModel, raw uint32) uint32
IdSetter func(model *ArticleModel, raw uint32) uint32
TitleGetter func(model *ArticleModel, raw string) string
TitleSetter func(model *ArticleModel, raw string) string
CreatedAtGetter func(model *ArticleModel, raw string) string
CreatedAtSetter func(model *ArticleModel, raw string) string
UpdatedAtGetter func(model *ArticleModel, raw string) string
UpdatedAtSetter func(model *ArticleModel, raw string) string
Saving func(model *ArticleModel) contracts.Exception
Saved func(model *ArticleModel)
Updating func(model *ArticleModel, fields contracts.Fields) contracts.Exception
Updated func(model *ArticleModel, fields contracts.Fields)
Deleting func(model *ArticleModel) contracts.Exception
Deleted func(model *ArticleModel)
PrimaryKeyGetter func(model *ArticleModel) any
}
var ArticleDefine ArticleStatic
type ProjectModel ¶ added in v0.5.5
type ProjectModel struct {
Id uint64 `json:"id" query:"id" form:"id" db:"id;type:BIGINT UNSIGNED;not null;primary key;AUTO_INCREMENT;"`
Uuid string `json:"uuid" query:"uuid" form:"uuid" db:"uuid;type:VARCHAR(255);not null;"`
Name string `json:"name" query:"name" form:"name" db:"name;type:VARCHAR(255);not null;"`
CreatorId int32 `json:"creator_id" query:"creator_id" form:"creator_id" db:"creator_id;type:INT;not null;"`
GroupId int32 `json:"group_id" query:"group_id" form:"group_id" db:"group_id;type:INT;not null;"`
KeyId int32 `json:"key_id" query:"key_id" form:"key_id" db:"key_id;type:INT;not null;"`
RepoAddress string `json:"repo_address" query:"repo_address" form:"repo_address" db:"repo_address;type:VARCHAR(255);not null;"`
ProjectPath string `json:"project_path" query:"project_path" form:"project_path" db:"project_path;type:VARCHAR(255);not null;"`
DefaultBranch string `json:"default_branch" query:"default_branch" form:"default_branch" db:"default_branch;type:VARCHAR(255);not null;"`
Settings string `json:"settings" query:"settings" form:"settings" db:"settings;type:VARCHAR(255);not null;"`
CreatedAt string `json:"created_at" query:"created_at" form:"created_at" db:"created_at;type:timestamp;default CURRENT_TIMESTAMP;"`
UpdatedAt string `` /* 140-byte string literal not displayed */
// contains filtered or unexported fields
}
ProjectModel @timestamps
func NewProjectModel ¶ added in v0.5.5
func NewProjectModel(fields contracts.Fields) *ProjectModel
func (*ProjectModel) Delete ¶ added in v0.5.5
func (model *ProjectModel) Delete() contracts.Exception
func (*ProjectModel) Except ¶ added in v0.5.5
func (model *ProjectModel) Except(keys ...string) contracts.Fields
func (*ProjectModel) Exists ¶ added in v0.5.5
func (model *ProjectModel) Exists() bool
func (*ProjectModel) Get ¶ added in v0.5.5
func (model *ProjectModel) Get(key string) any
func (*ProjectModel) GetCreatedAt ¶ added in v0.5.5
func (model *ProjectModel) GetCreatedAt() string
func (*ProjectModel) GetCreatorId ¶ added in v0.5.5
func (model *ProjectModel) GetCreatorId() int32
func (*ProjectModel) GetDefaultBranch ¶ added in v0.5.5
func (model *ProjectModel) GetDefaultBranch() string
func (*ProjectModel) GetGroupId ¶ added in v0.5.5
func (model *ProjectModel) GetGroupId() int32
func (*ProjectModel) GetId ¶ added in v0.5.5
func (model *ProjectModel) GetId() uint64
func (*ProjectModel) GetKeyId ¶ added in v0.5.5
func (model *ProjectModel) GetKeyId() int32
func (*ProjectModel) GetName ¶ added in v0.5.5
func (model *ProjectModel) GetName() string
func (*ProjectModel) GetPrimaryKey ¶ added in v0.5.5
func (model *ProjectModel) GetPrimaryKey() any
func (*ProjectModel) GetProjectPath ¶ added in v0.5.5
func (model *ProjectModel) GetProjectPath() string
func (*ProjectModel) GetRepoAddress ¶ added in v0.5.5
func (model *ProjectModel) GetRepoAddress() string
func (*ProjectModel) GetSettings ¶ added in v0.5.5
func (model *ProjectModel) GetSettings() string
func (*ProjectModel) GetUpdatedAt ¶ added in v0.5.5
func (model *ProjectModel) GetUpdatedAt() string
func (*ProjectModel) GetUuid ¶ added in v0.5.5
func (model *ProjectModel) GetUuid() string
func (*ProjectModel) Hidden ¶ added in v0.5.5
func (model *ProjectModel) Hidden(fields ...string) *ProjectModel
func (*ProjectModel) Only ¶ added in v0.5.5
func (model *ProjectModel) Only(key ...string) contracts.Fields
func (*ProjectModel) Refresh ¶ added in v0.5.5
func (model *ProjectModel) Refresh() contracts.Exception
func (*ProjectModel) Save ¶ added in v0.5.5
func (model *ProjectModel) Save() contracts.Exception
func (*ProjectModel) Set ¶ added in v0.5.5
func (model *ProjectModel) Set(fields contracts.Fields)
func (*ProjectModel) SetCreatedAt ¶ added in v0.5.5
func (model *ProjectModel) SetCreatedAt(value string)
func (*ProjectModel) SetCreatorId ¶ added in v0.5.5
func (model *ProjectModel) SetCreatorId(value int32)
func (*ProjectModel) SetDefaultBranch ¶ added in v0.5.5
func (model *ProjectModel) SetDefaultBranch(value string)
func (*ProjectModel) SetGroupId ¶ added in v0.5.5
func (model *ProjectModel) SetGroupId(value int32)
func (*ProjectModel) SetId ¶ added in v0.5.5
func (model *ProjectModel) SetId(value uint64)
func (*ProjectModel) SetKeyId ¶ added in v0.5.5
func (model *ProjectModel) SetKeyId(value int32)
func (*ProjectModel) SetName ¶ added in v0.5.5
func (model *ProjectModel) SetName(value string)
func (*ProjectModel) SetProjectPath ¶ added in v0.5.5
func (model *ProjectModel) SetProjectPath(value string)
func (*ProjectModel) SetRepoAddress ¶ added in v0.5.5
func (model *ProjectModel) SetRepoAddress(value string)
func (*ProjectModel) SetSettings ¶ added in v0.5.5
func (model *ProjectModel) SetSettings(value string)
func (*ProjectModel) SetUpdatedAt ¶ added in v0.5.5
func (model *ProjectModel) SetUpdatedAt(value string)
func (*ProjectModel) SetUser ¶ added in v0.5.5
func (model *ProjectModel) SetUser(value *UserModel)
UserQuery @belongsTo
func (*ProjectModel) SetUuid ¶ added in v0.5.5
func (model *ProjectModel) SetUuid(value string)
func (*ProjectModel) ToFields ¶ added in v0.5.5
func (model *ProjectModel) ToFields() contracts.Fields
func (*ProjectModel) Update ¶ added in v0.5.5
func (model *ProjectModel) Update(fields contracts.Fields) contracts.Exception
func (*ProjectModel) User ¶ added in v0.5.5
func (model *ProjectModel) User() *UserModel
UserQuery @belongsTo
func (*ProjectModel) UserQuery ¶ added in v0.5.5
func (model *ProjectModel) UserQuery() contracts.QueryBuilder[UserModel]
UserQuery @belongsTo
type ProjectStatic ¶ added in v0.5.5
type ProjectStatic struct {
TableName string
Hidden []string
Indexes []string
With []contracts.RelationType
Appends map[string]func(model *ProjectModel) any
IdGetter func(model *ProjectModel, raw uint64) uint64
IdSetter func(model *ProjectModel, raw uint64) uint64
UuidGetter func(model *ProjectModel, raw string) string
UuidSetter func(model *ProjectModel, raw string) string
NameGetter func(model *ProjectModel, raw string) string
NameSetter func(model *ProjectModel, raw string) string
CreatorIdGetter func(model *ProjectModel, raw int32) int32
CreatorIdSetter func(model *ProjectModel, raw int32) int32
GroupIdGetter func(model *ProjectModel, raw int32) int32
GroupIdSetter func(model *ProjectModel, raw int32) int32
KeyIdGetter func(model *ProjectModel, raw int32) int32
KeyIdSetter func(model *ProjectModel, raw int32) int32
RepoAddressGetter func(model *ProjectModel, raw string) string
RepoAddressSetter func(model *ProjectModel, raw string) string
ProjectPathGetter func(model *ProjectModel, raw string) string
ProjectPathSetter func(model *ProjectModel, raw string) string
DefaultBranchGetter func(model *ProjectModel, raw string) string
DefaultBranchSetter func(model *ProjectModel, raw string) string
SettingsGetter func(model *ProjectModel, raw string) string
SettingsSetter func(model *ProjectModel, raw string) string
CreatedAtGetter func(model *ProjectModel, raw string) string
CreatedAtSetter func(model *ProjectModel, raw string) string
UpdatedAtGetter func(model *ProjectModel, raw string) string
UpdatedAtSetter func(model *ProjectModel, raw string) string
Saving func(model *ProjectModel) contracts.Exception
Saved func(model *ProjectModel)
Updating func(model *ProjectModel, fields contracts.Fields) contracts.Exception
Updated func(model *ProjectModel, fields contracts.Fields)
Deleting func(model *ProjectModel) contracts.Exception
Deleted func(model *ProjectModel)
PrimaryKeyGetter func(model *ProjectModel) any
}
var ProjectDefine ProjectStatic
type UserModel ¶
type UserModel struct {
Id int64 `json:"id" query:"id" form:"id" db:"id;type:BIGINT;not null;primary key;AUTO_INCREMENT;"`
Name string `json:"name" query:"name" form:"name" db:"name;type:VARCHAR(255);not null;"`
Avatar string `json:"avatar" query:"avatar" form:"avatar" db:"avatar;type:VARCHAR(255);not null;"`
//@index
//@goTag:db:"open_id;type:varchar(255);default 'xxasdasdsx'"
OpenId string `db:"open_id;type:varchar(255);default 'xxasdasdsx'" json:"open_id" query:"open_id" form:"open_id"`
WechatInfo *user.WechatInfoData `json:"wechat_info" query:"wechat_info" form:"wechat_info" db:"wechat_info;type:json;not null;"`
Channel string `json:"channel" query:"channel" form:"channel" db:"channel;type:VARCHAR(255);not null;"`
//@hidden
Password string `json:"password" query:"password" form:"password" db:"password;type:VARCHAR(255);not null;"`
CreatedAt string `json:"created_at" query:"created_at" form:"created_at" db:"created_at;type:timestamp;default CURRENT_TIMESTAMP;"`
UpdatedAt string `` /* 140-byte string literal not displayed */
// contains filtered or unexported fields
}
UserModel 用户注释 @authenticatable @timestamps
func NewUserModel ¶ added in v0.4.2
func (*UserModel) GetAuthenticatableKey ¶ added in v0.4.2
func (*UserModel) GetChannel ¶ added in v0.4.2
func (*UserModel) GetCreatedAt ¶ added in v0.4.2
func (*UserModel) GetPassword ¶ added in v0.4.2
func (*UserModel) GetPrimaryKey ¶ added in v0.4.2
func (*UserModel) GetUpdatedAt ¶ added in v0.4.2
func (*UserModel) GetWechatInfo ¶ added in v0.4.2
func (model *UserModel) GetWechatInfo() *user.WechatInfoData
func (*UserModel) SetChannel ¶ added in v0.4.2
func (*UserModel) SetCreatedAt ¶ added in v0.4.2
func (*UserModel) SetPassword ¶ added in v0.4.2
func (*UserModel) SetUpdatedAt ¶ added in v0.4.2
func (*UserModel) SetWechatInfo ¶ added in v0.4.2
func (model *UserModel) SetWechatInfo(value *user.WechatInfoData)
type UserStatic ¶ added in v0.4.2
type UserStatic struct {
TableName string
Hidden []string
Indexes []string
With []contracts.RelationType
Appends map[string]func(model *UserModel) any
IdGetter func(model *UserModel, raw int64) int64
IdSetter func(model *UserModel, raw int64) int64
NameGetter func(model *UserModel, raw string) string
NameSetter func(model *UserModel, raw string) string
AvatarGetter func(model *UserModel, raw string) string
AvatarSetter func(model *UserModel, raw string) string
OpenIdGetter func(model *UserModel, raw string) string
OpenIdSetter func(model *UserModel, raw string) string
WechatInfoGetter func(model *UserModel, raw *user.WechatInfoData) *user.WechatInfoData
WechatInfoSetter func(model *UserModel, raw *user.WechatInfoData) *user.WechatInfoData
ChannelGetter func(model *UserModel, raw string) string
ChannelSetter func(model *UserModel, raw string) string
PasswordGetter func(model *UserModel, raw string) string
PasswordSetter func(model *UserModel, raw string) string
CreatedAtGetter func(model *UserModel, raw string) string
CreatedAtSetter func(model *UserModel, raw string) string
UpdatedAtGetter func(model *UserModel, raw string) string
UpdatedAtSetter func(model *UserModel, raw string) string
Saving func(model *UserModel) contracts.Exception
Saved func(model *UserModel)
Updating func(model *UserModel, fields contracts.Fields) contracts.Exception
Updated func(model *UserModel, fields contracts.Fields)
Deleting func(model *UserModel) contracts.Exception
Deleted func(model *UserModel)
PrimaryKeyGetter func(model *UserModel) any
}
var UserDefine UserStatic
Click to show internal directories.
Click to hide internal directories.