mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 19:36:45 +00:00
34 lines
522 B
TypeScript
34 lines
522 B
TypeScript
|
import { TableOptions } from '../../src';
|
||
|
|
||
|
export default {
|
||
|
name: 'users',
|
||
|
fields: [
|
||
|
{
|
||
|
type: 'string',
|
||
|
name: 'username',
|
||
|
unique: true,
|
||
|
},
|
||
|
{
|
||
|
type: 'string',
|
||
|
name: 'password',
|
||
|
// index: true,
|
||
|
},
|
||
|
{
|
||
|
type: 'string',
|
||
|
name: 'openid',
|
||
|
index: true,
|
||
|
},
|
||
|
{
|
||
|
type: 'hasOne',
|
||
|
name: 'profile',
|
||
|
},
|
||
|
{
|
||
|
type: 'hasMany',
|
||
|
name: 'posts',
|
||
|
},
|
||
|
{
|
||
|
type: 'hasMany',
|
||
|
name: 'comments',
|
||
|
}
|
||
|
],
|
||
|
} as TableOptions;
|