refactor(models): split objects and sets models into separate files
This commit is contained in:
parent
fbba2c035f
commit
e003bfd947
@ -1,10 +1,6 @@
|
|||||||
package models
|
package models
|
||||||
|
|
||||||
import (
|
import "time"
|
||||||
"time"
|
|
||||||
)
|
|
||||||
|
|
||||||
//#region Objects
|
|
||||||
|
|
||||||
type Role struct {
|
type Role struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
@ -72,46 +68,3 @@ type Kiroku struct {
|
|||||||
Alias Alias `json:"alias"`
|
Alias Alias `json:"alias"`
|
||||||
Datetime time.Time `json:"datetime"`
|
Datetime time.Time `json:"datetime"`
|
||||||
}
|
}
|
||||||
|
|
||||||
//#endregion Objects
|
|
||||||
|
|
||||||
//#region Sets
|
|
||||||
|
|
||||||
type Pagination struct {
|
|
||||||
Total int `json:"total"`
|
|
||||||
Offset int `json:"offset"`
|
|
||||||
Limit int `json:"limit"`
|
|
||||||
Count int `json:"count"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type Persons struct {
|
|
||||||
Pagination Pagination `json:"pagination"`
|
|
||||||
Persons []PersonBrief `json:"persons"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type Roles struct {
|
|
||||||
Pagination Pagination `json:"pagination"`
|
|
||||||
Roles []Role `json:"roles"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type Artists struct {
|
|
||||||
Pagination Pagination `json:"pagination"`
|
|
||||||
Artists []ArtistBrief `json:"artists"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type Tracks struct {
|
|
||||||
Pagination Pagination `json:"pagination"`
|
|
||||||
Tracks []TrackBrief `json:"tracks"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type Aliases struct {
|
|
||||||
Pagination Pagination `json:"pagination"`
|
|
||||||
Aliases []Alias `json:"aliases"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type Kirokus struct {
|
|
||||||
Pagination Pagination `json:"pagination"`
|
|
||||||
Kirokus []Kiroku `json:"kirokus"`
|
|
||||||
}
|
|
||||||
|
|
||||||
//#endregion Sets
|
|
||||||
38
internal/models/sets.go
Normal file
38
internal/models/sets.go
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
package models
|
||||||
|
|
||||||
|
type Pagination struct {
|
||||||
|
Total int `json:"total"`
|
||||||
|
Offset int `json:"offset"`
|
||||||
|
Limit int `json:"limit"`
|
||||||
|
Count int `json:"count"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type Persons struct {
|
||||||
|
Pagination Pagination `json:"pagination"`
|
||||||
|
Persons []PersonBrief `json:"persons"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type Roles struct {
|
||||||
|
Pagination Pagination `json:"pagination"`
|
||||||
|
Roles []Role `json:"roles"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type Artists struct {
|
||||||
|
Pagination Pagination `json:"pagination"`
|
||||||
|
Artists []ArtistBrief `json:"artists"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type Tracks struct {
|
||||||
|
Pagination Pagination `json:"pagination"`
|
||||||
|
Tracks []TrackBrief `json:"tracks"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type Aliases struct {
|
||||||
|
Pagination Pagination `json:"pagination"`
|
||||||
|
Aliases []Alias `json:"aliases"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type Kirokus struct {
|
||||||
|
Pagination Pagination `json:"pagination"`
|
||||||
|
Kirokus []Kiroku `json:"kirokus"`
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user