tachybase_todo/packages/plugins/@tachybase/plugin-comments/src/client/CommentCollectionTemplate.ts
bai.zixv 236c308d23 refactor: @hera/plugin-core, departments-plugin (#979)
Reviewed-on: daoyoucloud/tachybase#979
Co-authored-by: bai.zixv <bai.zixv@foxmail.com>
Co-committed-by: bai.zixv <bai.zixv@foxmail.com>
2024-05-28 10:43:58 +08:00

37 lines
821 B
TypeScript

import { CollectionTemplate, getConfigurableProperties } from '@tachybase/client';
import { tval } from './locale';
export class CommentCollectionTemplate extends CollectionTemplate {
name = 'comment';
title = tval('Comment Collection');
order = 2;
color = 'orange';
default = {
fields: [
{
name: 'content',
type: 'text',
length: 'long',
interface: 'vditor',
deletable: false,
uiSchema: {
type: 'string',
title: tval('Comment Content'),
interface: 'vditor',
'x-component': 'MarkdownVditor',
},
},
],
};
presetFieldsDisabled = true;
configurableProperties = getConfigurableProperties(
'title',
'name',
'inherits',
'category',
'description',
'presetFields',
);
}