[yoga-11] add common type and add logo
This commit is contained in:
parent
958007ed2f
commit
551f545935
@ -31,7 +31,7 @@ export default async function ServiceArticlePage({params}: {
|
||||
if (!servicePage) {
|
||||
return notFound()
|
||||
}
|
||||
const {subscribeNow, footer} = servicePage;
|
||||
const {subscribeNow, footer, common} = servicePage;
|
||||
const servicesByName = await strapiApi.getService(slug);
|
||||
if (!servicesByName || servicesByName.length === 0) {
|
||||
return notFound();
|
||||
|
||||
@ -8,19 +8,23 @@ export interface YogaCommon {
|
||||
id: number;
|
||||
attributes: {
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; logoImage?: { data: Media };
|
||||
name: string;
|
||||
};
|
||||
}
|
||||
export interface YogaCommon_Plain {
|
||||
id: number;
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; logoImage?: Media_Plain;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface YogaCommon_NoRelations {
|
||||
id: number;
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; logoImage?: number;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface YogaCommon_AdminPanelLifeCycle {
|
||||
id: number;
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; logoImage?: AdminPanelRelationPropertyModification<Media_Plain>;
|
||||
name: string;
|
||||
}
|
||||
|
||||
@ -4,21 +4,27 @@
|
||||
"info": {
|
||||
"singularName": "yoga-common",
|
||||
"pluralName": "yoga-commons",
|
||||
"displayName": "YogaCommon"
|
||||
"displayName": "YogaCommon",
|
||||
"description": ""
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": true
|
||||
},
|
||||
"attributes": {
|
||||
"logoImage": {
|
||||
"type": "media",
|
||||
"multiple": false,
|
||||
"required": false,
|
||||
"allowedTypes": [
|
||||
"images",
|
||||
"files",
|
||||
"videos",
|
||||
"audios"
|
||||
],
|
||||
"type": "media",
|
||||
"multiple": false
|
||||
]
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
2
yoga-cms/types/generated/contentTypes.d.ts
vendored
2
yoga-cms/types/generated/contentTypes.d.ts
vendored
@ -1237,6 +1237,7 @@ export interface ApiYogaBlogPostsComponentYogaBlogPostsComponent
|
||||
export interface ApiYogaCommonYogaCommon extends Struct.CollectionTypeSchema {
|
||||
collectionName: 'yoga_commons';
|
||||
info: {
|
||||
description: '';
|
||||
displayName: 'YogaCommon';
|
||||
pluralName: 'yoga-commons';
|
||||
singularName: 'yoga-common';
|
||||
@ -1255,6 +1256,7 @@ export interface ApiYogaCommonYogaCommon extends Struct.CollectionTypeSchema {
|
||||
> &
|
||||
Schema.Attribute.Private;
|
||||
logoImage: Schema.Attribute.Media<'images' | 'files' | 'videos' | 'audios'>;
|
||||
name: Schema.Attribute.String & Schema.Attribute.Required;
|
||||
publishedAt: Schema.Attribute.DateTime;
|
||||
updatedAt: Schema.Attribute.DateTime;
|
||||
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||
|
||||
Loading…
Reference in New Issue
Block a user