mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 19:16:33 +00:00
28 lines
425 B
TypeScript
28 lines
425 B
TypeScript
|
import { TableOptions } from '../../src';
|
||
|
|
||
|
export default {
|
||
|
name: 'posts',
|
||
|
fields: [
|
||
|
{
|
||
|
type: 'string',
|
||
|
name: 'title',
|
||
|
},
|
||
|
{
|
||
|
type: 'text',
|
||
|
length: 'long',
|
||
|
name: 'content',
|
||
|
},
|
||
|
{
|
||
|
type: 'belongsTo',
|
||
|
name: 'user',
|
||
|
},
|
||
|
{
|
||
|
type: 'belongsToMany',
|
||
|
name: 'tags',
|
||
|
},
|
||
|
{
|
||
|
type: 'hasMany',
|
||
|
name: 'comments'
|
||
|
},
|
||
|
],
|
||
|
} as TableOptions;
|