Skip to content

Commit 8f086c8

Browse files
committed
make schema for the global-ads-banner and pricing page calculation form button.
1 parent 1717128 commit 8f086c8

7 files changed

Lines changed: 89 additions & 0 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"kind": "singleType",
3+
"collectionName": "global_ads_banners",
4+
"info": {
5+
"singularName": "global-ads-banner",
6+
"pluralName": "global-ads-banners",
7+
"displayName": "Global Ads Banner"
8+
},
9+
"options": {
10+
"draftAndPublish": true
11+
},
12+
"pluginOptions": {},
13+
"attributes": {
14+
"tag": {
15+
"type": "string"
16+
},
17+
"title": {
18+
"type": "string"
19+
},
20+
"primaryButton": {
21+
"type": "component",
22+
"repeatable": false,
23+
"component": "elements.button"
24+
},
25+
"date": {
26+
"type": "datetime"
27+
}
28+
}
29+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/**
2+
* global-ads-banner controller
3+
*/
4+
5+
import { factories } from '@strapi/strapi'
6+
7+
export default factories.createCoreController('api::global-ads-banner.global-ads-banner');
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/**
2+
* global-ads-banner router
3+
*/
4+
5+
import { factories } from '@strapi/strapi';
6+
7+
export default factories.createCoreRouter('api::global-ads-banner.global-ads-banner');
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/**
2+
* global-ads-banner service
3+
*/
4+
5+
import { factories } from '@strapi/strapi';
6+
7+
export default factories.createCoreService('api::global-ads-banner.global-ads-banner');

src/components/elements/pricing-item.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@
3636
"theme-pricing-button",
3737
"theme-pricing-card"
3838
]
39+
},
40+
"calculationButton": {
41+
"type": "component",
42+
"repeatable": false,
43+
"component": "elements.button"
3944
}
4045
}
4146
}

types/generated/components.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ export interface ElementsPricingItem extends Struct.ComponentSchema {
308308
};
309309
attributes: {
310310
bottomDescription: Schema.Attribute.Text;
311+
calculationButton: Schema.Attribute.Component<'elements.button', false>;
311312
cardTheme: Schema.Attribute.Enumeration<
312313
[
313314
'theme-blue',

types/generated/contentTypes.d.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,38 @@ export interface ApiGithubReleaseGithubRelease
877877
};
878878
}
879879

880+
export interface ApiGlobalAdsBannerGlobalAdsBanner
881+
extends Struct.SingleTypeSchema {
882+
collectionName: 'global_ads_banners';
883+
info: {
884+
displayName: 'Global Ads Banner';
885+
pluralName: 'global-ads-banners';
886+
singularName: 'global-ads-banner';
887+
};
888+
options: {
889+
draftAndPublish: true;
890+
};
891+
attributes: {
892+
createdAt: Schema.Attribute.DateTime;
893+
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
894+
Schema.Attribute.Private;
895+
date: Schema.Attribute.DateTime;
896+
locale: Schema.Attribute.String & Schema.Attribute.Private;
897+
localizations: Schema.Attribute.Relation<
898+
'oneToMany',
899+
'api::global-ads-banner.global-ads-banner'
900+
> &
901+
Schema.Attribute.Private;
902+
primaryButton: Schema.Attribute.Component<'elements.button', false>;
903+
publishedAt: Schema.Attribute.DateTime;
904+
tag: Schema.Attribute.String;
905+
title: Schema.Attribute.String;
906+
updatedAt: Schema.Attribute.DateTime;
907+
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
908+
Schema.Attribute.Private;
909+
};
910+
}
911+
880912
export interface ApiHeaderHeader extends Struct.SingleTypeSchema {
881913
collectionName: 'headers';
882914
info: {
@@ -2083,6 +2115,7 @@ declare module '@strapi/strapi' {
20832115
'api::faq.faq': ApiFaqFaq;
20842116
'api::footer.footer': ApiFooterFooter;
20852117
'api::github-release.github-release': ApiGithubReleaseGithubRelease;
2118+
'api::global-ads-banner.global-ads-banner': ApiGlobalAdsBannerGlobalAdsBanner;
20862119
'api::header.header': ApiHeaderHeader;
20872120
'api::homepage.homepage': ApiHomepageHomepage;
20882121
'api::navbar.navbar': ApiNavbarNavbar;

0 commit comments

Comments
 (0)