Hackspace: add membership_plans

This commit is contained in:
He4eT 2025-04-01 15:32:39 +02:00
commit 14d08cd7b2
4 changed files with 65 additions and 0 deletions

View file

@ -62,6 +62,11 @@
"type": "component",
"repeatable": true,
"component": "hackspace.link"
},
"membership_plans": {
"type": "component",
"repeatable": true,
"component": "membership.plans"
}
}
}

View file

@ -0,0 +1,39 @@
{
"collectionName": "components_membership_plans",
"info": {
"displayName": "Plan",
"icon": "briefcase",
"description": ""
},
"options": {},
"attributes": {
"name": {
"type": "string",
"required": true
},
"value": {
"type": "decimal",
"required": true
},
"currency": {
"type": "string",
"required": true
},
"billing_interval": {
"type": "enumeration",
"enum": [
"yearly",
"quarterly",
"monthly",
"weekly",
"daily",
"hourly",
"other"
],
"required": true
},
"description": {
"type": "text"
}
}
}

View file

@ -155,6 +155,25 @@ export interface LocationArea extends Struct.ComponentSchema {
};
}
export interface MembershipPlans extends Struct.ComponentSchema {
collectionName: 'components_membership_plans';
info: {
description: '';
displayName: 'Plan';
icon: 'briefcase';
};
attributes: {
billing_interval: Schema.Attribute.Enumeration<
['yearly', 'quarterly', 'monthly', 'weekly', 'daily', 'hourly', 'other']
> &
Schema.Attribute.Required;
currency: Schema.Attribute.String & Schema.Attribute.Required;
description: Schema.Attribute.Text;
name: Schema.Attribute.String & Schema.Attribute.Required;
value: Schema.Attribute.Decimal & Schema.Attribute.Required;
};
}
export interface StateStateIcon extends Struct.ComponentSchema {
collectionName: 'components_state_state_icons';
info: {
@ -181,6 +200,7 @@ declare module '@strapi/strapi' {
'hackspace.project': HackspaceProject;
'hackspace.spacefed': HackspaceSpacefed;
'location.area': LocationArea;
'membership.plans': MembershipPlans;
'state.state-icon': StateStateIcon;
}
}

View file

@ -425,6 +425,7 @@ export interface ApiHackspaceHackspace extends Struct.SingleTypeSchema {
Schema.Attribute.Private;
location: Schema.Attribute.Component<'hackspace.location', false>;
logo: Schema.Attribute.Media<'images'> & Schema.Attribute.Required;
membership_plans: Schema.Attribute.Component<'membership.plans', true>;
projects: Schema.Attribute.Component<'hackspace.project', true>;
publishedAt: Schema.Attribute.DateTime;
space: Schema.Attribute.String & Schema.Attribute.Required;