Drop feeds/merge them into user
This commit is contained in:
parent
59373c6380
commit
f12059c760
13 changed files with 78 additions and 920 deletions
|
@ -51,6 +51,7 @@ func newUser(db *gorm.DB, opts ...gen.DOOption) user {
|
|||
_user.FinishedRegistration = field.NewBool(tableName, "finished_registration")
|
||||
_user.PrivateKeyRsa = field.NewBytes(tableName, "private_key_rsa")
|
||||
_user.PrivateKeyEd = field.NewBytes(tableName, "private_key_ed")
|
||||
_user.IsFeed = field.NewBool(tableName, "is_feed")
|
||||
_user.RawData = field.NewBytes(tableName, "raw_data")
|
||||
_user.RemoteInfoId = field.NewField(tableName, "remote_info_id")
|
||||
_user.RemoteInfo = userHasOneRemoteInfo{
|
||||
|
@ -393,6 +394,7 @@ type user struct {
|
|||
FinishedRegistration field.Bool
|
||||
PrivateKeyRsa field.Bytes
|
||||
PrivateKeyEd field.Bytes
|
||||
IsFeed field.Bool
|
||||
RawData field.Bytes
|
||||
RemoteInfoId field.Field
|
||||
RemoteInfo userHasOneRemoteInfo
|
||||
|
@ -457,6 +459,7 @@ func (u *user) updateTableName(table string) *user {
|
|||
u.FinishedRegistration = field.NewBool(table, "finished_registration")
|
||||
u.PrivateKeyRsa = field.NewBytes(table, "private_key_rsa")
|
||||
u.PrivateKeyEd = field.NewBytes(table, "private_key_ed")
|
||||
u.IsFeed = field.NewBool(table, "is_feed")
|
||||
u.RawData = field.NewBytes(table, "raw_data")
|
||||
u.RemoteInfoId = field.NewField(table, "remote_info_id")
|
||||
|
||||
|
@ -475,7 +478,7 @@ func (u *user) GetFieldByName(fieldName string) (field.OrderExpr, bool) {
|
|||
}
|
||||
|
||||
func (u *user) fillFieldMap() {
|
||||
u.fieldMap = make(map[string]field.Expr, 37)
|
||||
u.fieldMap = make(map[string]field.Expr, 38)
|
||||
u.fieldMap["id"] = u.ID
|
||||
u.fieldMap["username"] = u.Username
|
||||
u.fieldMap["created_at"] = u.CreatedAt
|
||||
|
@ -499,6 +502,7 @@ func (u *user) fillFieldMap() {
|
|||
u.fieldMap["finished_registration"] = u.FinishedRegistration
|
||||
u.fieldMap["private_key_rsa"] = u.PrivateKeyRsa
|
||||
u.fieldMap["private_key_ed"] = u.PrivateKeyEd
|
||||
u.fieldMap["is_feed"] = u.IsFeed
|
||||
u.fieldMap["raw_data"] = u.RawData
|
||||
u.fieldMap["remote_info_id"] = u.RemoteInfoId
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue