mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-08 06:59:26 +08:00
29 lines
491 B
TypeScript
29 lines
491 B
TypeScript
import { TableOptions } from "@nocobase/database";
|
|
|
|
export default {
|
|
name: 'posts',
|
|
// 目前默认就带了
|
|
// createdBy: true,
|
|
statusable: false,
|
|
fields: [
|
|
{
|
|
type: 'string',
|
|
name: 'title',
|
|
},
|
|
{
|
|
type: 'string',
|
|
name: 'status',
|
|
// TODO(BUG): 默认值无效
|
|
defaultValue: 'draft',
|
|
},
|
|
{
|
|
type: 'belongsTo',
|
|
name: 'category',
|
|
},
|
|
{
|
|
type: 'hasMany',
|
|
name: 'comments',
|
|
},
|
|
]
|
|
} as TableOptions;
|