mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
added details, deathdate, hair color, weight to performers and added details to studios (#1274)
* added details to performers and studios * added deathdate, hair_color and weight to performers * Simplify performer/studio create mutations * Add changelog and recategorised Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
@@ -24,10 +24,13 @@ const (
|
||||
errParentStudioID = 12
|
||||
)
|
||||
|
||||
const studioName = "testStudio"
|
||||
const url = "url"
|
||||
const (
|
||||
studioName = "testStudio"
|
||||
url = "url"
|
||||
details = "details"
|
||||
|
||||
const parentStudioName = "parentStudio"
|
||||
parentStudioName = "parentStudio"
|
||||
)
|
||||
|
||||
var parentStudio models.Studio = models.Studio{
|
||||
Name: models.NullString(parentStudioName),
|
||||
@@ -37,15 +40,15 @@ var imageBytes = []byte("imageBytes")
|
||||
|
||||
const image = "aW1hZ2VCeXRlcw=="
|
||||
|
||||
var createTime time.Time = time.Date(2001, 01, 01, 0, 0, 0, 0, time.UTC)
|
||||
var updateTime time.Time = time.Date(2002, 01, 01, 0, 0, 0, 0, time.UTC)
|
||||
var createTime time.Time = time.Date(2001, 01, 01, 0, 0, 0, 0, time.Local)
|
||||
var updateTime time.Time = time.Date(2002, 01, 01, 0, 0, 0, 0, time.Local)
|
||||
|
||||
func createFullStudio(id int, parentID int) models.Studio {
|
||||
return models.Studio{
|
||||
ID: id,
|
||||
Name: models.NullString(studioName),
|
||||
URL: models.NullString(url),
|
||||
ParentID: models.NullInt64(int64(parentID)),
|
||||
ret := models.Studio{
|
||||
ID: id,
|
||||
Name: models.NullString(studioName),
|
||||
URL: models.NullString(url),
|
||||
Details: models.NullString(details),
|
||||
CreatedAt: models.SQLiteTimestamp{
|
||||
Timestamp: createTime,
|
||||
},
|
||||
@@ -53,6 +56,12 @@ func createFullStudio(id int, parentID int) models.Studio {
|
||||
Timestamp: updateTime,
|
||||
},
|
||||
}
|
||||
|
||||
if parentID != 0 {
|
||||
ret.ParentID = models.NullInt64(int64(parentID))
|
||||
}
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
func createEmptyStudio(id int) models.Studio {
|
||||
@@ -69,8 +78,9 @@ func createEmptyStudio(id int) models.Studio {
|
||||
|
||||
func createFullJSONStudio(parentStudio, image string) *jsonschema.Studio {
|
||||
return &jsonschema.Studio{
|
||||
Name: studioName,
|
||||
URL: url,
|
||||
Name: studioName,
|
||||
URL: url,
|
||||
Details: details,
|
||||
CreatedAt: models.JSONTime{
|
||||
Time: createTime,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user