chore(storage-new): Regenerate bindings
This commit is contained in:
parent
c9e1881f55
commit
f8a56cebfe
11 changed files with 59 additions and 11 deletions
|
@ -26,8 +26,10 @@ func newLoginProcessToken(db *gorm.DB, opts ...gen.DOOption) loginProcessToken {
|
|||
|
||||
tableName := _loginProcessToken.loginProcessTokenDo.TableName()
|
||||
_loginProcessToken.ALL = field.NewAsterisk(tableName)
|
||||
_loginProcessToken.ID = field.NewUint64(tableName, "id")
|
||||
_loginProcessToken.UserId = field.NewString(tableName, "user_id")
|
||||
_loginProcessToken.Token = field.NewString(tableName, "token")
|
||||
_loginProcessToken.Name = field.NewString(tableName, "name")
|
||||
_loginProcessToken.ExpiresAt = field.NewTime(tableName, "expires_at")
|
||||
_loginProcessToken.User = loginProcessTokenBelongsToUser{
|
||||
db: db.Session(&gorm.Session{}),
|
||||
|
@ -179,8 +181,10 @@ type loginProcessToken struct {
|
|||
loginProcessTokenDo
|
||||
|
||||
ALL field.Asterisk
|
||||
ID field.Uint64
|
||||
UserId field.String
|
||||
Token field.String
|
||||
Name field.String
|
||||
ExpiresAt field.Time
|
||||
User loginProcessTokenBelongsToUser
|
||||
|
||||
|
@ -199,8 +203,10 @@ func (l loginProcessToken) As(alias string) *loginProcessToken {
|
|||
|
||||
func (l *loginProcessToken) updateTableName(table string) *loginProcessToken {
|
||||
l.ALL = field.NewAsterisk(table)
|
||||
l.ID = field.NewUint64(table, "id")
|
||||
l.UserId = field.NewString(table, "user_id")
|
||||
l.Token = field.NewString(table, "token")
|
||||
l.Name = field.NewString(table, "name")
|
||||
l.ExpiresAt = field.NewTime(table, "expires_at")
|
||||
|
||||
l.fillFieldMap()
|
||||
|
@ -218,9 +224,11 @@ func (l *loginProcessToken) GetFieldByName(fieldName string) (field.OrderExpr, b
|
|||
}
|
||||
|
||||
func (l *loginProcessToken) fillFieldMap() {
|
||||
l.fieldMap = make(map[string]field.Expr, 4)
|
||||
l.fieldMap = make(map[string]field.Expr, 6)
|
||||
l.fieldMap["id"] = l.ID
|
||||
l.fieldMap["user_id"] = l.UserId
|
||||
l.fieldMap["token"] = l.Token
|
||||
l.fieldMap["name"] = l.Name
|
||||
l.fieldMap["expires_at"] = l.ExpiresAt
|
||||
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ func newNoteTag(db *gorm.DB, opts ...gen.DOOption) noteTag {
|
|||
|
||||
tableName := _noteTag.noteTagDo.TableName()
|
||||
_noteTag.ALL = field.NewAsterisk(tableName)
|
||||
_noteTag.ID = field.NewUint64(tableName, "id")
|
||||
_noteTag.NoteId = field.NewString(tableName, "note_id")
|
||||
_noteTag.Tag = field.NewString(tableName, "tag")
|
||||
_noteTag.Note = noteTagBelongsToNote{
|
||||
|
@ -358,6 +359,7 @@ type noteTag struct {
|
|||
noteTagDo
|
||||
|
||||
ALL field.Asterisk
|
||||
ID field.Uint64
|
||||
NoteId field.String
|
||||
Tag field.String
|
||||
Note noteTagBelongsToNote
|
||||
|
@ -377,6 +379,7 @@ func (n noteTag) As(alias string) *noteTag {
|
|||
|
||||
func (n *noteTag) updateTableName(table string) *noteTag {
|
||||
n.ALL = field.NewAsterisk(table)
|
||||
n.ID = field.NewUint64(table, "id")
|
||||
n.NoteId = field.NewString(table, "note_id")
|
||||
n.Tag = field.NewString(table, "tag")
|
||||
|
||||
|
@ -395,7 +398,8 @@ func (n *noteTag) GetFieldByName(fieldName string) (field.OrderExpr, bool) {
|
|||
}
|
||||
|
||||
func (n *noteTag) fillFieldMap() {
|
||||
n.fieldMap = make(map[string]field.Expr, 3)
|
||||
n.fieldMap = make(map[string]field.Expr, 4)
|
||||
n.fieldMap["id"] = n.ID
|
||||
n.fieldMap["note_id"] = n.NoteId
|
||||
n.fieldMap["tag"] = n.Tag
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ func newNoteToAttachment(db *gorm.DB, opts ...gen.DOOption) noteToAttachment {
|
|||
|
||||
tableName := _noteToAttachment.noteToAttachmentDo.TableName()
|
||||
_noteToAttachment.ALL = field.NewAsterisk(tableName)
|
||||
_noteToAttachment.ID = field.NewUint64(tableName, "id")
|
||||
_noteToAttachment.NoteId = field.NewString(tableName, "note_id")
|
||||
_noteToAttachment.AttachmentId = field.NewString(tableName, "attachment_id")
|
||||
_noteToAttachment.Note = noteToAttachmentBelongsToNote{
|
||||
|
@ -364,6 +365,7 @@ type noteToAttachment struct {
|
|||
noteToAttachmentDo
|
||||
|
||||
ALL field.Asterisk
|
||||
ID field.Uint64
|
||||
NoteId field.String
|
||||
AttachmentId field.String
|
||||
Note noteToAttachmentBelongsToNote
|
||||
|
@ -385,6 +387,7 @@ func (n noteToAttachment) As(alias string) *noteToAttachment {
|
|||
|
||||
func (n *noteToAttachment) updateTableName(table string) *noteToAttachment {
|
||||
n.ALL = field.NewAsterisk(table)
|
||||
n.ID = field.NewUint64(table, "id")
|
||||
n.NoteId = field.NewString(table, "note_id")
|
||||
n.AttachmentId = field.NewString(table, "attachment_id")
|
||||
|
||||
|
@ -403,7 +406,8 @@ func (n *noteToAttachment) GetFieldByName(fieldName string) (field.OrderExpr, bo
|
|||
}
|
||||
|
||||
func (n *noteToAttachment) fillFieldMap() {
|
||||
n.fieldMap = make(map[string]field.Expr, 4)
|
||||
n.fieldMap = make(map[string]field.Expr, 5)
|
||||
n.fieldMap["id"] = n.ID
|
||||
n.fieldMap["note_id"] = n.NoteId
|
||||
n.fieldMap["attachment_id"] = n.AttachmentId
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ func newNoteToEmote(db *gorm.DB, opts ...gen.DOOption) noteToEmote {
|
|||
|
||||
tableName := _noteToEmote.noteToEmoteDo.TableName()
|
||||
_noteToEmote.ALL = field.NewAsterisk(tableName)
|
||||
_noteToEmote.ID = field.NewUint64(tableName, "id")
|
||||
_noteToEmote.NoteId = field.NewString(tableName, "note_id")
|
||||
_noteToEmote.EmoteId = field.NewString(tableName, "emote_id")
|
||||
_noteToEmote.Note = noteToEmoteBelongsToNote{
|
||||
|
@ -364,6 +365,7 @@ type noteToEmote struct {
|
|||
noteToEmoteDo
|
||||
|
||||
ALL field.Asterisk
|
||||
ID field.Uint64
|
||||
NoteId field.String
|
||||
EmoteId field.String
|
||||
Note noteToEmoteBelongsToNote
|
||||
|
@ -385,6 +387,7 @@ func (n noteToEmote) As(alias string) *noteToEmote {
|
|||
|
||||
func (n *noteToEmote) updateTableName(table string) *noteToEmote {
|
||||
n.ALL = field.NewAsterisk(table)
|
||||
n.ID = field.NewUint64(table, "id")
|
||||
n.NoteId = field.NewString(table, "note_id")
|
||||
n.EmoteId = field.NewString(table, "emote_id")
|
||||
|
||||
|
@ -403,7 +406,8 @@ func (n *noteToEmote) GetFieldByName(fieldName string) (field.OrderExpr, bool) {
|
|||
}
|
||||
|
||||
func (n *noteToEmote) fillFieldMap() {
|
||||
n.fieldMap = make(map[string]field.Expr, 4)
|
||||
n.fieldMap = make(map[string]field.Expr, 5)
|
||||
n.fieldMap["id"] = n.ID
|
||||
n.fieldMap["note_id"] = n.NoteId
|
||||
n.fieldMap["emote_id"] = n.EmoteId
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ func newNoteToPing(db *gorm.DB, opts ...gen.DOOption) noteToPing {
|
|||
|
||||
tableName := _noteToPing.noteToPingDo.TableName()
|
||||
_noteToPing.ALL = field.NewAsterisk(tableName)
|
||||
_noteToPing.ID = field.NewUint64(tableName, "id")
|
||||
_noteToPing.NoteId = field.NewString(tableName, "note_id")
|
||||
_noteToPing.PingTargetId = field.NewString(tableName, "ping_target_id")
|
||||
_noteToPing.Note = noteToPingBelongsToNote{
|
||||
|
@ -364,6 +365,7 @@ type noteToPing struct {
|
|||
noteToPingDo
|
||||
|
||||
ALL field.Asterisk
|
||||
ID field.Uint64
|
||||
NoteId field.String
|
||||
PingTargetId field.String
|
||||
Note noteToPingBelongsToNote
|
||||
|
@ -385,6 +387,7 @@ func (n noteToPing) As(alias string) *noteToPing {
|
|||
|
||||
func (n *noteToPing) updateTableName(table string) *noteToPing {
|
||||
n.ALL = field.NewAsterisk(table)
|
||||
n.ID = field.NewUint64(table, "id")
|
||||
n.NoteId = field.NewString(table, "note_id")
|
||||
n.PingTargetId = field.NewString(table, "ping_target_id")
|
||||
|
||||
|
@ -403,7 +406,8 @@ func (n *noteToPing) GetFieldByName(fieldName string) (field.OrderExpr, bool) {
|
|||
}
|
||||
|
||||
func (n *noteToPing) fillFieldMap() {
|
||||
n.fieldMap = make(map[string]field.Expr, 4)
|
||||
n.fieldMap = make(map[string]field.Expr, 5)
|
||||
n.fieldMap["id"] = n.ID
|
||||
n.fieldMap["note_id"] = n.NoteId
|
||||
n.fieldMap["ping_target_id"] = n.PingTargetId
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ func newUserAuthMethod(db *gorm.DB, opts ...gen.DOOption) userAuthMethod {
|
|||
|
||||
tableName := _userAuthMethod.userAuthMethodDo.TableName()
|
||||
_userAuthMethod.ALL = field.NewAsterisk(tableName)
|
||||
_userAuthMethod.ID = field.NewUint64(tableName, "id")
|
||||
_userAuthMethod.UserId = field.NewString(tableName, "user_id")
|
||||
_userAuthMethod.AuthMethod = field.NewField(tableName, "auth_method")
|
||||
_userAuthMethod.Token = field.NewBytes(tableName, "token")
|
||||
|
@ -179,6 +180,7 @@ type userAuthMethod struct {
|
|||
userAuthMethodDo
|
||||
|
||||
ALL field.Asterisk
|
||||
ID field.Uint64
|
||||
UserId field.String
|
||||
AuthMethod field.Field
|
||||
Token field.Bytes
|
||||
|
@ -199,6 +201,7 @@ func (u userAuthMethod) As(alias string) *userAuthMethod {
|
|||
|
||||
func (u *userAuthMethod) updateTableName(table string) *userAuthMethod {
|
||||
u.ALL = field.NewAsterisk(table)
|
||||
u.ID = field.NewUint64(table, "id")
|
||||
u.UserId = field.NewString(table, "user_id")
|
||||
u.AuthMethod = field.NewField(table, "auth_method")
|
||||
u.Token = field.NewBytes(table, "token")
|
||||
|
@ -218,7 +221,8 @@ func (u *userAuthMethod) GetFieldByName(fieldName string) (field.OrderExpr, bool
|
|||
}
|
||||
|
||||
func (u *userAuthMethod) fillFieldMap() {
|
||||
u.fieldMap = make(map[string]field.Expr, 4)
|
||||
u.fieldMap = make(map[string]field.Expr, 5)
|
||||
u.fieldMap["id"] = u.ID
|
||||
u.fieldMap["user_id"] = u.UserId
|
||||
u.fieldMap["auth_method"] = u.AuthMethod
|
||||
u.fieldMap["token"] = u.Token
|
||||
|
|
|
@ -26,6 +26,7 @@ func newUserToBeing(db *gorm.DB, opts ...gen.DOOption) userToBeing {
|
|||
|
||||
tableName := _userToBeing.userToBeingDo.TableName()
|
||||
_userToBeing.ALL = field.NewAsterisk(tableName)
|
||||
_userToBeing.ID = field.NewUint64(tableName, "id")
|
||||
_userToBeing.UserId = field.NewString(tableName, "user_id")
|
||||
_userToBeing.Being = field.NewField(tableName, "being")
|
||||
_userToBeing.User = userToBeingBelongsToUser{
|
||||
|
@ -178,6 +179,7 @@ type userToBeing struct {
|
|||
userToBeingDo
|
||||
|
||||
ALL field.Asterisk
|
||||
ID field.Uint64
|
||||
UserId field.String
|
||||
Being field.Field
|
||||
User userToBeingBelongsToUser
|
||||
|
@ -197,6 +199,7 @@ func (u userToBeing) As(alias string) *userToBeing {
|
|||
|
||||
func (u *userToBeing) updateTableName(table string) *userToBeing {
|
||||
u.ALL = field.NewAsterisk(table)
|
||||
u.ID = field.NewUint64(table, "id")
|
||||
u.UserId = field.NewString(table, "user_id")
|
||||
u.Being = field.NewField(table, "being")
|
||||
|
||||
|
@ -215,7 +218,8 @@ func (u *userToBeing) GetFieldByName(fieldName string) (field.OrderExpr, bool) {
|
|||
}
|
||||
|
||||
func (u *userToBeing) fillFieldMap() {
|
||||
u.fieldMap = make(map[string]field.Expr, 3)
|
||||
u.fieldMap = make(map[string]field.Expr, 4)
|
||||
u.fieldMap["id"] = u.ID
|
||||
u.fieldMap["user_id"] = u.UserId
|
||||
u.fieldMap["being"] = u.Being
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ func newUserToPronoun(db *gorm.DB, opts ...gen.DOOption) userToPronoun {
|
|||
|
||||
tableName := _userToPronoun.userToPronounDo.TableName()
|
||||
_userToPronoun.ALL = field.NewAsterisk(tableName)
|
||||
_userToPronoun.ID = field.NewUint64(tableName, "id")
|
||||
_userToPronoun.UserId = field.NewString(tableName, "user_id")
|
||||
_userToPronoun.Pronoung = field.NewString(tableName, "pronoung")
|
||||
_userToPronoun.User = userToPronounBelongsToUser{
|
||||
|
@ -178,6 +179,7 @@ type userToPronoun struct {
|
|||
userToPronounDo
|
||||
|
||||
ALL field.Asterisk
|
||||
ID field.Uint64
|
||||
UserId field.String
|
||||
Pronoung field.String
|
||||
User userToPronounBelongsToUser
|
||||
|
@ -197,6 +199,7 @@ func (u userToPronoun) As(alias string) *userToPronoun {
|
|||
|
||||
func (u *userToPronoun) updateTableName(table string) *userToPronoun {
|
||||
u.ALL = field.NewAsterisk(table)
|
||||
u.ID = field.NewUint64(table, "id")
|
||||
u.UserId = field.NewString(table, "user_id")
|
||||
u.Pronoung = field.NewString(table, "pronoung")
|
||||
|
||||
|
@ -215,7 +218,8 @@ func (u *userToPronoun) GetFieldByName(fieldName string) (field.OrderExpr, bool)
|
|||
}
|
||||
|
||||
func (u *userToPronoun) fillFieldMap() {
|
||||
u.fieldMap = make(map[string]field.Expr, 3)
|
||||
u.fieldMap = make(map[string]field.Expr, 4)
|
||||
u.fieldMap["id"] = u.ID
|
||||
u.fieldMap["user_id"] = u.UserId
|
||||
u.fieldMap["pronoung"] = u.Pronoung
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ func newUserToRole(db *gorm.DB, opts ...gen.DOOption) userToRole {
|
|||
|
||||
tableName := _userToRole.userToRoleDo.TableName()
|
||||
_userToRole.ALL = field.NewAsterisk(tableName)
|
||||
_userToRole.ID = field.NewUint64(tableName, "id")
|
||||
_userToRole.UserId = field.NewString(tableName, "user_id")
|
||||
_userToRole.RoleId = field.NewUint(tableName, "role_id")
|
||||
_userToRole.User = userToRoleBelongsToUser{
|
||||
|
@ -184,6 +185,7 @@ type userToRole struct {
|
|||
userToRoleDo
|
||||
|
||||
ALL field.Asterisk
|
||||
ID field.Uint64
|
||||
UserId field.String
|
||||
RoleId field.Uint
|
||||
User userToRoleBelongsToUser
|
||||
|
@ -205,6 +207,7 @@ func (u userToRole) As(alias string) *userToRole {
|
|||
|
||||
func (u *userToRole) updateTableName(table string) *userToRole {
|
||||
u.ALL = field.NewAsterisk(table)
|
||||
u.ID = field.NewUint64(table, "id")
|
||||
u.UserId = field.NewString(table, "user_id")
|
||||
u.RoleId = field.NewUint(table, "role_id")
|
||||
|
||||
|
@ -223,7 +226,8 @@ func (u *userToRole) GetFieldByName(fieldName string) (field.OrderExpr, bool) {
|
|||
}
|
||||
|
||||
func (u *userToRole) fillFieldMap() {
|
||||
u.fieldMap = make(map[string]field.Expr, 4)
|
||||
u.fieldMap = make(map[string]field.Expr, 5)
|
||||
u.fieldMap["id"] = u.ID
|
||||
u.fieldMap["user_id"] = u.UserId
|
||||
u.fieldMap["role_id"] = u.RoleId
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ func newUserToTag(db *gorm.DB, opts ...gen.DOOption) userToTag {
|
|||
|
||||
tableName := _userToTag.userToTagDo.TableName()
|
||||
_userToTag.ALL = field.NewAsterisk(tableName)
|
||||
_userToTag.ID = field.NewUint64(tableName, "id")
|
||||
_userToTag.UserId = field.NewString(tableName, "user_id")
|
||||
_userToTag.Tag = field.NewString(tableName, "tag")
|
||||
_userToTag.User = userToTagBelongsToUser{
|
||||
|
@ -178,6 +179,7 @@ type userToTag struct {
|
|||
userToTagDo
|
||||
|
||||
ALL field.Asterisk
|
||||
ID field.Uint64
|
||||
UserId field.String
|
||||
Tag field.String
|
||||
User userToTagBelongsToUser
|
||||
|
@ -197,6 +199,7 @@ func (u userToTag) As(alias string) *userToTag {
|
|||
|
||||
func (u *userToTag) updateTableName(table string) *userToTag {
|
||||
u.ALL = field.NewAsterisk(table)
|
||||
u.ID = field.NewUint64(table, "id")
|
||||
u.UserId = field.NewString(table, "user_id")
|
||||
u.Tag = field.NewString(table, "tag")
|
||||
|
||||
|
@ -215,7 +218,8 @@ func (u *userToTag) GetFieldByName(fieldName string) (field.OrderExpr, bool) {
|
|||
}
|
||||
|
||||
func (u *userToTag) fillFieldMap() {
|
||||
u.fieldMap = make(map[string]field.Expr, 3)
|
||||
u.fieldMap = make(map[string]field.Expr, 4)
|
||||
u.fieldMap["id"] = u.ID
|
||||
u.fieldMap["user_id"] = u.UserId
|
||||
u.fieldMap["tag"] = u.Tag
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ func newUserToUserRelation(db *gorm.DB, opts ...gen.DOOption) userToUserRelation
|
|||
|
||||
tableName := _userToUserRelation.userToUserRelationDo.TableName()
|
||||
_userToUserRelation.ALL = field.NewAsterisk(tableName)
|
||||
_userToUserRelation.ID = field.NewUint64(tableName, "id")
|
||||
_userToUserRelation.UserId = field.NewString(tableName, "user_id")
|
||||
_userToUserRelation.TargetUserId = field.NewString(tableName, "target_user_id")
|
||||
_userToUserRelation.Relation = field.NewField(tableName, "relation")
|
||||
|
@ -185,6 +186,7 @@ type userToUserRelation struct {
|
|||
userToUserRelationDo
|
||||
|
||||
ALL field.Asterisk
|
||||
ID field.Uint64
|
||||
UserId field.String
|
||||
TargetUserId field.String
|
||||
Relation field.Field
|
||||
|
@ -207,6 +209,7 @@ func (u userToUserRelation) As(alias string) *userToUserRelation {
|
|||
|
||||
func (u *userToUserRelation) updateTableName(table string) *userToUserRelation {
|
||||
u.ALL = field.NewAsterisk(table)
|
||||
u.ID = field.NewUint64(table, "id")
|
||||
u.UserId = field.NewString(table, "user_id")
|
||||
u.TargetUserId = field.NewString(table, "target_user_id")
|
||||
u.Relation = field.NewField(table, "relation")
|
||||
|
@ -226,7 +229,8 @@ func (u *userToUserRelation) GetFieldByName(fieldName string) (field.OrderExpr,
|
|||
}
|
||||
|
||||
func (u *userToUserRelation) fillFieldMap() {
|
||||
u.fieldMap = make(map[string]field.Expr, 5)
|
||||
u.fieldMap = make(map[string]field.Expr, 6)
|
||||
u.fieldMap["id"] = u.ID
|
||||
u.fieldMap["user_id"] = u.UserId
|
||||
u.fieldMap["target_user_id"] = u.TargetUserId
|
||||
u.fieldMap["relation"] = u.Relation
|
||||
|
|
Loading…
Reference in a new issue