mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-15 01:21:48 +03:00
feat(cms): added use case
This commit is contained in:
parent
6f2023d4b0
commit
64315d05da
@ -1,6 +1,6 @@
|
||||
FROM node:18.13.0-alpine
|
||||
# Install Python and essential build tools
|
||||
RUN apk add --update --no-cache python3 make g++ && ln -sf python3 /usr/bin/python
|
||||
RUN apk add --update --no-cache python3 make g++ git && ln -sf python3 /usr/bin/python
|
||||
RUN python3 -m ensurepip
|
||||
RUN pip3 install --no-cache --upgrade pip setuptools
|
||||
|
||||
|
@ -0,0 +1,31 @@
|
||||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "use_cases",
|
||||
"info": {
|
||||
"singularName": "use-case",
|
||||
"pluralName": "use-cases",
|
||||
"displayName": "Use Case"
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": true
|
||||
},
|
||||
"pluginOptions": {},
|
||||
"attributes": {
|
||||
"Title": {
|
||||
"type": "string"
|
||||
},
|
||||
"Description": {
|
||||
"type": "string"
|
||||
},
|
||||
"image": {
|
||||
"allowedTypes": [
|
||||
"images",
|
||||
"files",
|
||||
"videos",
|
||||
"audios"
|
||||
],
|
||||
"type": "media",
|
||||
"multiple": true
|
||||
}
|
||||
}
|
||||
}
|
9
cms/quivr/src/api/use-case/controllers/use-case.js
Normal file
9
cms/quivr/src/api/use-case/controllers/use-case.js
Normal file
@ -0,0 +1,9 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* use-case controller
|
||||
*/
|
||||
|
||||
const { createCoreController } = require('@strapi/strapi').factories;
|
||||
|
||||
module.exports = createCoreController('api::use-case.use-case');
|
9
cms/quivr/src/api/use-case/routes/use-case.js
Normal file
9
cms/quivr/src/api/use-case/routes/use-case.js
Normal file
@ -0,0 +1,9 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* use-case router
|
||||
*/
|
||||
|
||||
const { createCoreRouter } = require('@strapi/strapi').factories;
|
||||
|
||||
module.exports = createCoreRouter('api::use-case.use-case');
|
9
cms/quivr/src/api/use-case/services/use-case.js
Normal file
9
cms/quivr/src/api/use-case/services/use-case.js
Normal file
@ -0,0 +1,9 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* use-case service
|
||||
*/
|
||||
|
||||
const { createCoreService } = require('@strapi/strapi').factories;
|
||||
|
||||
module.exports = createCoreService('api::use-case.use-case');
|
85
cms/quivr/types/generated/contentTypes.d.ts
vendored
85
cms/quivr/types/generated/contentTypes.d.ts
vendored
@ -361,31 +361,6 @@ export interface AdminTransferTokenPermission extends Schema.CollectionType {
|
||||
};
|
||||
}
|
||||
|
||||
export interface ApiBlogBlog extends Schema.CollectionType {
|
||||
collectionName: 'blogs';
|
||||
info: {
|
||||
singularName: 'blog';
|
||||
pluralName: 'blogs';
|
||||
displayName: 'Blog';
|
||||
};
|
||||
options: {
|
||||
draftAndPublish: true;
|
||||
};
|
||||
attributes: {
|
||||
title: Attribute.String & Attribute.Required;
|
||||
description: Attribute.Text;
|
||||
draft: Attribute.RichText;
|
||||
imageUrl: Attribute.String;
|
||||
createdAt: Attribute.DateTime;
|
||||
updatedAt: Attribute.DateTime;
|
||||
publishedAt: Attribute.DateTime;
|
||||
createdBy: Attribute.Relation<'api::blog.blog', 'oneToOne', 'admin::user'> &
|
||||
Attribute.Private;
|
||||
updatedBy: Attribute.Relation<'api::blog.blog', 'oneToOne', 'admin::user'> &
|
||||
Attribute.Private;
|
||||
};
|
||||
}
|
||||
|
||||
export interface PluginUploadFile extends Schema.CollectionType {
|
||||
collectionName: 'files';
|
||||
info: {
|
||||
@ -701,6 +676,63 @@ export interface PluginUsersPermissionsUser extends Schema.CollectionType {
|
||||
};
|
||||
}
|
||||
|
||||
export interface ApiBlogBlog extends Schema.CollectionType {
|
||||
collectionName: 'blogs';
|
||||
info: {
|
||||
singularName: 'blog';
|
||||
pluralName: 'blogs';
|
||||
displayName: 'Blog';
|
||||
};
|
||||
options: {
|
||||
draftAndPublish: true;
|
||||
};
|
||||
attributes: {
|
||||
title: Attribute.String & Attribute.Required;
|
||||
description: Attribute.Text;
|
||||
draft: Attribute.RichText;
|
||||
imageUrl: Attribute.String;
|
||||
createdAt: Attribute.DateTime;
|
||||
updatedAt: Attribute.DateTime;
|
||||
publishedAt: Attribute.DateTime;
|
||||
createdBy: Attribute.Relation<'api::blog.blog', 'oneToOne', 'admin::user'> &
|
||||
Attribute.Private;
|
||||
updatedBy: Attribute.Relation<'api::blog.blog', 'oneToOne', 'admin::user'> &
|
||||
Attribute.Private;
|
||||
};
|
||||
}
|
||||
|
||||
export interface ApiUseCaseUseCase extends Schema.CollectionType {
|
||||
collectionName: 'use_cases';
|
||||
info: {
|
||||
singularName: 'use-case';
|
||||
pluralName: 'use-cases';
|
||||
displayName: 'Use Case';
|
||||
};
|
||||
options: {
|
||||
draftAndPublish: true;
|
||||
};
|
||||
attributes: {
|
||||
Title: Attribute.String;
|
||||
Description: Attribute.String;
|
||||
image: Attribute.Media;
|
||||
createdAt: Attribute.DateTime;
|
||||
updatedAt: Attribute.DateTime;
|
||||
publishedAt: Attribute.DateTime;
|
||||
createdBy: Attribute.Relation<
|
||||
'api::use-case.use-case',
|
||||
'oneToOne',
|
||||
'admin::user'
|
||||
> &
|
||||
Attribute.Private;
|
||||
updatedBy: Attribute.Relation<
|
||||
'api::use-case.use-case',
|
||||
'oneToOne',
|
||||
'admin::user'
|
||||
> &
|
||||
Attribute.Private;
|
||||
};
|
||||
}
|
||||
|
||||
declare module '@strapi/strapi' {
|
||||
export module Shared {
|
||||
export interface ContentTypes {
|
||||
@ -711,13 +743,14 @@ declare module '@strapi/strapi' {
|
||||
'admin::api-token-permission': AdminApiTokenPermission;
|
||||
'admin::transfer-token': AdminTransferToken;
|
||||
'admin::transfer-token-permission': AdminTransferTokenPermission;
|
||||
'api::blog.blog': ApiBlogBlog;
|
||||
'plugin::upload.file': PluginUploadFile;
|
||||
'plugin::upload.folder': PluginUploadFolder;
|
||||
'plugin::i18n.locale': PluginI18NLocale;
|
||||
'plugin::users-permissions.permission': PluginUsersPermissionsPermission;
|
||||
'plugin::users-permissions.role': PluginUsersPermissionsRole;
|
||||
'plugin::users-permissions.user': PluginUsersPermissionsUser;
|
||||
'api::blog.blog': ApiBlogBlog;
|
||||
'api::use-case.use-case': ApiUseCaseUseCase;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user