style(backend/models): change JSON names to camelCase

This commit is contained in:
Masahiko AMANO 2025-07-03 18:07:33 +03:00
parent 27184bf17a
commit 24075e5a76

View File

@ -9,7 +9,7 @@ import (
type User struct { type User struct {
Name string `json:"name"` Name string `json:"name"`
IsAdmin bool `json:"is_admin"` IsAdmin bool `json:"isAdmin"`
} }
type MIME struct { type MIME struct {
@ -28,7 +28,7 @@ type (
} }
CategoryFull struct { CategoryFull struct {
CategoryCore CategoryCore
CreatedAt time.Time `json:"created_at"` CreatedAt time.Time `json:"createdAt"`
Creator User `json:"creator"` Creator User `json:"creator"`
Notes pgtype.Text `json:"notes"` Notes pgtype.Text `json:"notes"`
} }
@ -42,12 +42,12 @@ type (
} }
FileItem struct { FileItem struct {
FileCore FileCore
CreatedAt time.Time `json:"created_at"` CreatedAt time.Time `json:"createdAt"`
Creator User `json:"creator"` Creator User `json:"creator"`
} }
FileFull struct { FileFull struct {
FileCore FileCore
CreatedAt time.Time `json:"created_at"` CreatedAt time.Time `json:"createdAt"`
Creator User `json:"creator"` Creator User `json:"creator"`
Notes pgtype.Text `json:"notes"` Notes pgtype.Text `json:"notes"`
Metadata *json.RawMessage `json:"metadata"` Metadata *json.RawMessage `json:"metadata"`
@ -67,16 +67,16 @@ type (
TagFull struct { TagFull struct {
TagCore TagCore
Category CategoryCore `json:"category"` Category CategoryCore `json:"category"`
CreatedAt time.Time `json:"created_at"` CreatedAt time.Time `json:"createdAt"`
Creator User `json:"creator"` Creator User `json:"creator"`
Notes pgtype.Text `json:"notes"` Notes pgtype.Text `json:"notes"`
} }
) )
type Autotag struct { type Autotag struct {
TriggerTag TagCore `json:"trigger_tag"` TriggerTag TagCore `json:"triggerTag"`
AddTag TagCore `json:"add_tag"` AddTag TagCore `json:"addTag"`
IsActive bool `json:"is_active"` IsActive bool `json:"isActive"`
} }
type ( type (
@ -89,7 +89,7 @@ type (
} }
PoolFull struct { PoolFull struct {
PoolCore PoolCore
CreatedAt time.Time `json:"created_at"` CreatedAt time.Time `json:"createdAt"`
Creator User `json:"creator"` Creator User `json:"creator"`
Notes pgtype.Text `json:"notes"` Notes pgtype.Text `json:"notes"`
} }
@ -97,10 +97,10 @@ type (
type Session struct { type Session struct {
ID int `json:"id"` ID int `json:"id"`
UserAgent string `json:"user_agent"` UserAgent string `json:"userAgent"`
StartedAt time.Time `json:"started_at"` StartedAt time.Time `json:"startedAt"`
ExpiresAt time.Time `json:"expires_at"` ExpiresAt time.Time `json:"expiresAt"`
LastActivity time.Time `json:"last_activity"` LastActivity time.Time `json:"lastActivity"`
} }
type Pagination struct { type Pagination struct {