Height |
diff --git a/frontend/src/pages/performers/performerForm/PerformerForm.tsx b/frontend/src/pages/performers/performerForm/PerformerForm.tsx
index bc3cbf16e..cd2321fd2 100644
--- a/frontend/src/pages/performers/performerForm/PerformerForm.tsx
+++ b/frontend/src/pages/performers/performerForm/PerformerForm.tsx
@@ -156,6 +156,7 @@ const PerformerForm: FC = ({
aliases: initialAliases,
gender: initial?.gender ?? performer?.gender ?? "",
birthdate: initial?.birthdate ?? performer?.birth_date ?? undefined,
+ deathdate: initial?.deathdate ?? performer?.death_date ?? undefined,
eye_color: getEnumValue(
EYE,
initial?.eye_color ?? performer?.eye_color ?? null,
@@ -234,6 +235,7 @@ const PerformerForm: FC = ({
disambiguation: data.disambiguation,
gender: GenderEnum[data.gender as keyof typeof GenderEnum] || null,
birthdate: data.birthdate,
+ deathdate: data.deathdate,
eye_color:
EyeColorEnum[data.eye_color as keyof typeof EyeColorEnum] || null,
hair_color:
@@ -296,6 +298,7 @@ const PerformerForm: FC = ({
{ error: errors.name?.message, tab: "personal" },
{ error: errors.gender?.message, tab: "personal" },
{ error: errors.birthdate?.message, tab: "personal" },
+ { error: errors.deathdate?.message, tab: "personal" },
{ error: errors.career_start_year?.message, tab: "personal" },
{ error: errors.career_end_year?.message, tab: "personal" },
{ error: errors.height?.message, tab: "personal" },
@@ -369,7 +372,7 @@ const PerformerForm: FC = ({
)}
-
+
Aliases
= ({
-
-
+
+
Gender
= ({
-
+
Birthdate
= ({
{errors?.birthdate?.message}
+
+
+
+ Deathdate
+
+
+ {errors?.deathdate?.message}
+
+
+
+
If the precise date is unknown the day and/or month can be
omitted.
-
+
+
Eye Color
diff --git a/frontend/src/pages/performers/performerForm/diff.ts b/frontend/src/pages/performers/performerForm/diff.ts
index eaf7d06e7..c6447b8ee 100644
--- a/frontend/src/pages/performers/performerForm/diff.ts
+++ b/frontend/src/pages/performers/performerForm/diff.ts
@@ -69,6 +69,7 @@ const selectPerformerDetails = (
disambiguation: diffValue(original?.disambiguation, data.disambiguation),
gender: diffValue(original?.gender, genderEnum(data.gender)),
birthdate: diffValue(original?.birth_date, data.birthdate),
+ deathdate: diffValue(original?.death_date, data.deathdate),
career_start_year: diffValue(
original?.career_start_year,
data.career_start_year,
@@ -96,6 +97,7 @@ const selectPerformerDetails = (
disambiguation: diffValue(data.disambiguation, original?.disambiguation),
gender: diffValue(genderEnum(data.gender), original?.gender),
birthdate: diffValue(data.birthdate, original?.birth_date),
+ deathdate: diffValue(data.deathdate, original?.death_date),
career_start_year: diffValue(
data.career_start_year,
original?.career_start_year,
diff --git a/frontend/src/pages/performers/performerForm/schema.ts b/frontend/src/pages/performers/performerForm/schema.ts
index b0412e44c..50c45a95f 100644
--- a/frontend/src/pages/performers/performerForm/schema.ts
+++ b/frontend/src/pages/performers/performerForm/schema.ts
@@ -37,6 +37,19 @@ export const PerformerSchema = yup.object({
dateWithinRange(date, "1900-01-01", addYears(new Date(), -18)),
)
.nullable(),
+ deathdate: yup
+ .string()
+ .trim()
+ .transform(nullCheck)
+ .matches(/^\d{4}$|^\d{4}-\d{2}$|^\d{4}-\d{2}-\d{2}$/, {
+ excludeEmptyString: true,
+ message: "Invalid date, must be YYYY, YYYY-MM, or YYYY-MM-DD",
+ })
+ .test("valid-date", "Invalid date", isValidDate)
+ .test("date-outside-range", "Outside of range", (date) =>
+ dateWithinRange(date, "1900-01-01", new Date().toISOString().slice(10)),
+ )
+ .nullable(),
career_start_year: yup
.number()
.transform(zeroCheck)
diff --git a/frontend/src/pages/performers/performerForm/types.ts b/frontend/src/pages/performers/performerForm/types.ts
index 6dec48d80..2397caca8 100644
--- a/frontend/src/pages/performers/performerForm/types.ts
+++ b/frontend/src/pages/performers/performerForm/types.ts
@@ -11,6 +11,7 @@ export type InitialPerformer = {
disambiguation?: string | null;
gender?: GenderEnum | null;
birthdate?: string | null;
+ deathdate?: string | null;
height?: number | null;
hair_color?: HairColorEnum | null;
eye_color?: EyeColorEnum | null;
diff --git a/graphql/schema/types/performer.graphql b/graphql/schema/types/performer.graphql
index a50133cf9..8f4dce6aa 100644
--- a/graphql/schema/types/performer.graphql
+++ b/graphql/schema/types/performer.graphql
@@ -93,6 +93,7 @@ type Performer {
urls: [URL!]!
birthdate: FuzzyDate @deprecated(reason: "Please use `birth_date`")
birth_date: String
+ death_date: String
age: Int # resolver
ethnicity: EthnicityEnum
country: String
@@ -148,6 +149,7 @@ input PerformerCreateInput {
gender: GenderEnum
urls: [URLInput!]
birthdate: String
+ deathdate: String
ethnicity: EthnicityEnum
country: String
eye_color: EyeColorEnum
@@ -174,6 +176,7 @@ input PerformerUpdateInput {
gender: GenderEnum
urls: [URLInput!]
birthdate: String
+ deathdate: String
ethnicity: EthnicityEnum
country: String
eye_color: EyeColorEnum
@@ -202,6 +205,7 @@ input PerformerEditDetailsInput {
gender: GenderEnum
urls: [URLInput!]
birthdate: String
+ deathdate: String
ethnicity: EthnicityEnum
country: String
eye_color: EyeColorEnum
@@ -244,6 +248,7 @@ type PerformerEdit {
added_urls: [URL!]
removed_urls: [URL!]
birthdate: String
+ deathdate: String
ethnicity: EthnicityEnum
country: String
eye_color: EyeColorEnum
@@ -308,6 +313,7 @@ input BodyModificationCriterionInput {
enum PerformerSortEnum {
NAME
BIRTHDATE
+ DEATHDATE
SCENE_COUNT
CAREER_START_YEAR
DEBUT
@@ -334,6 +340,7 @@ input PerformerQueryInput {
url: String
birthdate: DateCriterionInput
+ deathdate: DateCriterionInput
birth_year: IntCriterionInput
age: IntCriterionInput
@@ -376,6 +383,7 @@ type PerformerDraft {
aliases: String
gender: String
birthdate: String
+ deathdate: String
urls: [String!]
ethnicity: String
country: String
@@ -398,6 +406,7 @@ input PerformerDraftInput {
aliases: String
gender: String
birthdate: String
+ deathdate: String
urls: [String!]
ethnicity: String
country: String
diff --git a/pkg/api/graphql_client_test.go b/pkg/api/graphql_client_test.go
index fd59ccebd..df20ed706 100644
--- a/pkg/api/graphql_client_test.go
+++ b/pkg/api/graphql_client_test.go
@@ -76,6 +76,7 @@ type performerOutput struct {
Disambiguation *string `json:"disambiguation"`
Gender *string `json:"gender"`
Birthdate *string `json:"birth_date"`
+ Deathdate *string `json:"death_date"`
Ethnicity *string `json:"ethnicity"`
Country *string `json:"country"`
EyeColor *string `json:"eye_color"`
diff --git a/pkg/api/integration_test.go b/pkg/api/integration_test.go
index 5d71fa613..62943ff08 100644
--- a/pkg/api/integration_test.go
+++ b/pkg/api/integration_test.go
@@ -286,6 +286,7 @@ func (s *testRunner) createFullPerformerCreateInput() *models.PerformerCreateInp
careerend := 2020
tattoodesc := "Tatto Desc"
birthdate := "2000-02-03"
+ deathdate := "2024-01-02"
site, err := s.createTestSite(nil)
if err != nil {
return nil
@@ -303,6 +304,7 @@ func (s *testRunner) createFullPerformerCreateInput() *models.PerformerCreateInp
},
},
Birthdate: &birthdate,
+ Deathdate: &deathdate,
Ethnicity: ðnicity,
Country: &country,
EyeColor: &eyecolor,
@@ -732,6 +734,7 @@ func (s *testRunner) createPerformerEditDetailsInput() *models.PerformerEditDeta
careerend := 2020
tattoodesc := "Tatto Desc"
birthdate := "2000-02-03"
+ deathdate := "2024-01-02"
site, err := s.createTestSite(nil)
if err != nil {
return nil
@@ -749,6 +752,7 @@ func (s *testRunner) createPerformerEditDetailsInput() *models.PerformerEditDeta
},
},
Birthdate: &birthdate,
+ Deathdate: &deathdate,
Ethnicity: ðnicity,
Country: &country,
EyeColor: &eyecolor,
diff --git a/pkg/api/performer_edit_integration_test.go b/pkg/api/performer_edit_integration_test.go
index accf506e8..3ed0ea66c 100644
--- a/pkg/api/performer_edit_integration_test.go
+++ b/pkg/api/performer_edit_integration_test.go
@@ -54,9 +54,11 @@ func (s *performerEditTestRunner) testModifyPerformerEdit() {
existingName := "performerName"
existingBirthdate := "1990-01-02"
+ existingDeathdate := "2024-11-22"
performerCreateInput := models.PerformerCreateInput{
Name: existingName,
Birthdate: &existingBirthdate,
+ Deathdate: &existingDeathdate,
}
createdPerformer, err := s.createTestPerformer(&performerCreateInput)
assert.NilError(s.t, err)
@@ -90,6 +92,7 @@ func (s *performerEditTestRunner) verifyPerformerEditDetails(input models.Perfor
c.strPtrStrPtr(input.Name, performerDetails.Name, "Name")
c.strPtrStrPtr(input.Disambiguation, performerDetails.Disambiguation, "Disambiguation")
c.strPtrStrPtr(input.Birthdate, performerDetails.Birthdate, "Birthdate")
+ c.strPtrStrPtr(input.Deathdate, performerDetails.Deathdate, "Deathdate")
assert.DeepEqual(s.t, input.Aliases, performerDetails.AddedAliases)
assert.Assert(s.t, input.Gender.IsValid() && (input.Gender.String() == *performerDetails.Gender))
@@ -146,6 +149,12 @@ func (s *performerEditTestRunner) verifyPerformerEdit(input models.PerformerEdit
assert.Equal(s.t, *input.Birthdate, performer.Birthdate.String)
}
+ if input.Deathdate == nil {
+ assert.Assert(s.t, !performer.Deathdate.Valid)
+ } else {
+ assert.Equal(s.t, *input.Deathdate, performer.Deathdate.String)
+ }
+
if input.Ethnicity == nil {
assert.Assert(s.t, !performer.Ethnicity.Valid)
} else {
diff --git a/pkg/api/performer_integration_test.go b/pkg/api/performer_integration_test.go
index 043463811..3577bf502 100644
--- a/pkg/api/performer_integration_test.go
+++ b/pkg/api/performer_integration_test.go
@@ -35,6 +35,7 @@ func (s *performerTestRunner) testCreatePerformer() {
hairColor := models.HairColorEnumBlonde
breastType := models.BreastTypeEnumNatural
birthdate := "2001-02-03"
+ deathdate := "2024-12-23"
site, err := s.createTestSite(nil)
assert.NilError(s.t, err)
@@ -50,6 +51,7 @@ func (s *performerTestRunner) testCreatePerformer() {
},
},
Birthdate: &birthdate,
+ Deathdate: &deathdate,
Ethnicity: ðnicity,
Country: &country,
EyeColor: &eyeColor,
@@ -105,6 +107,9 @@ func (s *performerTestRunner) verifyCreatedPerformer(input models.PerformerCreat
birthdate, _ := r.BirthDate(s.ctx, performer)
assert.DeepEqual(s.t, birthdate, input.Birthdate)
+ deathdate, _ := r.DeathDate(s.ctx, performer)
+ assert.DeepEqual(s.t, deathdate, input.Deathdate)
+
ethnicity, _ := r.Ethnicity(s.ctx, performer)
assert.DeepEqual(s.t, ethnicity, input.Ethnicity)
@@ -166,6 +171,7 @@ func (s *performerTestRunner) testUpdatePerformer() {
bandSize := 32
tattooDesc := "Foobar"
date := "2001-02-03"
+ deathdate := "2024-11-23"
site, err := s.createTestSite(nil)
assert.NilError(s.t, err)
@@ -179,6 +185,7 @@ func (s *performerTestRunner) testUpdatePerformer() {
},
},
Birthdate: &date,
+ Deathdate: &deathdate,
CupSize: &cupSize,
BandSize: &bandSize,
WaistSize: &bandSize,
@@ -212,6 +219,7 @@ func (s *performerTestRunner) testUpdatePerformer() {
},
},
Birthdate: &date,
+ Deathdate: &deathdate,
CupSize: &cupSize,
BandSize: &bandSize,
WaistSize: &bandSize,
@@ -235,6 +243,7 @@ func (s *performerTestRunner) testUpdatePerformer() {
"aliases",
"urls",
"birthdate",
+ "deathdate",
"tattoos",
"piercings",
"cup_size",
@@ -265,6 +274,9 @@ func (s *performerTestRunner) verifyUpdatedPerformer(input models.PerformerUpdat
birthdate, _ := s.resolver.Performer().BirthDate(s.ctx, performer)
assert.DeepEqual(s.t, birthdate, input.Birthdate)
+ deathdate, _ := s.resolver.Performer().DeathDate(s.ctx, performer)
+ assert.DeepEqual(s.t, deathdate, input.Deathdate)
+
tattoos, _ := s.resolver.Performer().Tattoos(s.ctx, performer)
assert.Assert(s.t, compareBodyMods(input.Tattoos, tattoos))
diff --git a/pkg/api/resolver_model_performer.go b/pkg/api/resolver_model_performer.go
index a34e43e10..ffea7bd32 100644
--- a/pkg/api/resolver_model_performer.go
+++ b/pkg/api/resolver_model_performer.go
@@ -55,6 +55,10 @@ func (r *performerResolver) BirthDate(ctx context.Context, obj *models.Performer
return resolveNullString(obj.Birthdate), nil
}
+func (r *performerResolver) DeathDate(ctx context.Context, obj *models.Performer) (*string, error) {
+ return resolveNullString(obj.Deathdate), nil
+}
+
func (r *performerResolver) Age(ctx context.Context, obj *models.Performer) (*int, error) {
if !obj.Birthdate.Valid {
return nil, nil
@@ -65,11 +69,19 @@ func (r *performerResolver) Age(ctx context.Context, obj *models.Performer) (*in
return nil, nil
}
+ end := time.Now()
+ if obj.Deathdate.Valid {
+ deathdate, err := utils.ParseDateStringAsTime(obj.Deathdate.String)
+ if err == nil {
+ end = deathdate
+ }
+ }
+
birthYear := birthdate.Year()
- now := time.Now()
- thisYear := now.Year()
+ thisYear := end.Year()
age := thisYear - birthYear
- if now.YearDay() < birthdate.YearDay() {
+
+ if end.YearDay() < birthdate.YearDay() {
age--
}
diff --git a/pkg/api/resolver_mutation_draft.go b/pkg/api/resolver_mutation_draft.go
index b296ad969..cb5a98f30 100644
--- a/pkg/api/resolver_mutation_draft.go
+++ b/pkg/api/resolver_mutation_draft.go
@@ -93,6 +93,7 @@ func (r *mutationResolver) SubmitPerformerDraft(ctx context.Context, input model
Aliases: input.Aliases,
Gender: input.Gender,
Birthdate: input.Birthdate,
+ Deathdate: input.Deathdate,
Urls: input.Urls,
Ethnicity: input.Ethnicity,
Country: input.Country,
diff --git a/pkg/database/database.go b/pkg/database/database.go
index 3210deaa7..338803918 100644
--- a/pkg/database/database.go
+++ b/pkg/database/database.go
@@ -4,7 +4,7 @@ import (
"github.com/jmoiron/sqlx"
)
-var appSchemaVersion uint = 43
+var appSchemaVersion uint = 44
var databaseProviders map[string]databaseProvider
diff --git a/pkg/database/migrations/postgres/44_performer_death_date.up.sql b/pkg/database/migrations/postgres/44_performer_death_date.up.sql
new file mode 100644
index 000000000..bf60fef74
--- /dev/null
+++ b/pkg/database/migrations/postgres/44_performer_death_date.up.sql
@@ -0,0 +1 @@
+ALTER TABLE "performers" ADD COLUMN "deathdate" TEXT;
diff --git a/pkg/models/extension_edit_details.go b/pkg/models/extension_edit_details.go
index 89c38eecd..a6f7c33f1 100644
--- a/pkg/models/extension_edit_details.go
+++ b/pkg/models/extension_edit_details.go
@@ -47,6 +47,10 @@ func (e PerformerEditDetailsInput) PerformerEditFromDiff(orig Performer, inputAr
return nil, err
}
+ if err := ValidateFuzzyString(e.Deathdate); err != nil {
+ return nil, err
+ }
+
newData := &PerformerEdit{}
oldData := &PerformerEdit{}
@@ -63,6 +67,9 @@ func (e PerformerEditDetailsInput) PerformerEditFromDiff(orig Performer, inputAr
if e.Birthdate != nil || inputArgs.Field("birthdate").IsNull() {
oldData.Birthdate, newData.Birthdate = ed.nullString(orig.Birthdate, e.Birthdate)
}
+ if e.Deathdate != nil || inputArgs.Field("deathdate").IsNull() {
+ oldData.Deathdate, newData.Deathdate = ed.nullString(orig.Deathdate, e.Deathdate)
+ }
if e.Ethnicity != nil || inputArgs.Field("ethnicity").IsNull() {
oldData.Ethnicity, newData.Ethnicity = ed.nullStringEnum(orig.Ethnicity, e.Ethnicity)
}
diff --git a/pkg/models/extension_edit_details_test.go b/pkg/models/extension_edit_details_test.go
index d63d8baf8..adaf7aa14 100644
--- a/pkg/models/extension_edit_details_test.go
+++ b/pkg/models/extension_edit_details_test.go
@@ -25,6 +25,7 @@ var (
bGenderStr = bGender.String()
aDate = "2001-01-01"
bDate = "2002-01"
+ dDate = "2024-11"
aEthnicity = EthnicityEnumAsian
bEthnicity = EthnicityEnumBlack
aEthnicityStr = aEthnicity.String()
@@ -161,6 +162,7 @@ func TestPerformerEditFromDiff(t *testing.T) {
Disambiguation: &bDisambiguation,
Gender: &bGender,
Birthdate: &bDate,
+ Deathdate: &dDate,
Ethnicity: &bEthnicity,
Country: &bCountry,
EyeColor: &bEyeColor,
@@ -183,6 +185,7 @@ func TestPerformerEditFromDiff(t *testing.T) {
Disambiguation: &bDisambiguation,
Gender: &bGenderStr,
Birthdate: &bDate,
+ Deathdate: &dDate,
Ethnicity: &bEthnicityStr,
Country: &bCountry,
EyeColor: &bEyeColorStr,
@@ -227,6 +230,7 @@ func TestPerformerEditFromDiff(t *testing.T) {
Disambiguation: &bDisambiguation,
Gender: &bGenderStr,
Birthdate: &bDate,
+ Deathdate: &dDate,
Ethnicity: &bEthnicityStr,
Country: &bCountry,
EyeColor: &bEyeColorStr,
diff --git a/pkg/models/generated_exec.go b/pkg/models/generated_exec.go
index 5f324e6cc..bce1d751b 100644
--- a/pkg/models/generated_exec.go
+++ b/pkg/models/generated_exec.go
@@ -290,6 +290,7 @@ type ComplexityRoot struct {
Country func(childComplexity int) int
Created func(childComplexity int) int
CupSize func(childComplexity int) int
+ DeathDate func(childComplexity int) int
Deleted func(childComplexity int) int
Disambiguation func(childComplexity int) int
Edits func(childComplexity int) int
@@ -328,6 +329,7 @@ type ComplexityRoot struct {
CareerEndYear func(childComplexity int) int
CareerStartYear func(childComplexity int) int
Country func(childComplexity int) int
+ Deathdate func(childComplexity int) int
Disambiguation func(childComplexity int) int
Ethnicity func(childComplexity int) int
EyeColor func(childComplexity int) int
@@ -357,6 +359,7 @@ type ComplexityRoot struct {
CareerStartYear func(childComplexity int) int
Country func(childComplexity int) int
CupSize func(childComplexity int) int
+ Deathdate func(childComplexity int) int
Disambiguation func(childComplexity int) int
DraftID func(childComplexity int) int
Ethnicity func(childComplexity int) int
@@ -784,6 +787,7 @@ type PerformerResolver interface {
Urls(ctx context.Context, obj *Performer) ([]*URL, error)
Birthdate(ctx context.Context, obj *Performer) (*FuzzyDate, error)
BirthDate(ctx context.Context, obj *Performer) (*string, error)
+ DeathDate(ctx context.Context, obj *Performer) (*string, error)
Age(ctx context.Context, obj *Performer) (*int, error)
Ethnicity(ctx context.Context, obj *Performer) (*EthnicityEnum, error)
Country(ctx context.Context, obj *Performer) (*string, error)
@@ -2271,6 +2275,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Performer.CupSize(childComplexity), true
+ case "Performer.death_date":
+ if e.complexity.Performer.DeathDate == nil {
+ break
+ }
+
+ return e.complexity.Performer.DeathDate(childComplexity), true
+
case "Performer.deleted":
if e.complexity.Performer.Deleted == nil {
break
@@ -2500,6 +2511,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.PerformerDraft.Country(childComplexity), true
+ case "PerformerDraft.deathdate":
+ if e.complexity.PerformerDraft.Deathdate == nil {
+ break
+ }
+
+ return e.complexity.PerformerDraft.Deathdate(childComplexity), true
+
case "PerformerDraft.disambiguation":
if e.complexity.PerformerDraft.Disambiguation == nil {
break
@@ -2682,6 +2700,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.PerformerEdit.CupSize(childComplexity), true
+ case "PerformerEdit.deathdate":
+ if e.complexity.PerformerEdit.Deathdate == nil {
+ break
+ }
+
+ return e.complexity.PerformerEdit.Deathdate(childComplexity), true
+
case "PerformerEdit.disambiguation":
if e.complexity.PerformerEdit.Disambiguation == nil {
break
@@ -5037,6 +5062,7 @@ type Performer {
urls: [URL!]!
birthdate: FuzzyDate @deprecated(reason: "Please use ` + "`" + `birth_date` + "`" + `")
birth_date: String
+ death_date: String
age: Int # resolver
ethnicity: EthnicityEnum
country: String
@@ -5092,6 +5118,7 @@ input PerformerCreateInput {
gender: GenderEnum
urls: [URLInput!]
birthdate: String
+ deathdate: String
ethnicity: EthnicityEnum
country: String
eye_color: EyeColorEnum
@@ -5118,6 +5145,7 @@ input PerformerUpdateInput {
gender: GenderEnum
urls: [URLInput!]
birthdate: String
+ deathdate: String
ethnicity: EthnicityEnum
country: String
eye_color: EyeColorEnum
@@ -5146,6 +5174,7 @@ input PerformerEditDetailsInput {
gender: GenderEnum
urls: [URLInput!]
birthdate: String
+ deathdate: String
ethnicity: EthnicityEnum
country: String
eye_color: EyeColorEnum
@@ -5188,6 +5217,7 @@ type PerformerEdit {
added_urls: [URL!]
removed_urls: [URL!]
birthdate: String
+ deathdate: String
ethnicity: EthnicityEnum
country: String
eye_color: EyeColorEnum
@@ -5252,6 +5282,7 @@ input BodyModificationCriterionInput {
enum PerformerSortEnum {
NAME
BIRTHDATE
+ DEATHDATE
SCENE_COUNT
CAREER_START_YEAR
DEBUT
@@ -5278,6 +5309,7 @@ input PerformerQueryInput {
url: String
birthdate: DateCriterionInput
+ deathdate: DateCriterionInput
birth_year: IntCriterionInput
age: IntCriterionInput
@@ -5320,6 +5352,7 @@ type PerformerDraft {
aliases: String
gender: String
birthdate: String
+ deathdate: String
urls: [String!]
ethnicity: String
country: String
@@ -5342,6 +5375,7 @@ input PerformerDraftInput {
aliases: String
gender: String
birthdate: String
+ deathdate: String
urls: [String!]
ethnicity: String
country: String
@@ -13429,6 +13463,8 @@ func (ec *executionContext) fieldContext_Mutation_performerCreate(ctx context.Co
return ec.fieldContext_Performer_birthdate(ctx, field)
case "birth_date":
return ec.fieldContext_Performer_birth_date(ctx, field)
+ case "death_date":
+ return ec.fieldContext_Performer_death_date(ctx, field)
case "age":
return ec.fieldContext_Performer_age(ctx, field)
case "ethnicity":
@@ -13580,6 +13616,8 @@ func (ec *executionContext) fieldContext_Mutation_performerUpdate(ctx context.Co
return ec.fieldContext_Performer_birthdate(ctx, field)
case "birth_date":
return ec.fieldContext_Performer_birth_date(ctx, field)
+ case "death_date":
+ return ec.fieldContext_Performer_death_date(ctx, field)
case "age":
return ec.fieldContext_Performer_age(ctx, field)
case "ethnicity":
@@ -18693,6 +18731,47 @@ func (ec *executionContext) fieldContext_Performer_birth_date(_ context.Context,
return fc, nil
}
+func (ec *executionContext) _Performer_death_date(ctx context.Context, field graphql.CollectedField, obj *Performer) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Performer_death_date(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Performer().DeathDate(rctx, obj)
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Performer_death_date(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Performer",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _Performer_age(ctx context.Context, field graphql.CollectedField, obj *Performer) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Performer_age(ctx, field)
if err != nil {
@@ -20021,6 +20100,8 @@ func (ec *executionContext) fieldContext_PerformerAppearance_performer(_ context
return ec.fieldContext_Performer_birthdate(ctx, field)
case "birth_date":
return ec.fieldContext_Performer_birth_date(ctx, field)
+ case "death_date":
+ return ec.fieldContext_Performer_death_date(ctx, field)
case "age":
return ec.fieldContext_Performer_age(ctx, field)
case "ethnicity":
@@ -20372,6 +20453,47 @@ func (ec *executionContext) fieldContext_PerformerDraft_birthdate(_ context.Cont
return fc, nil
}
+func (ec *executionContext) _PerformerDraft_deathdate(ctx context.Context, field graphql.CollectedField, obj *PerformerDraft) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PerformerDraft_deathdate(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Deathdate, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_PerformerDraft_deathdate(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PerformerDraft",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _PerformerDraft_urls(ctx context.Context, field graphql.CollectedField, obj *PerformerDraft) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_PerformerDraft_urls(ctx, field)
if err != nil {
@@ -21259,6 +21381,47 @@ func (ec *executionContext) fieldContext_PerformerEdit_birthdate(_ context.Conte
return fc, nil
}
+func (ec *executionContext) _PerformerEdit_deathdate(ctx context.Context, field graphql.CollectedField, obj *PerformerEdit) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PerformerEdit_deathdate(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Deathdate, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_PerformerEdit_deathdate(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PerformerEdit",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _PerformerEdit_ethnicity(ctx context.Context, field graphql.CollectedField, obj *PerformerEdit) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_PerformerEdit_ethnicity(ctx, field)
if err != nil {
@@ -22613,6 +22776,8 @@ func (ec *executionContext) fieldContext_Query_findPerformer(ctx context.Context
return ec.fieldContext_Performer_birthdate(ctx, field)
case "birth_date":
return ec.fieldContext_Performer_birth_date(ctx, field)
+ case "death_date":
+ return ec.fieldContext_Performer_death_date(ctx, field)
case "age":
return ec.fieldContext_Performer_age(ctx, field)
case "ethnicity":
@@ -24834,6 +24999,8 @@ func (ec *executionContext) fieldContext_Query_searchPerformer(ctx context.Conte
return ec.fieldContext_Performer_birthdate(ctx, field)
case "birth_date":
return ec.fieldContext_Performer_birth_date(ctx, field)
+ case "death_date":
+ return ec.fieldContext_Performer_death_date(ctx, field)
case "age":
return ec.fieldContext_Performer_age(ctx, field)
case "ethnicity":
@@ -26296,6 +26463,8 @@ func (ec *executionContext) fieldContext_QueryExistingPerformerResult_performers
return ec.fieldContext_Performer_birthdate(ctx, field)
case "birth_date":
return ec.fieldContext_Performer_birth_date(ctx, field)
+ case "death_date":
+ return ec.fieldContext_Performer_death_date(ctx, field)
case "age":
return ec.fieldContext_Performer_age(ctx, field)
case "ethnicity":
@@ -26724,6 +26893,8 @@ func (ec *executionContext) fieldContext_QueryPerformersResultType_performers(_
return ec.fieldContext_Performer_birthdate(ctx, field)
case "birth_date":
return ec.fieldContext_Performer_birth_date(ctx, field)
+ case "death_date":
+ return ec.fieldContext_Performer_death_date(ctx, field)
case "age":
return ec.fieldContext_Performer_age(ctx, field)
case "ethnicity":
@@ -37519,7 +37690,7 @@ func (ec *executionContext) unmarshalInputPerformerCreateInput(ctx context.Conte
asMap[k] = v
}
- fieldsInOrder := [...]string{"name", "disambiguation", "aliases", "gender", "urls", "birthdate", "ethnicity", "country", "eye_color", "hair_color", "height", "cup_size", "band_size", "waist_size", "hip_size", "breast_type", "career_start_year", "career_end_year", "tattoos", "piercings", "image_ids", "draft_id"}
+ fieldsInOrder := [...]string{"name", "disambiguation", "aliases", "gender", "urls", "birthdate", "deathdate", "ethnicity", "country", "eye_color", "hair_color", "height", "cup_size", "band_size", "waist_size", "hip_size", "breast_type", "career_start_year", "career_end_year", "tattoos", "piercings", "image_ids", "draft_id"}
for _, k := range fieldsInOrder {
v, ok := asMap[k]
if !ok {
@@ -37568,6 +37739,13 @@ func (ec *executionContext) unmarshalInputPerformerCreateInput(ctx context.Conte
return it, err
}
it.Birthdate = data
+ case "deathdate":
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("deathdate"))
+ data, err := ec.unmarshalOString2ᚖstring(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ it.Deathdate = data
case "ethnicity":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ethnicity"))
data, err := ec.unmarshalOEthnicityEnum2ᚖgithubᚗcomᚋstashappᚋstashᚑboxᚋpkgᚋmodelsᚐEthnicityEnum(ctx, v)
@@ -37720,7 +37898,7 @@ func (ec *executionContext) unmarshalInputPerformerDraftInput(ctx context.Contex
asMap[k] = v
}
- fieldsInOrder := [...]string{"id", "disambiguation", "name", "aliases", "gender", "birthdate", "urls", "ethnicity", "country", "eye_color", "hair_color", "height", "measurements", "breast_type", "tattoos", "piercings", "career_start_year", "career_end_year", "image"}
+ fieldsInOrder := [...]string{"id", "disambiguation", "name", "aliases", "gender", "birthdate", "deathdate", "urls", "ethnicity", "country", "eye_color", "hair_color", "height", "measurements", "breast_type", "tattoos", "piercings", "career_start_year", "career_end_year", "image"}
for _, k := range fieldsInOrder {
v, ok := asMap[k]
if !ok {
@@ -37769,6 +37947,13 @@ func (ec *executionContext) unmarshalInputPerformerDraftInput(ctx context.Contex
return it, err
}
it.Birthdate = data
+ case "deathdate":
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("deathdate"))
+ data, err := ec.unmarshalOString2ᚖstring(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ it.Deathdate = data
case "urls":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("urls"))
data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v)
@@ -37873,7 +38058,7 @@ func (ec *executionContext) unmarshalInputPerformerEditDetailsInput(ctx context.
asMap[k] = v
}
- fieldsInOrder := [...]string{"name", "disambiguation", "aliases", "gender", "urls", "birthdate", "ethnicity", "country", "eye_color", "hair_color", "height", "cup_size", "band_size", "waist_size", "hip_size", "breast_type", "career_start_year", "career_end_year", "tattoos", "piercings", "image_ids", "draft_id"}
+ fieldsInOrder := [...]string{"name", "disambiguation", "aliases", "gender", "urls", "birthdate", "deathdate", "ethnicity", "country", "eye_color", "hair_color", "height", "cup_size", "band_size", "waist_size", "hip_size", "breast_type", "career_start_year", "career_end_year", "tattoos", "piercings", "image_ids", "draft_id"}
for _, k := range fieldsInOrder {
v, ok := asMap[k]
if !ok {
@@ -37922,6 +38107,13 @@ func (ec *executionContext) unmarshalInputPerformerEditDetailsInput(ctx context.
return it, err
}
it.Birthdate = data
+ case "deathdate":
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("deathdate"))
+ data, err := ec.unmarshalOString2ᚖstring(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ it.Deathdate = data
case "ethnicity":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ethnicity"))
data, err := ec.unmarshalOEthnicityEnum2ᚖgithubᚗcomᚋstashappᚋstashᚑboxᚋpkgᚋmodelsᚐEthnicityEnum(ctx, v)
@@ -38142,7 +38334,7 @@ func (ec *executionContext) unmarshalInputPerformerQueryInput(ctx context.Contex
asMap["sort"] = "CREATED_AT"
}
- fieldsInOrder := [...]string{"names", "name", "alias", "disambiguation", "gender", "url", "birthdate", "birth_year", "age", "ethnicity", "country", "eye_color", "hair_color", "height", "cup_size", "band_size", "waist_size", "hip_size", "breast_type", "career_start_year", "career_end_year", "tattoos", "piercings", "is_favorite", "performed_with", "studio_id", "page", "per_page", "direction", "sort"}
+ fieldsInOrder := [...]string{"names", "name", "alias", "disambiguation", "gender", "url", "birthdate", "deathdate", "birth_year", "age", "ethnicity", "country", "eye_color", "hair_color", "height", "cup_size", "band_size", "waist_size", "hip_size", "breast_type", "career_start_year", "career_end_year", "tattoos", "piercings", "is_favorite", "performed_with", "studio_id", "page", "per_page", "direction", "sort"}
for _, k := range fieldsInOrder {
v, ok := asMap[k]
if !ok {
@@ -38198,6 +38390,13 @@ func (ec *executionContext) unmarshalInputPerformerQueryInput(ctx context.Contex
return it, err
}
it.Birthdate = data
+ case "deathdate":
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("deathdate"))
+ data, err := ec.unmarshalODateCriterionInput2ᚖgithubᚗcomᚋstashappᚋstashᚑboxᚋpkgᚋmodelsᚐDateCriterionInput(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ it.Deathdate = data
case "birth_year":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("birth_year"))
data, err := ec.unmarshalOIntCriterionInput2ᚖgithubᚗcomᚋstashappᚋstashᚑboxᚋpkgᚋmodelsᚐIntCriterionInput(ctx, v)
@@ -38413,7 +38612,7 @@ func (ec *executionContext) unmarshalInputPerformerUpdateInput(ctx context.Conte
asMap[k] = v
}
- fieldsInOrder := [...]string{"id", "name", "disambiguation", "aliases", "gender", "urls", "birthdate", "ethnicity", "country", "eye_color", "hair_color", "height", "cup_size", "band_size", "waist_size", "hip_size", "breast_type", "career_start_year", "career_end_year", "tattoos", "piercings", "image_ids"}
+ fieldsInOrder := [...]string{"id", "name", "disambiguation", "aliases", "gender", "urls", "birthdate", "deathdate", "ethnicity", "country", "eye_color", "hair_color", "height", "cup_size", "band_size", "waist_size", "hip_size", "breast_type", "career_start_year", "career_end_year", "tattoos", "piercings", "image_ids"}
for _, k := range fieldsInOrder {
v, ok := asMap[k]
if !ok {
@@ -38469,6 +38668,13 @@ func (ec *executionContext) unmarshalInputPerformerUpdateInput(ctx context.Conte
return it, err
}
it.Birthdate = data
+ case "deathdate":
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("deathdate"))
+ data, err := ec.unmarshalOString2ᚖstring(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ it.Deathdate = data
case "ethnicity":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ethnicity"))
data, err := ec.unmarshalOEthnicityEnum2ᚖgithubᚗcomᚋstashappᚋstashᚑboxᚋpkgᚋmodelsᚐEthnicityEnum(ctx, v)
@@ -43647,6 +43853,39 @@ func (ec *executionContext) _Performer(ctx context.Context, sel ast.SelectionSet
continue
}
+ out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
+ case "death_date":
+ field := field
+
+ innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._Performer_death_date(ctx, field, obj)
+ return res
+ }
+
+ if field.Deferrable != nil {
+ dfs, ok := deferred[field.Deferrable.Label]
+ di := 0
+ if ok {
+ dfs.AddField(field)
+ di = len(dfs.Values) - 1
+ } else {
+ dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
+ deferred[field.Deferrable.Label] = dfs
+ }
+ dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
+ return innerFunc(ctx, dfs)
+ })
+
+ // don't run the out.Concurrently() call below
+ out.Values[i] = graphql.Null
+ continue
+ }
+
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
case "age":
field := field
@@ -44631,6 +44870,8 @@ func (ec *executionContext) _PerformerDraft(ctx context.Context, sel ast.Selecti
out.Values[i] = ec._PerformerDraft_gender(ctx, field, obj)
case "birthdate":
out.Values[i] = ec._PerformerDraft_birthdate(ctx, field, obj)
+ case "deathdate":
+ out.Values[i] = ec._PerformerDraft_deathdate(ctx, field, obj)
case "urls":
out.Values[i] = ec._PerformerDraft_urls(ctx, field, obj)
case "ethnicity":
@@ -44769,6 +45010,8 @@ func (ec *executionContext) _PerformerEdit(ctx context.Context, sel ast.Selectio
out.Values[i] = ec._PerformerEdit_removed_urls(ctx, field, obj)
case "birthdate":
out.Values[i] = ec._PerformerEdit_birthdate(ctx, field, obj)
+ case "deathdate":
+ out.Values[i] = ec._PerformerEdit_deathdate(ctx, field, obj)
case "ethnicity":
field := field
diff --git a/pkg/models/generated_models.go b/pkg/models/generated_models.go
index a5ef1c3f7..7bdbb495d 100644
--- a/pkg/models/generated_models.go
+++ b/pkg/models/generated_models.go
@@ -329,6 +329,7 @@ type PerformerCreateInput struct {
Gender *GenderEnum `json:"gender,omitempty"`
Urls []*URLInput `json:"urls,omitempty"`
Birthdate *string `json:"birthdate,omitempty"`
+ Deathdate *string `json:"deathdate,omitempty"`
Ethnicity *EthnicityEnum `json:"ethnicity,omitempty"`
Country *string `json:"country,omitempty"`
EyeColor *EyeColorEnum `json:"eye_color,omitempty"`
@@ -358,6 +359,7 @@ type PerformerDraftInput struct {
Aliases *string `json:"aliases,omitempty"`
Gender *string `json:"gender,omitempty"`
Birthdate *string `json:"birthdate,omitempty"`
+ Deathdate *string `json:"deathdate,omitempty"`
Urls []string `json:"urls,omitempty"`
Ethnicity *string `json:"ethnicity,omitempty"`
Country *string `json:"country,omitempty"`
@@ -380,6 +382,7 @@ type PerformerEditDetailsInput struct {
Gender *GenderEnum `json:"gender,omitempty"`
Urls []*URLInput `json:"urls,omitempty"`
Birthdate *string `json:"birthdate,omitempty"`
+ Deathdate *string `json:"deathdate,omitempty"`
Ethnicity *EthnicityEnum `json:"ethnicity,omitempty"`
Country *string `json:"country,omitempty"`
EyeColor *EyeColorEnum `json:"eye_color,omitempty"`
@@ -432,6 +435,7 @@ type PerformerQueryInput struct {
// Filter to search urls - assumes like query unless quoted
URL *string `json:"url,omitempty"`
Birthdate *DateCriterionInput `json:"birthdate,omitempty"`
+ Deathdate *DateCriterionInput `json:"deathdate,omitempty"`
BirthYear *IntCriterionInput `json:"birth_year,omitempty"`
Age *IntCriterionInput `json:"age,omitempty"`
Ethnicity *EthnicityFilterEnum `json:"ethnicity,omitempty"`
@@ -477,6 +481,7 @@ type PerformerUpdateInput struct {
Gender *GenderEnum `json:"gender,omitempty"`
Urls []*URLInput `json:"urls,omitempty"`
Birthdate *string `json:"birthdate,omitempty"`
+ Deathdate *string `json:"deathdate,omitempty"`
Ethnicity *EthnicityEnum `json:"ethnicity,omitempty"`
Country *string `json:"country,omitempty"`
EyeColor *EyeColorEnum `json:"eye_color,omitempty"`
@@ -1591,6 +1596,7 @@ type PerformerSortEnum string
const (
PerformerSortEnumName PerformerSortEnum = "NAME"
PerformerSortEnumBirthdate PerformerSortEnum = "BIRTHDATE"
+ PerformerSortEnumDeathdate PerformerSortEnum = "DEATHDATE"
PerformerSortEnumSceneCount PerformerSortEnum = "SCENE_COUNT"
PerformerSortEnumCareerStartYear PerformerSortEnum = "CAREER_START_YEAR"
PerformerSortEnumDebut PerformerSortEnum = "DEBUT"
@@ -1602,6 +1608,7 @@ const (
var AllPerformerSortEnum = []PerformerSortEnum{
PerformerSortEnumName,
PerformerSortEnumBirthdate,
+ PerformerSortEnumDeathdate,
PerformerSortEnumSceneCount,
PerformerSortEnumCareerStartYear,
PerformerSortEnumDebut,
@@ -1612,7 +1619,7 @@ var AllPerformerSortEnum = []PerformerSortEnum{
func (e PerformerSortEnum) IsValid() bool {
switch e {
- case PerformerSortEnumName, PerformerSortEnumBirthdate, PerformerSortEnumSceneCount, PerformerSortEnumCareerStartYear, PerformerSortEnumDebut, PerformerSortEnumLastScene, PerformerSortEnumCreatedAt, PerformerSortEnumUpdatedAt:
+ case PerformerSortEnumName, PerformerSortEnumBirthdate, PerformerSortEnumDeathdate, PerformerSortEnumSceneCount, PerformerSortEnumCareerStartYear, PerformerSortEnumDebut, PerformerSortEnumLastScene, PerformerSortEnumCreatedAt, PerformerSortEnumUpdatedAt:
return true
}
return false
diff --git a/pkg/models/model_draft.go b/pkg/models/model_draft.go
index 537ff2d24..e47abde7f 100644
--- a/pkg/models/model_draft.go
+++ b/pkg/models/model_draft.go
@@ -50,6 +50,7 @@ type PerformerDraft struct {
Aliases *string `json:"aliases,omitempty"`
Gender *string `json:"gender,omitempty"`
Birthdate *string `json:"birthdate,omitempty"`
+ Deathdate *string `json:"deathdate,omitempty"`
Urls []string `json:"urls,omitempty"`
Ethnicity *string `json:"ethnicity,omitempty"`
Country *string `json:"country,omitempty"`
diff --git a/pkg/models/model_edit.go b/pkg/models/model_edit.go
index 7f63ee0d4..74422445f 100644
--- a/pkg/models/model_edit.go
+++ b/pkg/models/model_edit.go
@@ -312,6 +312,7 @@ type PerformerEdit struct {
AddedUrls []*URL `json:"added_urls,omitempty"`
RemovedUrls []*URL `json:"removed_urls,omitempty"`
Birthdate *string `json:"birthdate,omitempty"`
+ Deathdate *string `json:"deathdate,omitempty"`
Ethnicity *string `json:"ethnicity,omitempty"`
Country *string `json:"country,omitempty"`
EyeColor *string `json:"eye_color,omitempty"`
diff --git a/pkg/models/model_performer.go b/pkg/models/model_performer.go
index dca8907d6..c83f83972 100644
--- a/pkg/models/model_performer.go
+++ b/pkg/models/model_performer.go
@@ -14,6 +14,7 @@ type Performer struct {
Disambiguation sql.NullString `db:"disambiguation" json:"disambiguation"`
Gender sql.NullString `db:"gender" json:"gender"`
Birthdate sql.NullString `db:"birthdate" json:"birthdate"`
+ Deathdate sql.NullString `db:"deathdate" json:"deathdate"`
Ethnicity sql.NullString `db:"ethnicity" json:"ethnicity"`
Country sql.NullString `db:"country" json:"country"`
EyeColor sql.NullString `db:"eye_color" json:"eye_color"`
@@ -350,6 +351,7 @@ func (p *Performer) CopyFromPerformerEdit(input PerformerEdit, old PerformerEdit
fe.nullInt64(&p.HipSize, input.HipSize, old.HipSize)
fe.nullInt64(&p.WaistSize, input.WaistSize, old.WaistSize)
fe.nullString(&p.Birthdate, input.Birthdate, old.Birthdate)
+ fe.nullString(&p.Deathdate, input.Deathdate, old.Deathdate)
p.UpdatedAt = time.Now()
}
@@ -373,6 +375,7 @@ func (p *Performer) ValidateModifyEdit(edit PerformerEditData) error {
v.int64("hip size", edit.Old.HipSize, p.HipSize.Int64)
v.int64("waist size", edit.Old.WaistSize, p.WaistSize.Int64)
v.string("birthdate", edit.Old.Birthdate, p.Birthdate.String)
+ v.string("deathdate", edit.Old.Deathdate, p.Deathdate.String)
return v.err
}
diff --git a/pkg/models/model_performer_test.go b/pkg/models/model_performer_test.go
index 4a208fa1c..be37607a7 100644
--- a/pkg/models/model_performer_test.go
+++ b/pkg/models/model_performer_test.go
@@ -13,6 +13,7 @@ func TestCopyFromPerformerEdit(t *testing.T) {
Disambiguation: &bDisambiguation,
Gender: &bGenderStr,
Birthdate: &bDate,
+ Deathdate: &dDate,
Ethnicity: &bEthnicityStr,
Country: &bCountry,
EyeColor: &bEyeColorStr,
@@ -73,6 +74,7 @@ func TestCopyFromPerformerEdit(t *testing.T) {
Disambiguation: sql.NullString{String: bDisambiguation, Valid: true},
Gender: sql.NullString{String: bGender.String(), Valid: true},
Birthdate: sql.NullString{String: bDate, Valid: true},
+ Deathdate: sql.NullString{String: dDate, Valid: true},
Ethnicity: sql.NullString{String: bEthnicityStr, Valid: true},
Country: sql.NullString{String: bCountry, Valid: true},
EyeColor: sql.NullString{String: bEyeColorStr, Valid: true},
From 176ea378fe51be6740a5ae3f25b0a6764313a48d Mon Sep 17 00:00:00 2001
From: InfiniteStash <117855276+InfiniteStash@users.noreply.github.com>
Date: Tue, 10 Dec 2024 13:22:11 +0000
Subject: [PATCH 2/3] FOrmat/generate
---
frontend/src/graphql/types.ts | 5 +++++
.../pages/performers/components/performerInfo.tsx | 12 +++++-------
.../pages/performers/performerForm/PerformerForm.tsx | 3 +--
3 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/frontend/src/graphql/types.ts b/frontend/src/graphql/types.ts
index 589fcac2a..b125d04db 100644
--- a/frontend/src/graphql/types.ts
+++ b/frontend/src/graphql/types.ts
@@ -15909,6 +15909,7 @@ export type EditUpdateQuery = {
disambiguation?: string | null;
gender?: GenderEnum | null;
birthdate?: string | null;
+ deathdate?: string | null;
ethnicity?: EthnicityEnum | null;
country?: string | null;
eye_color?: EyeColorEnum | null;
@@ -55671,6 +55672,10 @@ export const EditUpdateDocument = {
kind: "Field",
name: { kind: "Name", value: "birthdate" },
},
+ {
+ kind: "Field",
+ name: { kind: "Name", value: "deathdate" },
+ },
{
kind: "Field",
name: { kind: "Name", value: "ethnicity" },
diff --git a/frontend/src/pages/performers/components/performerInfo.tsx b/frontend/src/pages/performers/components/performerInfo.tsx
index 214a4fe67..de1d4b886 100644
--- a/frontend/src/pages/performers/components/performerInfo.tsx
+++ b/frontend/src/pages/performers/components/performerInfo.tsx
@@ -87,11 +87,7 @@ const Actions: FC = ({ performer }) => {
);
};
-const PerformerAge = ({
- age,
-}: {
- age?: number | null;
-}): React.ReactNode => {
+const PerformerAge = ({ age }: { age?: number | null }): React.ReactNode => {
if (!age) return "";
return {`${age} years old`};
};
@@ -147,10 +143,12 @@ export const PerformerInfo: FC = ({ performer }) => {
Birthdate |
{performer.birth_date}
- { !performer.death_date && }
+ {!performer.death_date && (
+
+ )}
|
|
- { performer.death_date && (
+ {performer.death_date && (