tachybase_todo/packages/database/examples/tables/bar.js
2020-10-24 15:34:43 +08:00

27 lines
367 B
JavaScript

module.exports = {
name: 'bar',
fields: [
{
type: 'string',
name: 'title',
},
{
type: 'text',
length: 'long',
name: 'content',
},
{
type: 'belongsTo',
name: 'user',
},
{
type: 'belongsToMany',
name: 'tags',
},
{
type: 'hasMany',
name: 'comments'
},
],
};