Skip to content

Commit

Permalink
Merge pull request #58 from feminizidmap/change_field_types
Browse files Browse the repository at this point in the history
Change field types, close #45
  • Loading branch information
lislis authored Nov 25, 2024
2 parents c20a5e2 + c183a91 commit ecaf85b
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 41 deletions.
10 changes: 10 additions & 0 deletions src/api/case/content-types/case/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,16 @@
},
"report_of_crime_details": {
"type": "string"
},
"authorities_involved": {
"type": "component",
"repeatable": true,
"component": "comments.comments"
},
"media_labels_used": {
"type": "component",
"repeatable": true,
"component": "comments.comments"
}
}
}
5 changes: 3 additions & 2 deletions src/components/comments/comments.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
"collectionName": "components_comments_comments",
"info": {
"displayName": "comments",
"icon": "feather"
"icon": "feather",
"description": ""
},
"options": {},
"attributes": {
"comment": {
"type": "text",
"type": "string",
"private": true
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/crime/crime.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
},
"weapons": {
"type": "relation",
"relation": "oneToOne",
"relation": "oneToMany",
"target": "api::weapon.weapon"
},
"weapon_details": {
"type": "string"
},
"motives": {
"type": "relation",
"relation": "oneToOne",
"relation": "oneToMany",
"target": "api::dropdown-motive.dropdown-motive"
},
"motive_details": {
Expand Down
6 changes: 0 additions & 6 deletions src/components/perpretrator/perpetrator.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,6 @@
"type": "text",
"private": true
},
"migration_background": {
"type": "relation",
"relation": "oneToOne",
"target": "api::dropdown-general-option.dropdown-general-option",
"private": true
},
"citizenship_details": {
"type": "text",
"private": true
Expand Down
21 changes: 21 additions & 0 deletions src/components/survived-by/survived-by.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"collectionName": "components_survived_by_survived_bies",
"info": {
"displayName": "survived_by",
"description": ""
},
"options": {},
"attributes": {
"dropdown_hinterbliebene": {
"type": "relation",
"relation": "oneToOne",
"target": "api::dropdown-surviving-dependent.dropdown-surviving-dependent"
},
"age": {
"type": "integer"
},
"relation_details": {
"type": "string"
}
}
}
16 changes: 5 additions & 11 deletions src/components/victim/victim.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,6 @@
"relation": "oneToOne",
"target": "api::dropdown-general-option.dropdown-general-option"
},
"survived_by": {
"type": "relation",
"relation": "oneToOne",
"target": "api::dropdown-general-option.dropdown-general-option"
},
"survived_by_details": {
"type": "string"
},
Expand All @@ -95,12 +90,6 @@
"relation": "oneToOne",
"target": "api::feminicide-type.feminicide-type"
},
"migration_background": {
"type": "relation",
"relation": "oneToOne",
"target": "api::dropdown-general-option.dropdown-general-option",
"private": true
},
"citizenship_details": {
"type": "text",
"private": true
Expand All @@ -115,6 +104,11 @@
},
"type_of_feminicide_details": {
"type": "string"
},
"survived_by": {
"type": "component",
"repeatable": true,
"component": "survived-by.survived-by"
}
}
}
43 changes: 23 additions & 20 deletions types/generated/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ export interface CommentsComments extends Schema.Component {
info: {
displayName: 'comments';
icon: 'feather';
description: '';
};
attributes: {
comment: Attribute.Text & Attribute.Private;
comment: Attribute.String & Attribute.Private;
};
}

Expand All @@ -55,13 +56,13 @@ export interface CrimeCrime extends Schema.Component {
>;
weapons: Attribute.Relation<
'crime.crime',
'oneToOne',
'oneToMany',
'api::weapon.weapon'
>;
weapon_details: Attribute.String;
motives: Attribute.Relation<
'crime.crime',
'oneToOne',
'oneToMany',
'api::dropdown-motive.dropdown-motive'
>;
motive_details: Attribute.String;
Expand Down Expand Up @@ -178,12 +179,6 @@ export interface PerpretratorPerpetrator extends Schema.Component {
'api::dropdown-general-option.dropdown-general-option'
>;
restraining_order_details: Attribute.Text & Attribute.Private;
migration_background: Attribute.Relation<
'perpretrator.perpetrator',
'oneToOne',
'api::dropdown-general-option.dropdown-general-option'
> &
Attribute.Private;
citizenship_details: Attribute.Text & Attribute.Private;
family_status_other: Attribute.String;
gender_details: Attribute.String;
Expand Down Expand Up @@ -213,6 +208,23 @@ export interface SourceSource extends Schema.Component {
};
}

export interface SurvivedBySurvivedBy extends Schema.Component {
collectionName: 'components_survived_by_survived_bies';
info: {
displayName: 'survived_by';
description: '';
};
attributes: {
dropdown_hinterbliebene: Attribute.Relation<
'survived-by.survived-by',
'oneToOne',
'api::dropdown-surviving-dependent.dropdown-surviving-dependent'
>;
age: Attribute.Integer;
relation_details: Attribute.String;
};
}

export interface VictimVictim extends Schema.Component {
collectionName: 'components_victim_victims';
info: {
Expand Down Expand Up @@ -268,11 +280,6 @@ export interface VictimVictim extends Schema.Component {
'oneToOne',
'api::dropdown-general-option.dropdown-general-option'
>;
survived_by: Attribute.Relation<
'victim.victim',
'oneToOne',
'api::dropdown-general-option.dropdown-general-option'
>;
survived_by_details: Attribute.String;
address: Attribute.Component<'adresse.adresse'>;
citizenship: Attribute.String &
Expand All @@ -287,12 +294,6 @@ export interface VictimVictim extends Schema.Component {
'oneToOne',
'api::feminicide-type.feminicide-type'
>;
migration_background: Attribute.Relation<
'victim.victim',
'oneToOne',
'api::dropdown-general-option.dropdown-general-option'
> &
Attribute.Private;
citizenship_details: Attribute.Text & Attribute.Private;
surviving_dependents: Attribute.Relation<
'victim.victim',
Expand All @@ -301,6 +302,7 @@ export interface VictimVictim extends Schema.Component {
>;
family_status_other: Attribute.String;
type_of_feminicide_details: Attribute.String;
survived_by: Attribute.Component<'survived-by.survived-by', true>;
};
}

Expand All @@ -312,6 +314,7 @@ declare module '@strapi/types' {
'crime.crime': CrimeCrime;
'perpretrator.perpetrator': PerpretratorPerpetrator;
'source.source': SourceSource;
'survived-by.survived-by': SurvivedBySurvivedBy;
'victim.victim': VictimVictim;
}
}
Expand Down
2 changes: 2 additions & 0 deletions types/generated/contentTypes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,8 @@ export interface ApiCaseCase extends Schema.CollectionType {
'api::notification.notification'
>;
report_of_crime_details: Attribute.String;
authorities_involved: Attribute.Component<'comments.comments', true>;
media_labels_used: Attribute.Component<'comments.comments', true>;
createdAt: Attribute.DateTime;
updatedAt: Attribute.DateTime;
publishedAt: Attribute.DateTime;
Expand Down

0 comments on commit ecaf85b

Please sign in to comment.