tachybase_todo/packages/plugin-users/src/collections/users.ts

74 lines
1.4 KiB
TypeScript
Raw Normal View History

import { TableOptions } from '@nocobase/database';
export default {
name: 'users',
title: '用户',
// developerMode: true,
// internal: true,
createdBy: false,
updatedBy: false,
2021-07-27 10:34:52 +08:00
privilege: 'undelete',
fields: [
{
interface: 'string',
type: 'string',
2021-07-27 10:34:52 +08:00
name: 'nickname',
uiSchema: {
type: 'string',
2021-07-27 10:34:52 +08:00
title: '昵称',
'x-component': 'Input',
},
},
{
interface: 'email',
type: 'string',
name: 'email',
unique: true,
2021-07-27 10:34:52 +08:00
privilege: 'undelete',
uiSchema: {
type: 'string',
2021-07-27 10:34:52 +08:00
title: '邮箱',
'x-component': 'Input',
require: true,
},
},
{
interface: 'password',
type: 'password',
name: 'password',
2021-07-27 10:34:52 +08:00
privilege: 'undelete',
uiSchema: {
type: 'string',
title: '密码',
'x-component': 'Password',
},
},
{
2021-07-27 10:34:52 +08:00
interface: 'password',
type: 'string',
name: 'token',
unique: true,
hidden: true,
2021-07-27 10:34:52 +08:00
privilege: 'undelete',
uiSchema: {
type: 'string',
title: 'Token',
'x-component': 'Password',
},
},
{
2021-07-27 10:34:52 +08:00
interface: 'password',
type: 'string',
name: 'reset_token',
unique: true,
hidden: true,
2021-07-27 10:34:52 +08:00
privilege: 'undelete',
uiSchema: {
type: 'string',
title: 'Reset Token',
'x-component': 'Password',
},
},
],
} as TableOptions;