* feat(plugin-verification): add plugin-verification and phone for users * feat(plugin-verification): add env example * fix(plugin-verification): fix locales * fix(plugin-verification): remove sending comment * fix(plugin-verification): fix i18n * refactor(plugin-verification): move invalid error message to action * fix(plugin-verification): add field migration * chore(plugin-verification): update packages version * test(plugin-verification): temp remove new package dependency * refactor(plugin-verification): make sms authentication configurable in system settings * fix: smsAuthEnabled * feat: update preset-nocobase Co-authored-by: chenos <chenlinxh@gmail.com>
80 lines
1.6 KiB
TypeScript
80 lines
1.6 KiB
TypeScript
import { CollectionOptions } from '@nocobase/database';
|
|
|
|
export default {
|
|
name: 'users',
|
|
title: '{{t("Users")}}',
|
|
sortable: 'sort',
|
|
model: 'UserModel',
|
|
createdBy: true,
|
|
updatedBy: true,
|
|
logging: true,
|
|
fields: [
|
|
{
|
|
name: 'id',
|
|
type: 'integer',
|
|
autoIncrement: true,
|
|
primaryKey: true,
|
|
allowNull: false,
|
|
uiSchema: { type: 'number', title: '{{t("ID")}}', 'x-component': 'InputNumber', 'x-read-pretty': true },
|
|
interface: 'id',
|
|
},
|
|
{
|
|
interface: 'input',
|
|
type: 'string',
|
|
name: 'nickname',
|
|
uiSchema: {
|
|
type: 'string',
|
|
title: '{{t("Nickname")}}',
|
|
'x-component': 'Input',
|
|
},
|
|
},
|
|
{
|
|
interface: 'email',
|
|
type: 'string',
|
|
name: 'email',
|
|
unique: true,
|
|
uiSchema: {
|
|
type: 'string',
|
|
title: '{{t("Email")}}',
|
|
'x-component': 'Input',
|
|
'x-validator': 'email',
|
|
require: true,
|
|
},
|
|
},
|
|
{
|
|
interface: 'phone',
|
|
type: 'string',
|
|
name: 'phone',
|
|
unique: true,
|
|
uiSchema: {
|
|
type: 'string',
|
|
title: '{{t("Phone")}}',
|
|
'x-component': 'Input',
|
|
'x-validator': 'phone',
|
|
require: true,
|
|
},
|
|
},
|
|
{
|
|
interface: 'password',
|
|
type: 'password',
|
|
name: 'password',
|
|
hidden: true,
|
|
uiSchema: {
|
|
type: 'string',
|
|
title: '{{t("Password")}}',
|
|
'x-component': 'Password',
|
|
},
|
|
},
|
|
{
|
|
type: 'string',
|
|
name: 'appLang',
|
|
},
|
|
{
|
|
type: 'string',
|
|
name: 'resetToken',
|
|
unique: true,
|
|
hidden: true,
|
|
},
|
|
],
|
|
} as CollectionOptions;
|