refactor: rename relation fields in customer schema and update TypeScript definitions
- Changed 'clients' to 'invited' and 'masters' to 'invitedBy' in the customer schema to better reflect their purpose in the data model. - Updated TypeScript definitions to include the new relation fields, ensuring type safety and consistency across the application.
This commit is contained in:
parent
0cb35adefa
commit
7436ad181b
@ -40,17 +40,17 @@
|
||||
"required": false,
|
||||
"default": false
|
||||
},
|
||||
"clients": {
|
||||
"invited": {
|
||||
"type": "relation",
|
||||
"relation": "manyToMany",
|
||||
"target": "api::customer.customer",
|
||||
"inversedBy": "masters"
|
||||
"inversedBy": "invitedBy"
|
||||
},
|
||||
"masters": {
|
||||
"invitedBy": {
|
||||
"type": "relation",
|
||||
"relation": "manyToMany",
|
||||
"target": "api::customer.customer",
|
||||
"mappedBy": "clients"
|
||||
"mappedBy": "invited"
|
||||
},
|
||||
"blocks": {
|
||||
"type": "relation",
|
||||
|
||||
7
types/generated/contentTypes.d.ts
vendored
7
types/generated/contentTypes.d.ts
vendored
@ -425,17 +425,20 @@ export interface ApiCustomerCustomer extends Struct.CollectionTypeSchema {
|
||||
active: Schema.Attribute.Boolean & Schema.Attribute.DefaultTo<false>;
|
||||
bannedUntil: Schema.Attribute.DateTime;
|
||||
blocks: Schema.Attribute.Relation<'oneToMany', 'api::block.block'>;
|
||||
clients: Schema.Attribute.Relation<'manyToMany', 'api::customer.customer'>;
|
||||
createdAt: Schema.Attribute.DateTime;
|
||||
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||
Schema.Attribute.Private;
|
||||
invited: Schema.Attribute.Relation<'manyToMany', 'api::customer.customer'>;
|
||||
invitedBy: Schema.Attribute.Relation<
|
||||
'manyToMany',
|
||||
'api::customer.customer'
|
||||
>;
|
||||
locale: Schema.Attribute.String & Schema.Attribute.Private;
|
||||
localizations: Schema.Attribute.Relation<
|
||||
'oneToMany',
|
||||
'api::customer.customer'
|
||||
> &
|
||||
Schema.Attribute.Private;
|
||||
masters: Schema.Attribute.Relation<'manyToMany', 'api::customer.customer'>;
|
||||
name: Schema.Attribute.String &
|
||||
Schema.Attribute.Required &
|
||||
Schema.Attribute.SetMinMaxLength<{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user