From 837edc6382ddbe5601d6fb9fb5b5c372656920de Mon Sep 17 00:00:00 2001 From: Charles Iliya Krempeaux Date: Thu, 8 Aug 2024 12:22:10 -0700 Subject: [PATCH] mstdn/ent.Account --- ent/account.go | 406 +++----------------------------- ent/account_marshaljson_test.go | 401 ++++++++++++++++++++++--------- 2 files changed, 312 insertions(+), 495 deletions(-) diff --git a/ent/account.go b/ent/account.go index b968f52..0d9aea8 100644 --- a/ent/account.go +++ b/ent/account.go @@ -1,394 +1,42 @@ package ent import ( - "encoding/json" - - "github.com/reiver/go-erorr" "github.com/reiver/go-nul" "github.com/reiver/go-jsonint" "github.com/reiver/go-opt" ) -var _ json.Marshaler = Account{} - // Account represents a Mastodon API "Account". // // See: // https://docs.joinmastodon.org/entities/Account/ type Account struct { ID opt.Optional[string] `json:"id"` - UserName opt.Optional[string] `json:"username"` - Acct opt.Optional[string] `json:"acct"` - URL opt.Optional[string] `json:"url"` - URI opt.Optional[string] `json:"uri"` // currently undocumented, but is included in in account JSON returned from the Mastodon API on mastodon.social. - DisplayName opt.Optional[string] `json:"display_name"` - Note opt.Optional[string] `json:"note"` - Avatar opt.Optional[string] `json:"avatar"` - AvatarStatic opt.Optional[string] `json:"avatar_static"` - Header opt.Optional[string] `json:"header"` - HeaderStatic opt.Optional[string] `json:"header_static"` - Fields []Field `json:"fields"` - Emojis []CustomEmoji `json:"emojis"` - Locked opt.Optional[bool] `json:"locked"` - Bot opt.Optional[bool] `json:"bot"` - Group opt.Optional[bool] `json:"group"` - Discoverable nul.Nullable[bool] `json:"discoverable"` - NoIndex nul.Nullable[bool] `json:"noindex"` - Moved nul.Nullable[AccountHolder] `json:"moved"` - Suspended opt.Optional[bool] `json:"suspended"` - Limited opt.Optional[bool] `json:"limited"` - CreatedAt opt.Optional[string] `json:"created_at"` - LastStatusAt nul.Nullable[string] `json:"last_status_at"` - StatusesCount opt.Optional[jsonint.Int] `json:"statuses_count"` - FollowersCount opt.Optional[jsonint.Int] `json:"followers_count"` - FollowingCount opt.Optional[jsonint.Int] `json:"following_count"` - Roles []Role `json:"roles"` - MuteExpiresAt nul.Nullable[string] `json:"mute_expires_at"` -} - -func (receiver Account) MarshalJSON() ([]byte, error) { - - var buffer []byte - - buffer = append(buffer, "{"...) - - { - buffer = append(buffer, `"id":`...) - - marshaled, err := json.Marshal(receiver.ID) - if nil != err { - return nil, erorr.Errorf("mstdn/ent: could not marshal ent.Account.ID as JSON: %w", err) - } - - buffer = append(buffer, marshaled...) - } - - { - buffer = append(buffer, `,"username":`...) - - marshaled, err := json.Marshal(receiver.UserName) - if nil != err { - return nil, erorr.Errorf("mstdn/ent: could not marshal ent.Account.UserName as JSON: %w", err) - } - - buffer = append(buffer, marshaled...) - } - - { - buffer = append(buffer, `,"acct":`...) - - marshaled, err := json.Marshal(receiver.Acct) - if nil != err { - return nil, erorr.Errorf("mstdn/ent: could not marshal ent.Account.Acct as JSON: %w", err) - } - - buffer = append(buffer, marshaled...) - } - - { - buffer = append(buffer, `,"url":`...) - - marshaled, err := json.Marshal(receiver.URL) - if nil != err { - return nil, erorr.Errorf("mstdn/ent: could not marshal ent.Account.URL as JSON: %w", err) - } - - buffer = append(buffer, marshaled...) - } - - { - buffer = append(buffer, `,"uri":`...) - - marshaled, err := json.Marshal(receiver.URI) - if nil != err { - return nil, erorr.Errorf("mstdn/ent: could not marshal ent.Account.URI as JSON: %w", err) - } - - buffer = append(buffer, marshaled...) - } - - { - buffer = append(buffer, `,"display_name":`...) - - marshaled, err := json.Marshal(receiver.DisplayName) - if nil != err { - return nil, erorr.Errorf("mstdn/ent: could not marshal ent.Account.DisplayName as JSON: %w", err) - } - - buffer = append(buffer, marshaled...) - } - - { - buffer = append(buffer, `,"note":`...) - - marshaled, err := json.Marshal(receiver.Note) - if nil != err { - return nil, erorr.Errorf("mstdn/ent: could not marshal ent.Account.Note as JSON: %w", err) - } - - buffer = append(buffer, marshaled...) - } - - { - buffer = append(buffer, `,"avatar":`...) - - marshaled, err := json.Marshal(receiver.Avatar) - if nil != err { - return nil, erorr.Errorf("mstdn/ent: could not marshal ent.Account.Avatar as JSON: %w", err) - } - - buffer = append(buffer, marshaled...) - } - - { - buffer = append(buffer, `,"avatar_static":`...) - - marshaled, err := json.Marshal(receiver.AvatarStatic) - if nil != err { - return nil, erorr.Errorf("mstdn/ent: could not marshal ent.Account.AvatarStatic as JSON: %w", err) - } - - buffer = append(buffer, marshaled...) - } - - { - buffer = append(buffer, `,"header":`...) - - marshaled, err := json.Marshal(receiver.Header) - if nil != err { - return nil, erorr.Errorf("mstdn/ent: could not marshal ent.Account.Header as JSON: %w", err) - } - - buffer = append(buffer, marshaled...) - } - - { - buffer = append(buffer, `,"header_static":`...) - - marshaled, err := json.Marshal(receiver.HeaderStatic) - if nil != err { - return nil, erorr.Errorf("mstdn/ent: could not marshal ent.Account.HeaderStatic as JSON: %w", err) - } - - buffer = append(buffer, marshaled...) - } - - { - buffer = append(buffer, `,"fields":`...) - - var src interface{} = receiver.Fields - if nil == receiver.Fields { - src = []Field{} - } - - marshaled, err := json.Marshal(src) - if nil != err { - return nil, erorr.Errorf("mstdn/ent: could not marshal ent.Account.Fields as JSON: %w", err) - } - - buffer = append(buffer, marshaled...) - } - - { - buffer = append(buffer, `,"emojis":`...) - - var src interface{} = receiver.Emojis - if nil == receiver.Emojis { - src = []CustomEmoji{} - } - - marshaled, err := json.Marshal(src) - if nil != err { - return nil, erorr.Errorf("mstdn/ent: could not marshal ent.Account.Emojis as JSON: %w", err) - } - - buffer = append(buffer, marshaled...) - } - - { - buffer = append(buffer, `,"locked":`...) - - marshaled, err := json.Marshal(receiver.Locked) - if nil != err { - return nil, erorr.Errorf("mstdn/ent: could not marshal ent.Account.Locked as JSON: %w", err) - } - - buffer = append(buffer, marshaled...) - } - - { - buffer = append(buffer, `,"bot":`...) - - marshaled, err := json.Marshal(receiver.Bot) - if nil != err { - return nil, erorr.Errorf("mstdn/ent: could not marshal ent.Account.Bot as JSON: %w", err) - } - - buffer = append(buffer, marshaled...) - } - - { - buffer = append(buffer, `,"group":`...) - - marshaled, err := json.Marshal(receiver.Group) - if nil != err { - return nil, erorr.Errorf("mstdn/ent: could not marshal ent.Account.Group as JSON: %w", err) - } - - buffer = append(buffer, marshaled...) - } - - { - buffer = append(buffer, `,"discoverable":`...) - - marshaled, err := json.Marshal(receiver.Discoverable) - if nil != err { - return nil, erorr.Errorf("mstdn/ent: could not marshal ent.Account.Discoverable as JSON: %w", err) - } - - buffer = append(buffer, marshaled...) - } - - { - if nul.Nothing[bool]() != receiver.NoIndex { - - buffer = append(buffer, `,"noindex":`...) - - marshaled, err := json.Marshal(receiver.NoIndex) - if nil != err { - return nil, erorr.Errorf("mstdn/ent: could not marshal ent.Account.NoIndex as JSON: %w", err) - } - - buffer = append(buffer, marshaled...) - } - } - - { - if nul.Nothing[AccountHolder]() != receiver.Moved { - - buffer = append(buffer, `,"moved":`...) - - marshaled, err := json.Marshal(receiver.Moved) - if nil != err { - return nil, erorr.Errorf("mstdn/ent: could not marshal ent.Account.Moved as JSON: %w", err) - } - - buffer = append(buffer, marshaled...) - } - } - - { - if opt.Nothing[bool]() != receiver.Suspended { - - buffer = append(buffer, `,"suspended":`...) - - marshaled, err := json.Marshal(receiver.Suspended) - if nil != err { - return nil, erorr.Errorf("mstdn/ent: could not marshal ent.Account.Suspended as JSON: %w", err) - } - - buffer = append(buffer, marshaled...) - } - } - - { - if opt.Nothing[bool]() != receiver.Limited { - - buffer = append(buffer, `,"limited":`...) - - marshaled, err := json.Marshal(receiver.Limited) - if nil != err { - return nil, erorr.Errorf("mstdn/ent: could not marshal ent.Account.Limited as JSON: %w", err) - } - - buffer = append(buffer, marshaled...) - } - } - - { - buffer = append(buffer, `,"created_at":`...) - - marshaled, err := json.Marshal(receiver.CreatedAt) - if nil != err { - return nil, erorr.Errorf("mstdn/ent: could not marshal ent.Account.CreatedAt as JSON: %w", err) - } - - buffer = append(buffer, marshaled...) - } - - { - buffer = append(buffer, `,"last_status_at":`...) - - marshaled, err := json.Marshal(receiver.LastStatusAt) - if nil != err { - return nil, erorr.Errorf("mstdn/ent: could not marshal ent.Account.LastStatusAt as JSON: %w", err) - } - - buffer = append(buffer, marshaled...) - } - - { - buffer = append(buffer, `,"statuses_count":`...) - - marshaled, err := json.Marshal(receiver.StatusesCount) - if nil != err { - return nil, erorr.Errorf("mstdn/ent: could not marshal ent.Account.StatusesCount as JSON: %w", err) - } - - buffer = append(buffer, marshaled...) - } - - { - buffer = append(buffer, `,"followers_count":`...) - - marshaled, err := json.Marshal(receiver.FollowersCount) - if nil != err { - return nil, erorr.Errorf("mstdn/ent: could not marshal ent.Account.FollowersCount as JSON: %w", err) - } - - buffer = append(buffer, marshaled...) - } - - { - buffer = append(buffer, `,"following_count":`...) - - marshaled, err := json.Marshal(receiver.FollowingCount) - if nil != err { - return nil, erorr.Errorf("mstdn/ent: could not marshal ent.Account.FollowingCount as JSON: %w", err) - } - - buffer = append(buffer, marshaled...) - } - - { - if nil != receiver.Roles { - - buffer = append(buffer, `,"roles":`...) - - marshaled, err := json.Marshal(receiver.Roles) - if nil != err { - return nil, erorr.Errorf("mstdn/ent: could not marshal ent.Account.Roles as JSON: %w", err) - } - - buffer = append(buffer, marshaled...) - } - } - - { - if nul.Nothing[string]() != receiver.MuteExpiresAt { - - buffer = append(buffer, `,"mute_expires_at":`...) - - marshaled, err := json.Marshal(receiver.MuteExpiresAt) - if nil != err { - return nil, erorr.Errorf("mstdn/ent: could not marshal ent.Account.MuteExpiresAt as JSON: %w", err) - } - - buffer = append(buffer, marshaled...) - } - } - - buffer = append(buffer, "}"...) - - return buffer, nil + UserName opt.Optional[string] `json:"username,omitempty"` + Acct opt.Optional[string] `json:"acct,omitempty"` + URL opt.Optional[string] `json:"url,omitempty"` + URI opt.Optional[string] `json:"uri,omitempty"` // currently undocumented, but is included in in account JSON returned from the Mastodon API on mastodon.social. + DisplayName opt.Optional[string] `json:"display_name,omitempty"` + Note opt.Optional[string] `json:"note,omitempty"` + Avatar opt.Optional[string] `json:"avatar,omitempty"` + AvatarStatic opt.Optional[string] `json:"avatar_static,omitempty"` + Header opt.Optional[string] `json:"header,omitempty"` + HeaderStatic opt.Optional[string] `json:"header_static,omitempty"` + Fields []Field `json:"fields,omitempty"` + Emojis []CustomEmoji `json:"emojis,omitempty"` + Locked opt.Optional[bool] `json:"locked,omitempty"` + Bot opt.Optional[bool] `json:"bot,omitempty"` + Group opt.Optional[bool] `json:"group,omitempty"` + Discoverable nul.Nullable[bool] `json:"discoverable,omitempty"` + NoIndex nul.Nullable[bool] `json:"noindex,omitempty"` + Moved nul.Nullable[AccountHolder] `json:"moved,omitempty"` + Suspended opt.Optional[bool] `json:"suspended,omitempty"` + Limited opt.Optional[bool] `json:"limited,omitempty"` + CreatedAt opt.Optional[string] `json:"created_at,omitempty"` + LastStatusAt nul.Nullable[string] `json:"last_status_at,omitempty"` + StatusesCount opt.Optional[jsonint.Int] `json:"statuses_count,omitempty"` + FollowersCount opt.Optional[jsonint.Int] `json:"followers_count,omitempty"` + FollowingCount opt.Optional[jsonint.Int] `json:"following_count,omitempty"` + Roles []Role `json:"roles,omitempty"` + MuteExpiresAt nul.Nullable[string] `json:"mute_expires_at,omitempty"` } diff --git a/ent/account_marshaljson_test.go b/ent/account_marshaljson_test.go index fde7e29..c5b439d 100644 --- a/ent/account_marshaljson_test.go +++ b/ent/account_marshaljson_test.go @@ -3,8 +3,7 @@ package ent_test import ( "testing" - "encoding/json" - + "github.com/reiver/go-json" "github.com/reiver/go-jsonint" "github.com/reiver/go-nul" "github.com/reiver/go-opt" @@ -37,13 +36,15 @@ func TestAccount_MarshalJSON(t *testing.T) { Bot: opt.Something(false), Group: opt.Something(false), Discoverable: nul.Null[bool](), + NoIndex: nul.Null[bool](), + Moved: nul.Null[ent.AccountHolder](), CreatedAt: opt.Something("2023-09-27T22:06:19Z"), LastStatusAt: nul.Null[string](), StatusesCount: opt.Something(jsonint.Int64(123)), FollowersCount: opt.Something(jsonint.Int64(24789)), FollowingCount: opt.Something(jsonint.Int64(355)), //Roles - //MuteExpiresAt + MuteExpiresAt: nul.Null[string](), }, Expected: `{`+ @@ -68,10 +69,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `"header":"https://files.example.com/header/joeblow.png"`+ `,`+ `"header_static":"https://files.example.com/header-static/joeblow.png"`+ - `,`+ - `"fields":[]`+ - `,`+ - `"emojis":[]`+ +// `,`+ +// `"fields":[]`+ +// `,`+ +// `"emojis":[]`+ `,`+ `"locked":false`+ `,`+ @@ -81,6 +82,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `,`+ `"discoverable":null`+ `,`+ + `"noindex":null`+ + `,`+ + `"moved":null`+ + `,`+ `"created_at":"2023-09-27T22:06:19Z"`+ `,`+ `"last_status_at":null`+ @@ -90,6 +95,8 @@ func TestAccount_MarshalJSON(t *testing.T) { `"followers_count":24789`+ `,`+ `"following_count":355`+ + `,`+ + `"mute_expires_at":null`+ `}`, }, @@ -120,13 +127,15 @@ func TestAccount_MarshalJSON(t *testing.T) { Bot: opt.Something(false), Group: opt.Something(false), Discoverable: nul.Null[bool](), + NoIndex: nul.Null[bool](), + Moved: nul.Null[ent.AccountHolder](), CreatedAt: opt.Something("2023-09-27T22:06:19Z"), LastStatusAt: nul.Null[string](), StatusesCount: opt.Something(jsonint.Int64(123)), FollowersCount: opt.Something(jsonint.Int64(24789)), FollowingCount: opt.Something(jsonint.Int64(355)), //Roles - //MuteExpiresAt + MuteExpiresAt: nul.Null[string](), }, Expected: `{`+ @@ -151,10 +160,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `"header":"https://files.example.com/header/joeblow.png"`+ `,`+ `"header_static":"https://files.example.com/header-static/joeblow.png"`+ - `,`+ - `"fields":[]`+ - `,`+ - `"emojis":[]`+ +// `,`+ +// `"fields":[]`+ +// `,`+ +// `"emojis":[]`+ `,`+ `"locked":true`+ `,`+ @@ -164,6 +173,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `,`+ `"discoverable":null`+ `,`+ + `"noindex":null`+ + `,`+ + `"moved":null`+ + `,`+ `"created_at":"2023-09-27T22:06:19Z"`+ `,`+ `"last_status_at":null`+ @@ -173,6 +186,8 @@ func TestAccount_MarshalJSON(t *testing.T) { `"followers_count":24789`+ `,`+ `"following_count":355`+ + `,`+ + `"mute_expires_at":null`+ `}`, }, @@ -197,13 +212,15 @@ func TestAccount_MarshalJSON(t *testing.T) { Bot: opt.Something(true), Group: opt.Something(false), Discoverable: nul.Null[bool](), + NoIndex: nul.Null[bool](), + Moved: nul.Null[ent.AccountHolder](), CreatedAt: opt.Something("2023-09-27T22:06:19Z"), LastStatusAt: nul.Null[string](), StatusesCount: opt.Something(jsonint.Int64(123)), FollowersCount: opt.Something(jsonint.Int64(24789)), FollowingCount: opt.Something(jsonint.Int64(355)), //Roles - //MuteExpiresAt + MuteExpiresAt: nul.Null[string](), }, Expected: `{`+ @@ -228,10 +245,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `"header":"https://files.example.com/header/joeblow.png"`+ `,`+ `"header_static":"https://files.example.com/header-static/joeblow.png"`+ - `,`+ - `"fields":[]`+ - `,`+ - `"emojis":[]`+ +// `,`+ +// `"fields":[]`+ +// `,`+ +// `"emojis":[]`+ `,`+ `"locked":false`+ `,`+ @@ -241,6 +258,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `,`+ `"discoverable":null`+ `,`+ + `"noindex":null`+ + `,`+ + `"moved":null`+ + `,`+ `"created_at":"2023-09-27T22:06:19Z"`+ `,`+ `"last_status_at":null`+ @@ -250,6 +271,8 @@ func TestAccount_MarshalJSON(t *testing.T) { `"followers_count":24789`+ `,`+ `"following_count":355`+ + `,`+ + `"mute_expires_at":null`+ `}`, }, @@ -274,13 +297,15 @@ func TestAccount_MarshalJSON(t *testing.T) { Bot: opt.Something(false), Group: opt.Something(true), Discoverable: nul.Null[bool](), + NoIndex: nul.Null[bool](), + Moved: nul.Null[ent.AccountHolder](), CreatedAt: opt.Something("2023-09-27T22:06:19Z"), LastStatusAt: nul.Null[string](), StatusesCount: opt.Something(jsonint.Int64(123)), FollowersCount: opt.Something(jsonint.Int64(24789)), FollowingCount: opt.Something(jsonint.Int64(355)), //Roles - //MuteExpiresAt + MuteExpiresAt: nul.Null[string](), }, Expected: `{`+ @@ -305,10 +330,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `"header":"https://files.example.com/header/joeblow.png"`+ `,`+ `"header_static":"https://files.example.com/header-static/joeblow.png"`+ - `,`+ - `"fields":[]`+ - `,`+ - `"emojis":[]`+ +// `,`+ +// `"fields":[]`+ +// `,`+ +// `"emojis":[]`+ `,`+ `"locked":false`+ `,`+ @@ -318,6 +343,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `,`+ `"discoverable":null`+ `,`+ + `"noindex":null`+ + `,`+ + `"moved":null`+ + `,`+ `"created_at":"2023-09-27T22:06:19Z"`+ `,`+ `"last_status_at":null`+ @@ -327,6 +356,8 @@ func TestAccount_MarshalJSON(t *testing.T) { `"followers_count":24789`+ `,`+ `"following_count":355`+ + `,`+ + `"mute_expires_at":null`+ `}`, }, @@ -356,13 +387,15 @@ func TestAccount_MarshalJSON(t *testing.T) { Bot: opt.Something(false), Group: opt.Something(false), Discoverable: nul.Something(false), + NoIndex: nul.Null[bool](), + Moved: nul.Null[ent.AccountHolder](), CreatedAt: opt.Something("2023-09-27T22:06:19Z"), LastStatusAt: nul.Null[string](), StatusesCount: opt.Something(jsonint.Int64(123)), FollowersCount: opt.Something(jsonint.Int64(24789)), FollowingCount: opt.Something(jsonint.Int64(355)), //Roles - //MuteExpiresAt + MuteExpiresAt: nul.Null[string](), }, Expected: `{`+ @@ -387,10 +420,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `"header":"https://files.example.com/header/janedoe.png"`+ `,`+ `"header_static":"https://files.example.com/header-static/janedoe.png"`+ - `,`+ - `"fields":[]`+ - `,`+ - `"emojis":[]`+ +// `,`+ +// `"fields":[]`+ +// `,`+ +// `"emojis":[]`+ `,`+ `"locked":false`+ `,`+ @@ -400,6 +433,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `,`+ `"discoverable":false`+ `,`+ + `"noindex":null`+ + `,`+ + `"moved":null`+ + `,`+ `"created_at":"2023-09-27T22:06:19Z"`+ `,`+ `"last_status_at":null`+ @@ -409,6 +446,8 @@ func TestAccount_MarshalJSON(t *testing.T) { `"followers_count":24789`+ `,`+ `"following_count":355`+ + `,`+ + `"mute_expires_at":null`+ `}`, }, @@ -433,13 +472,15 @@ func TestAccount_MarshalJSON(t *testing.T) { Bot: opt.Something(false), Group: opt.Something(false), Discoverable: nul.Something(true), + NoIndex: nul.Null[bool](), + Moved: nul.Null[ent.AccountHolder](), CreatedAt: opt.Something("2023-09-27T22:06:19Z"), LastStatusAt: nul.Null[string](), StatusesCount: opt.Something(jsonint.Int64(123)), FollowersCount: opt.Something(jsonint.Int64(24789)), FollowingCount: opt.Something(jsonint.Int64(355)), //Roles - //MuteExpiresAt + MuteExpiresAt: nul.Null[string](), }, Expected: `{`+ @@ -464,10 +505,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `"header":"https://files.example.com/header/janedoe.png"`+ `,`+ `"header_static":"https://files.example.com/header-static/janedoe.png"`+ - `,`+ - `"fields":[]`+ - `,`+ - `"emojis":[]`+ +// `,`+ +// `"fields":[]`+ +// `,`+ +// `"emojis":[]`+ `,`+ `"locked":false`+ `,`+ @@ -477,6 +518,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `,`+ `"discoverable":true`+ `,`+ + `"noindex":null`+ + `,`+ + `"moved":null`+ + `,`+ `"created_at":"2023-09-27T22:06:19Z"`+ `,`+ `"last_status_at":null`+ @@ -486,6 +531,8 @@ func TestAccount_MarshalJSON(t *testing.T) { `"followers_count":24789`+ `,`+ `"following_count":355`+ + `,`+ + `"mute_expires_at":null`+ `}`, }, @@ -516,13 +563,15 @@ func TestAccount_MarshalJSON(t *testing.T) { Bot: opt.Something(false), Group: opt.Something(false), Discoverable: nul.Null[bool](), + NoIndex: nul.Null[bool](), + Moved: nul.Null[ent.AccountHolder](), CreatedAt: opt.Something("2022-08-16T11:05:08Z"), LastStatusAt: nul.Something("2023-09-27T22:06:19Z"), StatusesCount: opt.Something(jsonint.Int64(123)), FollowersCount: opt.Something(jsonint.Int64(24789)), FollowingCount: opt.Something(jsonint.Int64(355)), //Roles - //MuteExpiresAt + MuteExpiresAt: nul.Null[string](), }, Expected: `{`+ @@ -547,10 +596,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `"header":"https://files.example.com/header/joeblow.png"`+ `,`+ `"header_static":"https://files.example.com/header-static/joeblow.png"`+ - `,`+ - `"fields":[]`+ - `,`+ - `"emojis":[]`+ +// `,`+ +// `"fields":[]`+ +// `,`+ +// `"emojis":[]`+ `,`+ `"locked":false`+ `,`+ @@ -560,6 +609,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `,`+ `"discoverable":null`+ `,`+ + `"noindex":null`+ + `,`+ + `"moved":null`+ + `,`+ `"created_at":"2022-08-16T11:05:08Z"`+ `,`+ `"last_status_at":"2023-09-27T22:06:19Z"`+ @@ -569,6 +622,8 @@ func TestAccount_MarshalJSON(t *testing.T) { `"followers_count":24789`+ `,`+ `"following_count":355`+ + `,`+ + `"mute_expires_at":null`+ `}`, }, @@ -599,13 +654,15 @@ func TestAccount_MarshalJSON(t *testing.T) { Bot: opt.Something(false), Group: opt.Something(false), Discoverable: nul.Null[bool](), + NoIndex: nul.Null[bool](), + Moved: nul.Null[ent.AccountHolder](), CreatedAt: opt.Something("2023-09-27T22:06:19Z"), LastStatusAt: nul.Null[string](), StatusesCount: opt.Something(jsonint.Int64(123)), FollowersCount: opt.Something(jsonint.Int64(24789)), FollowingCount: opt.Something(jsonint.Int64(355)), //Roles - //MuteExpiresAt + MuteExpiresAt: nul.Null[string](), }, Expected: `{`+ @@ -630,10 +687,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `"header":"https://files.example.com/header/joeblow.png"`+ `,`+ `"header_static":"https://files.example.com/header-static/joeblow.png"`+ - `,`+ - `"fields":[]`+ - `,`+ - `"emojis":[]`+ +// `,`+ +// `"fields":[]`+ +// `,`+ +// `"emojis":[]`+ `,`+ `"locked":false`+ `,`+ @@ -643,6 +700,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `,`+ `"discoverable":null`+ `,`+ + `"noindex":null`+ + `,`+ + `"moved":null`+ + `,`+ `"created_at":"2023-09-27T22:06:19Z"`+ `,`+ `"last_status_at":null`+ @@ -652,6 +713,8 @@ func TestAccount_MarshalJSON(t *testing.T) { `"followers_count":24789`+ `,`+ `"following_count":355`+ + `,`+ + `"mute_expires_at":null`+ `}`, }, @@ -676,13 +739,15 @@ func TestAccount_MarshalJSON(t *testing.T) { Bot: opt.Something(false), Group: opt.Something(false), Discoverable: nul.Null[bool](), + NoIndex: nul.Null[bool](), + Moved: nul.Null[ent.AccountHolder](), CreatedAt: opt.Something("2023-09-27T22:06:19Z"), LastStatusAt: nul.Null[string](), StatusesCount: opt.Something(jsonint.Int64(123)), FollowersCount: opt.Something(jsonint.Int64(24789)), FollowingCount: opt.Something(jsonint.Int64(355)), //Roles - //MuteExpiresAt + MuteExpiresAt: nul.Null[string](), }, Expected: `{`+ @@ -709,8 +774,8 @@ func TestAccount_MarshalJSON(t *testing.T) { `"header_static":"https://files.example.com/header-static/joeblow.png"`+ `,`+ `"fields":[]`+ - `,`+ - `"emojis":[]`+ +// `,`+ +// `"emojis":[]`+ `,`+ `"locked":false`+ `,`+ @@ -720,6 +785,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `,`+ `"discoverable":null`+ `,`+ + `"noindex":null`+ + `,`+ + `"moved":null`+ + `,`+ `"created_at":"2023-09-27T22:06:19Z"`+ `,`+ `"last_status_at":null`+ @@ -729,6 +798,8 @@ func TestAccount_MarshalJSON(t *testing.T) { `"followers_count":24789`+ `,`+ `"following_count":355`+ + `,`+ + `"mute_expires_at":null`+ `}`, }, @@ -748,23 +819,22 @@ func TestAccount_MarshalJSON(t *testing.T) { Header: opt.Something("https://files.example.com/header/joeblow.png"), HeaderStatic: opt.Something("https://files.example.com/header-static/joeblow.png"), Fields: []ent.Field{ - ent.Field{ - Name: opt.Something("alt"), - Value: opt.Something("@joeblow@greatape.social"), - }, + ent.FieldNameValue("alt", "@joeblow@greatape.social"), }, //Emojis Locked: opt.Something(false), Bot: opt.Something(false), Group: opt.Something(false), Discoverable: nul.Null[bool](), + NoIndex: nul.Null[bool](), + Moved: nul.Null[ent.AccountHolder](), CreatedAt: opt.Something("2023-09-27T22:06:19Z"), LastStatusAt: nul.Null[string](), StatusesCount: opt.Something(jsonint.Int64(123)), FollowersCount: opt.Something(jsonint.Int64(24789)), FollowingCount: opt.Something(jsonint.Int64(355)), //Roles - //MuteExpiresAt + MuteExpiresAt: nul.Null[string](), }, Expected: `{`+ @@ -800,8 +870,8 @@ func TestAccount_MarshalJSON(t *testing.T) { `}`+ `]`+ `,`+ - `"emojis":[]`+ - `,`+ +// `"emojis":[]`+ +// `,`+ `"locked":false`+ `,`+ `"bot":false`+ @@ -810,6 +880,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `,`+ `"discoverable":null`+ `,`+ + `"noindex":null`+ + `,`+ + `"moved":null`+ + `,`+ `"created_at":"2023-09-27T22:06:19Z"`+ `,`+ `"last_status_at":null`+ @@ -819,6 +893,8 @@ func TestAccount_MarshalJSON(t *testing.T) { `"followers_count":24789`+ `,`+ `"following_count":355`+ + `,`+ + `"mute_expires_at":null`+ `}`, }, @@ -838,28 +914,23 @@ func TestAccount_MarshalJSON(t *testing.T) { Header: opt.Something("https://files.example.com/header/joeblow.png"), HeaderStatic: opt.Something("https://files.example.com/header-static/joeblow.png"), Fields: []ent.Field{ - ent.Field{ - Name: opt.Something("alt"), - Value: opt.Something("@joeblow@greatape.social"), - }, - ent.Field{ - Name: opt.Something("alt (long-form)"), - Value: opt.Something("@joeblow@postfreely.social"), - VerifiedAt: nul.Something("2022-09-29T08:41:46Z"), - }, + ent.FieldNameValue("alt", "@joeblow@greatape.social"), + ent.FieldVerifiedNameValue("2022-09-29T08:41:46Z", "alt (long-form)", "@joeblow@postfreely.social"), }, //Emojis Locked: opt.Something(false), Bot: opt.Something(false), Group: opt.Something(false), Discoverable: nul.Null[bool](), + NoIndex: nul.Null[bool](), + Moved: nul.Null[ent.AccountHolder](), CreatedAt: opt.Something("2023-09-27T22:06:19Z"), LastStatusAt: nul.Null[string](), StatusesCount: opt.Something(jsonint.Int64(123)), FollowersCount: opt.Something(jsonint.Int64(24789)), FollowingCount: opt.Something(jsonint.Int64(355)), //Roles - //MuteExpiresAt + MuteExpiresAt: nul.Null[string](), }, Expected: `{`+ @@ -903,8 +974,8 @@ func TestAccount_MarshalJSON(t *testing.T) { `}`+ `]`+ `,`+ - `"emojis":[]`+ - `,`+ +// `"emojis":[]`+ +// `,`+ `"locked":false`+ `,`+ `"bot":false`+ @@ -913,6 +984,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `,`+ `"discoverable":null`+ `,`+ + `"noindex":null`+ + `,`+ + `"moved":null`+ + `,`+ `"created_at":"2023-09-27T22:06:19Z"`+ `,`+ `"last_status_at":null`+ @@ -922,6 +997,8 @@ func TestAccount_MarshalJSON(t *testing.T) { `"followers_count":24789`+ `,`+ `"following_count":355`+ + `,`+ + `"mute_expires_at":null`+ `}`, }, @@ -952,13 +1029,15 @@ func TestAccount_MarshalJSON(t *testing.T) { Bot: opt.Something(false), Group: opt.Something(false), Discoverable: nul.Null[bool](), + NoIndex: nul.Null[bool](), + Moved: nul.Null[ent.AccountHolder](), CreatedAt: opt.Something("2023-09-27T22:06:19Z"), LastStatusAt: nul.Null[string](), StatusesCount: opt.Something(jsonint.Int64(123)), FollowersCount: opt.Something(jsonint.Int64(24789)), FollowingCount: opt.Something(jsonint.Int64(355)), //Roles - //MuteExpiresAt + MuteExpiresAt: nul.Null[string](), }, Expected: `{`+ @@ -983,10 +1062,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `"header":"https://files.example.com/header/joeblow.png"`+ `,`+ `"header_static":"https://files.example.com/header-static/joeblow.png"`+ - `,`+ - `"fields":[]`+ - `,`+ - `"emojis":[]`+ +// `,`+ +// `"fields":[]`+ +// `,`+ +// `"emojis":[]`+ `,`+ `"locked":false`+ `,`+ @@ -996,6 +1075,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `,`+ `"discoverable":null`+ `,`+ + `"noindex":null`+ + `,`+ + `"moved":null`+ + `,`+ `"created_at":"2023-09-27T22:06:19Z"`+ `,`+ `"last_status_at":null`+ @@ -1005,6 +1088,8 @@ func TestAccount_MarshalJSON(t *testing.T) { `"followers_count":24789`+ `,`+ `"following_count":355`+ + `,`+ + `"mute_expires_at":null`+ `}`, }, @@ -1029,13 +1114,15 @@ func TestAccount_MarshalJSON(t *testing.T) { Bot: opt.Something(false), Group: opt.Something(false), Discoverable: nul.Null[bool](), + NoIndex: nul.Null[bool](), + Moved: nul.Null[ent.AccountHolder](), CreatedAt: opt.Something("2023-09-27T22:06:19Z"), LastStatusAt: nul.Null[string](), StatusesCount: opt.Something(jsonint.Int64(123)), FollowersCount: opt.Something(jsonint.Int64(24789)), FollowingCount: opt.Something(jsonint.Int64(355)), //Roles - //MuteExpiresAt + MuteExpiresAt: nul.Null[string](), }, Expected: `{`+ @@ -1060,8 +1147,8 @@ func TestAccount_MarshalJSON(t *testing.T) { `"header":"https://files.example.com/header/joeblow.png"`+ `,`+ `"header_static":"https://files.example.com/header-static/joeblow.png"`+ - `,`+ - `"fields":[]`+ +// `,`+ +// `"fields":[]`+ `,`+ `"emojis":[]`+ `,`+ @@ -1073,6 +1160,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `,`+ `"discoverable":null`+ `,`+ + `"noindex":null`+ + `,`+ + `"moved":null`+ + `,`+ `"created_at":"2023-09-27T22:06:19Z"`+ `,`+ `"last_status_at":null`+ @@ -1082,6 +1173,8 @@ func TestAccount_MarshalJSON(t *testing.T) { `"followers_count":24789`+ `,`+ `"following_count":355`+ + `,`+ + `"mute_expires_at":null`+ `}`, }, @@ -1113,13 +1206,15 @@ func TestAccount_MarshalJSON(t *testing.T) { Bot: opt.Something(false), Group: opt.Something(false), Discoverable: nul.Null[bool](), + NoIndex: nul.Null[bool](), + Moved: nul.Null[ent.AccountHolder](), CreatedAt: opt.Something("2023-09-27T22:06:19Z"), LastStatusAt: nul.Null[string](), StatusesCount: opt.Something(jsonint.Int64(123)), FollowersCount: opt.Something(jsonint.Int64(24789)), FollowingCount: opt.Something(jsonint.Int64(355)), //Roles - //MuteExpiresAt + MuteExpiresAt: nul.Null[string](), }, Expected: `{`+ @@ -1144,8 +1239,8 @@ func TestAccount_MarshalJSON(t *testing.T) { `"header":"https://files.example.com/header/joeblow.png"`+ `,`+ `"header_static":"https://files.example.com/header-static/joeblow.png"`+ - `,`+ - `"fields":[]`+ +// `,`+ +// `"fields":[]`+ `,`+ `"emojis":[`+ `{`+ @@ -1167,6 +1262,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `,`+ `"discoverable":null`+ `,`+ + `"noindex":null`+ + `,`+ + `"moved":null`+ + `,`+ `"created_at":"2023-09-27T22:06:19Z"`+ `,`+ `"last_status_at":null`+ @@ -1176,6 +1275,8 @@ func TestAccount_MarshalJSON(t *testing.T) { `"followers_count":24789`+ `,`+ `"following_count":355`+ + `,`+ + `"mute_expires_at":null`+ `}`, }, @@ -1213,13 +1314,15 @@ func TestAccount_MarshalJSON(t *testing.T) { Bot: opt.Something(false), Group: opt.Something(false), Discoverable: nul.Null[bool](), + NoIndex: nul.Null[bool](), + Moved: nul.Null[ent.AccountHolder](), CreatedAt: opt.Something("2023-09-27T22:06:19Z"), LastStatusAt: nul.Null[string](), StatusesCount: opt.Something(jsonint.Int64(123)), FollowersCount: opt.Something(jsonint.Int64(24789)), FollowingCount: opt.Something(jsonint.Int64(355)), //Roles - //MuteExpiresAt + MuteExpiresAt: nul.Null[string](), }, Expected: `{`+ @@ -1244,8 +1347,8 @@ func TestAccount_MarshalJSON(t *testing.T) { `"header":"https://files.example.com/header/joeblow.png"`+ `,`+ `"header_static":"https://files.example.com/header-static/joeblow.png"`+ - `,`+ - `"fields":[]`+ +// `,`+ +// `"fields":[]`+ `,`+ `"emojis":[`+ `{`+ @@ -1277,6 +1380,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `,`+ `"discoverable":null`+ `,`+ + `"noindex":null`+ + `,`+ + `"moved":null`+ + `,`+ `"created_at":"2023-09-27T22:06:19Z"`+ `,`+ `"last_status_at":null`+ @@ -1286,6 +1393,8 @@ func TestAccount_MarshalJSON(t *testing.T) { `"followers_count":24789`+ `,`+ `"following_count":355`+ + `,`+ + `"mute_expires_at":null`+ `}`, }, @@ -1330,13 +1439,15 @@ func TestAccount_MarshalJSON(t *testing.T) { Bot: opt.Something(false), Group: opt.Something(false), Discoverable: nul.Null[bool](), + NoIndex: nul.Null[bool](), + Moved: nul.Null[ent.AccountHolder](), CreatedAt: opt.Something("2023-09-27T22:06:19Z"), LastStatusAt: nul.Null[string](), StatusesCount: opt.Something(jsonint.Int64(123)), FollowersCount: opt.Something(jsonint.Int64(24789)), FollowingCount: opt.Something(jsonint.Int64(355)), //Roles - //MuteExpiresAt + MuteExpiresAt: nul.Null[string](), }, Expected: `{`+ @@ -1361,8 +1472,8 @@ func TestAccount_MarshalJSON(t *testing.T) { `"header":"https://files.example.com/header/joeblow.png"`+ `,`+ `"header_static":"https://files.example.com/header-static/joeblow.png"`+ - `,`+ - `"fields":[]`+ +// `,`+ +// `"fields":[]`+ `,`+ `"emojis":[`+ `{`+ @@ -1406,6 +1517,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `,`+ `"discoverable":null`+ `,`+ + `"noindex":null`+ + `,`+ + `"moved":null`+ + `,`+ `"created_at":"2023-09-27T22:06:19Z"`+ `,`+ `"last_status_at":null`+ @@ -1415,6 +1530,8 @@ func TestAccount_MarshalJSON(t *testing.T) { `"followers_count":24789`+ `,`+ `"following_count":355`+ + `,`+ + `"mute_expires_at":null`+ `}`, }, @@ -1445,13 +1562,15 @@ func TestAccount_MarshalJSON(t *testing.T) { Bot: opt.Something(false), Group: opt.Something(false), Discoverable: nul.Null[bool](), + NoIndex: nul.Null[bool](), + Moved: nul.Null[ent.AccountHolder](), CreatedAt: opt.Something("2023-09-27T22:06:19Z"), LastStatusAt: nul.Null[string](), StatusesCount: opt.Something(jsonint.Int64(123)), FollowersCount: opt.Something(jsonint.Int64(24789)), FollowingCount: opt.Something(jsonint.Int64(355)), Roles: nil, - //MuteExpiresAt + MuteExpiresAt: nul.Null[string](), }, Expected: `{`+ @@ -1476,10 +1595,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `"header":"https://files.example.com/header/joeblow.png"`+ `,`+ `"header_static":"https://files.example.com/header-static/joeblow.png"`+ - `,`+ - `"fields":[]`+ - `,`+ - `"emojis":[]`+ +// `,`+ +// `"fields":[]`+ +// `,`+ +// `"emojis":[]`+ `,`+ `"locked":false`+ `,`+ @@ -1489,6 +1608,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `,`+ `"discoverable":null`+ `,`+ + `"noindex":null`+ + `,`+ + `"moved":null`+ + `,`+ `"created_at":"2023-09-27T22:06:19Z"`+ `,`+ `"last_status_at":null`+ @@ -1498,6 +1621,8 @@ func TestAccount_MarshalJSON(t *testing.T) { `"followers_count":24789`+ `,`+ `"following_count":355`+ + `,`+ + `"mute_expires_at":null`+ `}`, }, @@ -1522,13 +1647,15 @@ func TestAccount_MarshalJSON(t *testing.T) { Bot: opt.Something(false), Group: opt.Something(false), Discoverable: nul.Null[bool](), + NoIndex: nul.Null[bool](), + Moved: nul.Null[ent.AccountHolder](), CreatedAt: opt.Something("2023-09-27T22:06:19Z"), LastStatusAt: nul.Null[string](), StatusesCount: opt.Something(jsonint.Int64(123)), FollowersCount: opt.Something(jsonint.Int64(24789)), FollowingCount: opt.Something(jsonint.Int64(355)), Roles: []ent.Role{}, - //MuteExpiresAt + MuteExpiresAt: nul.Null[string](), }, Expected: `{`+ @@ -1553,10 +1680,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `"header":"https://files.example.com/header/joeblow.png"`+ `,`+ `"header_static":"https://files.example.com/header-static/joeblow.png"`+ - `,`+ - `"fields":[]`+ - `,`+ - `"emojis":[]`+ +// `,`+ +// `"fields":[]`+ +// `,`+ +// `"emojis":[]`+ `,`+ `"locked":false`+ `,`+ @@ -1566,6 +1693,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `,`+ `"discoverable":null`+ `,`+ + `"noindex":null`+ + `,`+ + `"moved":null`+ + `,`+ `"created_at":"2023-09-27T22:06:19Z"`+ `,`+ `"last_status_at":null`+ @@ -1577,6 +1708,8 @@ func TestAccount_MarshalJSON(t *testing.T) { `"following_count":355`+ `,`+ `"roles":[]`+ + `,`+ + `"mute_expires_at":null`+ `}`, }, @@ -1601,6 +1734,8 @@ func TestAccount_MarshalJSON(t *testing.T) { Bot: opt.Something(false), Group: opt.Something(false), Discoverable: nul.Null[bool](), + NoIndex: nul.Null[bool](), + Moved: nul.Null[ent.AccountHolder](), CreatedAt: opt.Something("2023-09-27T22:06:19Z"), LastStatusAt: nul.Null[string](), StatusesCount: opt.Something(jsonint.Int64(123)), @@ -1615,7 +1750,7 @@ func TestAccount_MarshalJSON(t *testing.T) { Highlighted: opt.Something(true), }, }, - //MuteExpiresAt + MuteExpiresAt: nul.Null[string](), }, Expected: `{`+ @@ -1640,10 +1775,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `"header":"https://files.example.com/header/joeblow.png"`+ `,`+ `"header_static":"https://files.example.com/header-static/joeblow.png"`+ - `,`+ - `"fields":[]`+ - `,`+ - `"emojis":[]`+ +// `,`+ +// `"fields":[]`+ +// `,`+ +// `"emojis":[]`+ `,`+ `"locked":false`+ `,`+ @@ -1653,6 +1788,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `,`+ `"discoverable":null`+ `,`+ + `"noindex":null`+ + `,`+ + `"moved":null`+ + `,`+ `"created_at":"2023-09-27T22:06:19Z"`+ `,`+ `"last_status_at":null`+ @@ -1676,6 +1815,8 @@ func TestAccount_MarshalJSON(t *testing.T) { `"highlighted":true`+ `}`+ `]`+ + `,`+ + `"mute_expires_at":null`+ `}`, }, @@ -1700,6 +1841,8 @@ func TestAccount_MarshalJSON(t *testing.T) { Bot: opt.Something(false), Group: opt.Something(false), Discoverable: nul.Null[bool](), + NoIndex: nul.Null[bool](), + Moved: nul.Null[ent.AccountHolder](), CreatedAt: opt.Something("2023-09-27T22:06:19Z"), LastStatusAt: nul.Null[string](), StatusesCount: opt.Something(jsonint.Int64(123)), @@ -1721,7 +1864,7 @@ func TestAccount_MarshalJSON(t *testing.T) { Highlighted: opt.Something(false), }, }, - //MuteExpiresAt + MuteExpiresAt: nul.Null[string](), }, Expected: `{`+ @@ -1746,10 +1889,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `"header":"https://files.example.com/header/joeblow.png"`+ `,`+ `"header_static":"https://files.example.com/header-static/joeblow.png"`+ - `,`+ - `"fields":[]`+ - `,`+ - `"emojis":[]`+ +// `,`+ +// `"fields":[]`+ +// `,`+ +// `"emojis":[]`+ `,`+ `"locked":false`+ `,`+ @@ -1759,6 +1902,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `,`+ `"discoverable":null`+ `,`+ + `"noindex":null`+ + `,`+ + `"moved":null`+ + `,`+ `"created_at":"2023-09-27T22:06:19Z"`+ `,`+ `"last_status_at":null`+ @@ -1794,6 +1941,8 @@ func TestAccount_MarshalJSON(t *testing.T) { `"highlighted":false`+ `}`+ `]`+ + `,`+ + `"mute_expires_at":null`+ `}`, }, @@ -1818,6 +1967,8 @@ func TestAccount_MarshalJSON(t *testing.T) { Bot: opt.Something(false), Group: opt.Something(false), Discoverable: nul.Null[bool](), + NoIndex: nul.Null[bool](), + Moved: nul.Null[ent.AccountHolder](), CreatedAt: opt.Something("2023-09-27T22:06:19Z"), LastStatusAt: nul.Null[string](), StatusesCount: opt.Something(jsonint.Int64(123)), @@ -1845,7 +1996,7 @@ func TestAccount_MarshalJSON(t *testing.T) { Highlighted: opt.Something(false), }, }, - //MuteExpiresAt + MuteExpiresAt: nul.Null[string](), }, Expected: `{`+ @@ -1870,10 +2021,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `"header":"https://files.example.com/header/joeblow.png"`+ `,`+ `"header_static":"https://files.example.com/header-static/joeblow.png"`+ - `,`+ - `"fields":[]`+ - `,`+ - `"emojis":[]`+ +// `,`+ +// `"fields":[]`+ +// `,`+ +// `"emojis":[]`+ `,`+ `"locked":false`+ `,`+ @@ -1883,6 +2034,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `,`+ `"discoverable":null`+ `,`+ + `"noindex":null`+ + `,`+ + `"moved":null`+ + `,`+ `"created_at":"2023-09-27T22:06:19Z"`+ `,`+ `"last_status_at":null`+ @@ -1922,14 +2077,16 @@ func TestAccount_MarshalJSON(t *testing.T) { `"id":1`+ `,`+ `"name":"admin"`+ - `,`+ - `"color":""`+ +// `,`+ +// `"color":""`+ `,`+ `"permissions":4294967295`+ `,`+ `"highlighted":false`+ `}`+ `]`+ + `,`+ + `"mute_expires_at":null`+ `}`, }, @@ -1960,6 +2117,8 @@ func TestAccount_MarshalJSON(t *testing.T) { Bot: opt.Something(false), Group: opt.Something(false), Discoverable: nul.Null[bool](), + NoIndex: nul.Null[bool](), + Moved: nul.Null[ent.AccountHolder](), CreatedAt: opt.Something("2023-09-27T22:06:19Z"), LastStatusAt: nul.Null[string](), StatusesCount: opt.Something(jsonint.Int64(123)), @@ -1991,10 +2150,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `"header":"https://files.example.com/header/joeblow.png"`+ `,`+ `"header_static":"https://files.example.com/header-static/joeblow.png"`+ - `,`+ - `"fields":[]`+ - `,`+ - `"emojis":[]`+ +// `,`+ +// `"fields":[]`+ +// `,`+ +// `"emojis":[]`+ `,`+ `"locked":false`+ `,`+ @@ -2004,6 +2163,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `,`+ `"discoverable":null`+ `,`+ + `"noindex":null`+ + `,`+ + `"moved":null`+ + `,`+ `"created_at":"2023-09-27T22:06:19Z"`+ `,`+ `"last_status_at":null`+ @@ -2039,6 +2202,8 @@ func TestAccount_MarshalJSON(t *testing.T) { Bot: opt.Something(false), Group: opt.Something(false), Discoverable: nul.Null[bool](), + NoIndex: nul.Null[bool](), + Moved: nul.Null[ent.AccountHolder](), CreatedAt: opt.Something("2023-09-27T22:06:19Z"), LastStatusAt: nul.Null[string](), StatusesCount: opt.Something(jsonint.Int64(123)), @@ -2070,10 +2235,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `"header":"https://files.example.com/header/joeblow.png"`+ `,`+ `"header_static":"https://files.example.com/header-static/joeblow.png"`+ - `,`+ - `"fields":[]`+ - `,`+ - `"emojis":[]`+ +// `,`+ +// `"fields":[]`+ +// `,`+ +// `"emojis":[]`+ `,`+ `"locked":false`+ `,`+ @@ -2083,6 +2248,10 @@ func TestAccount_MarshalJSON(t *testing.T) { `,`+ `"discoverable":null`+ `,`+ + `"noindex":null`+ + `,`+ + `"moved":null`+ + `,`+ `"created_at":"2023-09-27T22:06:19Z"`+ `,`+ `"last_status_at":null`+