feat: add roles field to users collection

This commit is contained in:
chenos 2021-11-17 18:54:02 +08:00
parent d8c7a0f1c3
commit a702f534ba
30 changed files with 179 additions and 163 deletions

View File

@ -652,6 +652,7 @@ function CreateFieldButton() {
<Space style={{ float: 'right' }}> <Space style={{ float: 'right' }}>
<Button <Button
onClick={async () => { onClick={async () => {
console.log('form.values', form.values);
await form.clearFormGraph(); await form.clearFormGraph();
setVisible(false); setVisible(false);
}} }}
@ -661,6 +662,9 @@ function CreateFieldButton() {
<Button <Button
type={'primary'} type={'primary'}
onClick={async () => { onClick={async () => {
const fieldInterface = interfaces.get(form.values?.interface);
fieldInterface?.initialize && fieldInterface?.initialize(form.values);
console.log('form.values', form.values);
await resource.save(form.values); await resource.save(form.values);
setVisible(false); setVisible(false);
await form.reset(); await form.reset();
@ -755,6 +759,8 @@ function EditFieldButton() {
<Button <Button
type={'primary'} type={'primary'}
onClick={async () => { onClick={async () => {
const fieldInterface = interfaces.get(form.values?.interface);
fieldInterface?.initialize && fieldInterface?.initialize(form.values);
await resource.save(form.values, { await resource.save(form.values, {
resourceKey: ctx.record.key, resourceKey: ctx.record.key,
}); });

View File

@ -36,9 +36,13 @@ export const linkTo: FieldOptions = {
values.sourceKey = 'id'; values.sourceKey = 'id';
} }
if (!values.targetKey) { if (!values.targetKey) {
if (values.target === 'roles') {
values.targetKey = 'name';
} else {
values.targetKey = 'id'; values.targetKey = 'id';
} }
} }
}
}, },
properties: { properties: {
...defaultProps, ...defaultProps,

View File

@ -275,12 +275,12 @@ Select.useSelect = () => {
}; };
export const useSelectedRowKeys = () => { export const useSelectedRowKeys = () => {
const { selectedRows } = useContext(SelectedRowsContext); const { rowKey, selectedRows } = useContext(SelectedRowsContext);
const [selectedRowKeys, setSelectedRowKeys] = useState<any>( const [selectedRowKeys, setSelectedRowKeys] = useState<any>(
selectedRows.map((row) => row.id), selectedRows.map((row) => row[rowKey]),
); );
useEffect(() => { useEffect(() => {
setSelectedRowKeys(selectedRows.map((row) => row.id)); setSelectedRowKeys(selectedRows.map((row) => row[rowKey]));
}, [selectedRows]); }, [selectedRows]);
console.log('useSelectedRowKeys', selectedRows); console.log('useSelectedRowKeys', selectedRows);
return { selectedRowKeys, setSelectedRowKeys }; return { selectedRowKeys, setSelectedRowKeys };
@ -333,6 +333,7 @@ Select.Drawer = connect(
}; };
} }
const [selectedRows, setSelectedRows] = useState(toArr(field.value)); const [selectedRows, setSelectedRows] = useState(toArr(field.value));
console.log('fieldNames', { fieldNames, field, value });
console.log('useSelectedRowKeys.toArr', toArr(field.value)); console.log('useSelectedRowKeys.toArr', toArr(field.value));
useEffect(() => { useEffect(() => {
setSelectedRows(toArr(field.value)); setSelectedRows(toArr(field.value));
@ -395,7 +396,7 @@ Select.Drawer = connect(
}} }}
></AntdSelect> ></AntdSelect>
<SelectedRowsContext.Provider <SelectedRowsContext.Provider
value={{ selectedRows, setSelectedRows }} value={{ rowKey: collectionField?.targetKey || 'id', selectedRows, setSelectedRows }}
> >
<CollectionProvider collectionName={collectionField?.target}> <CollectionProvider collectionName={collectionField?.target}>
<RecursionField <RecursionField
@ -447,7 +448,7 @@ Select.Drawer = connect(
value: 'id', value: 'id',
...(get(schema['x-component-props'], 'fieldNames') || {}), ...(get(schema['x-component-props'], 'fieldNames') || {}),
}; };
console.log({ fieldNames, field, value }); console.log('fieldNames', { fieldNames, field, value });
if (!value) { if (!value) {
return null; return null;
} }

View File

@ -1568,6 +1568,6 @@ INSERT INTO "ui_schemas" ("key", "name", "title", "type", "x-component", "option
INSERT INTO "ui_schemas" ("key", "name", "title", "type", "x-component", "options", "async", "sort", "created_at", "updated_at", "parent_key") VALUES INSERT INTO "ui_schemas" ("key", "name", "title", "type", "x-component", "options", "async", "sort", "created_at", "updated_at", "parent_key") VALUES
('17mcgd6s6d7', 'liia3b09auv', 'Star on GitHub', 'void', 'Menu.URL', '{"version":"2.0","x-designable-bar":"Menu.DesignableBar","x-component-props":{"href":"https://github.com/nocobase/nocobase","icon":"githuboutlined"}}', '0', 12, '2021-11-08 14:27:02.538+00', '2021-11-08 14:27:02.538+00', 'qqzzjakwkwl'); ('17mcgd6s6d7', 'liia3b09auv', 'Star on GitHub', 'void', 'Menu.URL', '{"version":"2.0","x-designable-bar":"Menu.DesignableBar","x-component-props":{"href":"https://github.com/nocobase/nocobase","icon":"githuboutlined"}}', '0', 12, '2021-11-08 14:27:02.538+00', '2021-11-08 14:27:02.538+00', 'qqzzjakwkwl');
INSERT INTO "ui_schemas" ("key", "name", "title", "type", "x-component", "options", "async", "sort", "created_at", "updated_at", "parent_key") VALUES INSERT INTO "ui_schemas" ("key", "name", "title", "type", "x-component", "options", "async", "sort", "created_at", "updated_at", "parent_key") VALUES
('sarppf56eim', NULL, '{{t("Roles")}}', 'array', 'Select.Drawer', '{"x-component-props":{},"x-decorator":"FormItem","x-designable-bar":"Select.Drawer.DesignableBar"}', '0', 4, '2021-11-16 08:32:08.041+00', '2021-11-16 08:32:08.041+00', NULL); ('sarppf56eim', NULL, '{{t("Roles")}}', 'array', 'Select.Drawer', '{"x-component-props":{"fieldNames": {"label": "title","value": "name"}},"x-decorator":"FormItem","x-designable-bar":"Select.Drawer.DesignableBar"}', '0', 4, '2021-11-16 08:32:08.041+00', '2021-11-16 08:32:08.041+00', NULL);
INSERT INTO "ui_schemas" ("key", "name", "title", "type", "x-component", "options", "async", "sort", "created_at", "updated_at", "parent_key") VALUES INSERT INTO "ui_schemas" ("key", "name", "title", "type", "x-component", "options", "async", "sort", "created_at", "updated_at", "parent_key") VALUES
('bhqy0xdfiog', NULL, '{{t("Role name")}}', 'string', 'Input', '{}', '0', 5, '2021-11-16 09:32:00.3+00', '2021-11-16 09:32:00.3+00', NULL); ('bhqy0xdfiog', NULL, '{{t("Role name")}}', 'string', 'Input', '{}', '0', 5, '2021-11-16 09:32:00.3+00', '2021-11-16 09:32:00.3+00', NULL);

View File

@ -1,8 +1,8 @@
DELETE FROM "collections"; DELETE FROM "collections";
INSERT INTO "collections" ("name", "logging", "title", "privilege", "sortable", "options", "sort", "created_at", "updated_at", "ui_schema_key") VALUES INSERT INTO "collections" ("name", "logging", "title", "privilege", "sortable", "options", "sort", "created_at", "updated_at", "ui_schema_key") VALUES
('users', '1', '{{t("Users")}}', 'undelete', '"sort"', '{"createdBy":false,"updatedBy":false}', 2, '2021-09-02 15:07:56.914+00', '2021-09-15 00:59:20.676+00', NULL), ('users', '1', '{{t("Users")}}', 'undelete', '"sort"', '{"createdBy":false,"updatedBy":false,"scopes":{"withPassword":{"attributes":{"include":["password"]}}},"defaultScope":{"attributes":{"exclude":["password"]}}}', 1, '2021-11-17 04:49:27.376+00', '2021-11-17 04:49:27.376+00', NULL),
('roles', '1', '{{t("Roles")}}', NULL, '"sort"', '{}', 2, '2021-11-17 04:49:27.529+00', '2021-11-17 04:49:27.529+00', NULL);
INSERT INTO "collections" ("name", "logging", "title", "privilege", "sortable", "options", "sort", "created_at", "updated_at", "ui_schema_key") VALUES
('t_fsveob6p269', '1', 'Customers', NULL, '"sort"', '{}', 5, '2021-09-12 01:05:52.722+00', '2021-09-18 04:15:23.113+00', NULL), ('t_fsveob6p269', '1', 'Customers', NULL, '"sort"', '{}', 5, '2021-09-12 01:05:52.722+00', '2021-09-18 04:15:23.113+00', NULL),
('t_geso7fru7a9', '1', 'Orders', NULL, '"sort"', '{}', 4, '2021-09-12 01:06:05.19+00', '2021-09-18 04:15:42.566+00', NULL), ('t_geso7fru7a9', '1', 'Orders', NULL, '"sort"', '{}', 4, '2021-09-12 01:06:05.19+00', '2021-09-18 04:15:42.566+00', NULL),
('t_2uhu4szs1kq', '1', 'Tasks', NULL, '"sort"', '{}', 3, '2021-09-03 08:17:30.495+00', '2021-09-18 04:15:42.572+00', NULL); ('t_2uhu4szs1kq', '1', 'Tasks', NULL, '"sort"', '{}', 3, '2021-09-03 08:17:30.495+00', '2021-09-18 04:15:42.572+00', NULL);
INSERT INTO "collections" ("name", "logging", "title", "privilege", "sortable", "options", "sort", "created_at", "updated_at", "ui_schema_key") VALUES
('roles', '1', '{{t("Roles")}}', NULL, '"sort"', '{}', 2, '2021-11-16 09:25:52.28+00', '2021-11-16 09:25:52.28+00', NULL);

View File

@ -52,7 +52,7 @@ INSERT INTO "fields" ("key", "name", "interface", "data_type", "privilege", "sta
('sbrf1cdkpb9', 'h1f9o1xvevb', 'createdAt', 'date', 'undelete', 1, '{"field":"created_at"}', 1, '2021-09-12 01:06:55.123+00', '2021-09-12 01:06:55.133+00', NULL, NULL, 'oo7ejuze28i', NULL); ('sbrf1cdkpb9', 'h1f9o1xvevb', 'createdAt', 'date', 'undelete', 1, '{"field":"created_at"}', 1, '2021-09-12 01:06:55.123+00', '2021-09-12 01:06:55.133+00', NULL, NULL, 'oo7ejuze28i', NULL);
INSERT INTO "fields" ("key", "name", "interface", "data_type", "privilege", "state", "options", "sort", "created_at", "updated_at", "parent_key", "collection_name", "reverse_key", "ui_schema_key") VALUES INSERT INTO "fields" ("key", "name", "interface", "data_type", "privilege", "state", "options", "sort", "created_at", "updated_at", "parent_key", "collection_name", "reverse_key", "ui_schema_key") VALUES
('f_v3j9yv454ch', 'roles', 'linkTo', 'belongsToMany', NULL, 1, '{"target":"roles","foreignKey":"user_id","otherKey":"role_id","sourceKey":"id","targetKey":"id"}', NULL, '2021-11-16 08:32:08.033+00', '2021-11-16 08:32:08.049+00', NULL, 'users', NULL, 'sarppf56eim'), ('f_v3j9yv454ch', 'roles', 'linkTo', 'belongsToMany', NULL, 1, '{"target":"roles","foreignKey":"user_id","otherKey":"role_name","sourceKey":"id","targetKey":"name"}', NULL, '2021-11-16 08:32:08.033+00', '2021-11-16 08:32:08.049+00', NULL, 'users', NULL, 'sarppf56eim'),
('f_jd6k0hxqe91', 'title', 'string', 'string', NULL, 1, '{}', NULL, '2021-11-16 08:32:08.096+00', '2021-11-16 08:32:08.113+00', NULL, 'roles', NULL, 'bhqy0xdfiog'), ('f_jd6k0hxqe91', 'title', 'string', 'string', NULL, 1, '{}', NULL, '2021-11-16 08:32:08.096+00', '2021-11-16 08:32:08.113+00', NULL, 'roles', NULL, 'bhqy0xdfiog'),
('f_9jeplea2nwz', 'name', NULL, 'uid', NULL, 0, '{"unique":true,"prefix":"r_"}', NULL, '2021-11-16 08:32:08.121+00', '2021-11-16 08:32:08.121+00', NULL, 'roles', NULL, NULL), ('f_9jeplea2nwz', 'name', NULL, 'uid', NULL, 0, '{"unique":true,"prefix":"r_"}', NULL, '2021-11-16 08:32:08.121+00', '2021-11-16 08:32:08.121+00', NULL, 'roles', NULL, NULL),
('f_no8fg9nvnuk', 'actionPermissions', NULL, 'hasMany', NULL, 0, '{"target":"action_permissions"}', NULL, '2021-11-16 08:32:08.128+00', '2021-11-16 08:32:08.128+00', NULL, 'roles', NULL, NULL), ('f_no8fg9nvnuk', 'actionPermissions', NULL, 'hasMany', NULL, 0, '{"target":"action_permissions"}', NULL, '2021-11-16 08:32:08.128+00', '2021-11-16 08:32:08.128+00', NULL, 'roles', NULL, NULL),

View File

View File

View File

View File

View File

6
packages/plugin-client/src/db/en-US/part2/12-roles.sql Normal file → Executable file
View File

@ -1,4 +1,4 @@
DELETE FROM "roles"; DELETE FROM "roles";
INSERT INTO "roles" ("id", "name", "title", "sort", "created_at", "updated_at", "created_by_id", "updated_by_id") VALUES INSERT INTO "roles" ("name", "title", "sort", "created_at", "updated_at", "created_by_id", "updated_by_id") VALUES
(1, 'r_tfs4qtaxjcs', 'Admin', 1, '2021-09-14 02:12:19.98+00', '2021-09-14 02:12:19.98+00', 1, 1), ('r_tfs4qtaxjcs', 'Admin', 1, '2021-09-14 02:12:19.98+00', '2021-09-14 02:12:19.98+00', 1, 1),
(2, 'r_np59b00ex8z', 'Member', 2, '2021-09-14 02:12:35.799+00', '2021-09-14 02:12:35.799+00', 1, 1); ('r_np59b00ex8z', 'Member', 2, '2021-09-14 02:12:35.799+00', '2021-09-14 02:12:35.799+00', 1, 1);

View File

@ -1,18 +1,18 @@
DELETE FROM "action_permissions"; DELETE FROM "action_permissions";
INSERT INTO "action_permissions" ("id", "action_name", "created_at", "updated_at", "collection_name", "user_id", "created_by_id", "updated_by_id", "role_id", "scope_id") VALUES INSERT INTO "action_permissions" ("id", "action_name", "created_at", "updated_at", "collection_name", "user_id", "created_by_id", "updated_by_id", "role_name", "scope_id") VALUES
(1, 'create', '2021-09-14 02:19:38.019+00', '2021-09-14 02:19:45.64+00', 't_geso7fru7a9', NULL, 1, 1, NULL, NULL), (1, 'create', '2021-09-14 02:19:38.019+00', '2021-09-14 02:19:45.64+00', 't_geso7fru7a9', NULL, 1, 1, 'r_tfs4qtaxjcs', NULL),
(2, 'get', '2021-09-14 02:19:38.04+00', '2021-09-14 02:19:45.64+00', 't_geso7fru7a9', NULL, 1, 1, NULL, NULL), (2, 'get', '2021-09-14 02:19:38.04+00', '2021-09-14 02:19:45.64+00', 't_geso7fru7a9', NULL, 1, 1, 'r_tfs4qtaxjcs', NULL),
(3, 'update', '2021-09-14 02:19:38.053+00', '2021-09-14 02:19:45.64+00', 't_geso7fru7a9', NULL, 1, 1, NULL, NULL), (3, 'update', '2021-09-14 02:19:38.053+00', '2021-09-14 02:19:45.64+00', 't_geso7fru7a9', NULL, 1, 1, 'r_tfs4qtaxjcs', NULL),
(4, 'destroy', '2021-09-14 02:19:38.067+00', '2021-09-14 02:19:45.64+00', 't_geso7fru7a9', NULL, 1, 1, NULL, NULL), (4, 'destroy', '2021-09-14 02:19:38.067+00', '2021-09-14 02:19:45.64+00', 't_geso7fru7a9', NULL, 1, 1, 'r_tfs4qtaxjcs', NULL),
(5, 'create', '2021-09-14 02:19:45.601+00', '2021-09-14 02:19:53.3+00', 't_2uhu4szs1kq', NULL, 1, 1, NULL, NULL), (5, 'create', '2021-09-14 02:19:45.601+00', '2021-09-14 02:19:53.3+00', 't_2uhu4szs1kq', NULL, 1, 1, 'r_tfs4qtaxjcs', NULL),
(6, 'get', '2021-09-14 02:19:45.616+00', '2021-09-14 02:19:53.3+00', 't_2uhu4szs1kq', NULL, 1, 1, NULL, NULL), (6, 'get', '2021-09-14 02:19:45.616+00', '2021-09-14 02:19:53.3+00', 't_2uhu4szs1kq', NULL, 1, 1, 'r_tfs4qtaxjcs', NULL),
(7, 'update', '2021-09-14 02:19:45.625+00', '2021-09-14 02:19:53.3+00', 't_2uhu4szs1kq', NULL, 1, 1, NULL, NULL), (7, 'update', '2021-09-14 02:19:45.625+00', '2021-09-14 02:19:53.3+00', 't_2uhu4szs1kq', NULL, 1, 1, 'r_tfs4qtaxjcs', NULL),
(8, 'destroy', '2021-09-14 02:19:45.633+00', '2021-09-14 02:19:53.3+00', 't_2uhu4szs1kq', NULL, 1, 1, NULL, NULL), (8, 'destroy', '2021-09-14 02:19:45.633+00', '2021-09-14 02:19:53.3+00', 't_2uhu4szs1kq', NULL, 1, 1, 'r_tfs4qtaxjcs', NULL),
(13, 'create', '2021-09-14 02:20:00.337+00', '2021-09-14 02:20:00.337+00', 'users', NULL, 1, 1, 1, NULL), (13, 'create', '2021-09-14 02:20:00.337+00', '2021-09-14 02:20:00.337+00', 'users', NULL, 1, 1, 'r_tfs4qtaxjcs', NULL),
(14, 'get', '2021-09-14 02:20:00.347+00', '2021-09-14 02:20:00.347+00', 'users', NULL, 1, 1, 1, NULL), (14, 'get', '2021-09-14 02:20:00.347+00', '2021-09-14 02:20:00.347+00', 'users', NULL, 1, 1, 'r_tfs4qtaxjcs', NULL),
(15, 'update', '2021-09-14 02:20:00.356+00', '2021-09-14 02:20:00.356+00', 'users', NULL, 1, 1, 1, NULL), (15, 'update', '2021-09-14 02:20:00.356+00', '2021-09-14 02:20:00.356+00', 'users', NULL, 1, 1, 'r_tfs4qtaxjcs', NULL),
(16, 'destroy', '2021-09-14 02:20:00.364+00', '2021-09-14 02:20:00.364+00', 'users', NULL, 1, 1, 1, NULL), (16, 'destroy', '2021-09-14 02:20:00.364+00', '2021-09-14 02:20:00.364+00', 'users', NULL, 1, 1, 'r_tfs4qtaxjcs', NULL),
(9, 'create', '2021-09-14 02:19:53.259+00', '2021-09-14 02:20:00.371+00', 't_fsveob6p269', NULL, 1, 1, NULL, NULL), (9, 'create', '2021-09-14 02:19:53.259+00', '2021-09-14 02:20:00.371+00', 't_fsveob6p269', NULL, 1, 1, 'r_tfs4qtaxjcs', NULL),
(10, 'get', '2021-09-14 02:19:53.274+00', '2021-09-14 02:20:00.371+00', 't_fsveob6p269', NULL, 1, 1, NULL, NULL), (10, 'get', '2021-09-14 02:19:53.274+00', '2021-09-14 02:20:00.371+00', 't_fsveob6p269', NULL, 1, 1, 'r_tfs4qtaxjcs', NULL),
(11, 'update', '2021-09-14 02:19:53.284+00', '2021-09-14 02:20:00.371+00', 't_fsveob6p269', NULL, 1, 1, NULL, NULL), (11, 'update', '2021-09-14 02:19:53.284+00', '2021-09-14 02:20:00.371+00', 't_fsveob6p269', NULL, 1, 1, 'r_tfs4qtaxjcs', NULL),
(12, 'destroy', '2021-09-14 02:19:53.294+00', '2021-09-14 02:20:00.371+00', 't_fsveob6p269', NULL, 1, 1, NULL, NULL); (12, 'destroy', '2021-09-14 02:19:53.294+00', '2021-09-14 02:20:00.371+00', 't_fsveob6p269', NULL, 1, 1, 'r_tfs4qtaxjcs', NULL);

View File

View File

@ -1,52 +1,52 @@
DELETE FROM "roles_ui_schemas"; DELETE FROM "roles_ui_schemas";
INSERT INTO "roles_ui_schemas" ("created_at", "updated_at", "ui_schema_key", "role_id") VALUES INSERT INTO "roles_ui_schemas" ("created_at", "updated_at", "ui_schema_key", "role_name") VALUES
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', '0b73gccskc2', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', '0b73gccskc2', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'hall72478p5', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'hall72478p5', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'im4un32remd', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'im4un32remd', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'wfa10dg0vyl', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'wfa10dg0vyl', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'k33sn747t75', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'k33sn747t75', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', '6chv7wh9gy9', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', '6chv7wh9gy9', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'h41g5aiikz1', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'h41g5aiikz1', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', '66g7jbpqsen', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', '66g7jbpqsen', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'on7wtx4zj4i', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'on7wtx4zj4i', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', '2fmrebsf4gp', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', '2fmrebsf4gp', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'p5e092zc0ot', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'p5e092zc0ot', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', '2eacz1979l5', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', '2eacz1979l5', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'ouuvop86xkn', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'ouuvop86xkn', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', '6zdy7upftb2', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', '6zdy7upftb2', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'h3irsnu3clo', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'h3irsnu3clo', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', '2891oprcahh', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', '2891oprcahh', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'tqpxc3hilti', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'tqpxc3hilti', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'kme85fmbfdp', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'kme85fmbfdp', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', '75uiuzj3a2y', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', '75uiuzj3a2y', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'o6vjinhjhad', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'o6vjinhjhad', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'knyew80qe7m', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'knyew80qe7m', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'gd7t6lt75n9', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'gd7t6lt75n9', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', '1i8da3k889z', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', '1i8da3k889z', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'mqr5sytnrex', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'mqr5sytnrex', 'r_tfs4qtaxjcs'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'im4un32remd', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'im4un32remd', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'wfa10dg0vyl', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'wfa10dg0vyl', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'k33sn747t75', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'k33sn747t75', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', '6chv7wh9gy9', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', '6chv7wh9gy9', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'h41g5aiikz1', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'h41g5aiikz1', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', '66g7jbpqsen', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', '66g7jbpqsen', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'on7wtx4zj4i', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'on7wtx4zj4i', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', '2fmrebsf4gp', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', '2fmrebsf4gp', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'p5e092zc0ot', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'p5e092zc0ot', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', '2eacz1979l5', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', '2eacz1979l5', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'ouuvop86xkn', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'ouuvop86xkn', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', '6zdy7upftb2', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', '6zdy7upftb2', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'h3irsnu3clo', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'h3irsnu3clo', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', '2891oprcahh', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', '2891oprcahh', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'tqpxc3hilti', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'tqpxc3hilti', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'kme85fmbfdp', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'kme85fmbfdp', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', '75uiuzj3a2y', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', '75uiuzj3a2y', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'o6vjinhjhad', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'o6vjinhjhad', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'knyew80qe7m', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'knyew80qe7m', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', '43f9otxtq42', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', '43f9otxtq42', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'dhye1xbbr3n', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'dhye1xbbr3n', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', '1i8da3k889z', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', '1i8da3k889z', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'mqr5sytnrex', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'mqr5sytnrex', 'r_np59b00ex8z'),
('2021-09-14 02:22:46.7+00', '2021-09-14 02:22:46.7+00', '0b73gccskc2', 2), ('2021-09-14 02:22:46.7+00', '2021-09-14 02:22:46.7+00', '0b73gccskc2', 'r_np59b00ex8z'),
('2021-09-14 02:22:53.939+00', '2021-09-14 02:22:53.939+00', 'hall72478p5', 2), ('2021-09-14 02:22:53.939+00', '2021-09-14 02:22:53.939+00', 'hall72478p5', 'r_np59b00ex8z'),
('2021-09-14 02:26:04.313+00', '2021-09-14 02:26:04.313+00', 'gd7t6lt75n9', 2); ('2021-09-14 02:26:04.313+00', '2021-09-14 02:26:04.313+00', 'gd7t6lt75n9', 'r_np59b00ex8z');

View File

@ -1568,6 +1568,6 @@ INSERT INTO "ui_schemas" ("key", "name", "title", "type", "x-component", "option
INSERT INTO "ui_schemas" ("key", "name", "title", "type", "x-component", "options", "async", "sort", "created_at", "updated_at", "parent_key") VALUES INSERT INTO "ui_schemas" ("key", "name", "title", "type", "x-component", "options", "async", "sort", "created_at", "updated_at", "parent_key") VALUES
('17mcgd6s6d7', 'liia3b09auv', '关注 GitHub', 'void', 'Menu.URL', '{"version":"2.0","x-designable-bar":"Menu.DesignableBar","x-component-props":{"href":"https://github.com/nocobase/nocobase","icon":"githuboutlined"}}', '0', 12, '2021-11-08 14:27:02.538+00', '2021-11-08 14:27:02.538+00', 'qqzzjakwkwl'); ('17mcgd6s6d7', 'liia3b09auv', '关注 GitHub', 'void', 'Menu.URL', '{"version":"2.0","x-designable-bar":"Menu.DesignableBar","x-component-props":{"href":"https://github.com/nocobase/nocobase","icon":"githuboutlined"}}', '0', 12, '2021-11-08 14:27:02.538+00', '2021-11-08 14:27:02.538+00', 'qqzzjakwkwl');
INSERT INTO "ui_schemas" ("key", "name", "title", "type", "x-component", "options", "async", "sort", "created_at", "updated_at", "parent_key") VALUES INSERT INTO "ui_schemas" ("key", "name", "title", "type", "x-component", "options", "async", "sort", "created_at", "updated_at", "parent_key") VALUES
('sarppf56eim', NULL, '{{t("Roles")}}', 'array', 'Select.Drawer', '{"x-component-props":{},"x-decorator":"FormItem","x-designable-bar":"Select.Drawer.DesignableBar"}', '0', 4, '2021-11-16 08:32:08.041+00', '2021-11-16 08:32:08.041+00', NULL); ('sarppf56eim', NULL, '{{t("Roles")}}', 'array', 'Select.Drawer', '{"x-component-props":{"fieldNames": {"label": "title","value": "name"}},"x-decorator":"FormItem","x-designable-bar":"Select.Drawer.DesignableBar"}', '0', 4, '2021-11-16 08:32:08.041+00', '2021-11-16 08:32:08.041+00', NULL);
INSERT INTO "ui_schemas" ("key", "name", "title", "type", "x-component", "options", "async", "sort", "created_at", "updated_at", "parent_key") VALUES INSERT INTO "ui_schemas" ("key", "name", "title", "type", "x-component", "options", "async", "sort", "created_at", "updated_at", "parent_key") VALUES
('bhqy0xdfiog', NULL, '{{t("Role name")}}', 'string', 'Input', '{}', '0', 5, '2021-11-16 09:32:00.3+00', '2021-11-16 09:32:00.3+00', NULL); ('bhqy0xdfiog', NULL, '{{t("Role name")}}', 'string', 'Input', '{}', '0', 5, '2021-11-16 09:32:00.3+00', '2021-11-16 09:32:00.3+00', NULL);

View File

@ -1,8 +1,8 @@
DELETE FROM "collections"; DELETE FROM "collections";
INSERT INTO "collections" ("name", "logging", "title", "privilege", "sortable", "options", "sort", "created_at", "updated_at", "ui_schema_key") VALUES INSERT INTO "collections" ("name", "logging", "title", "privilege", "sortable", "options", "sort", "created_at", "updated_at", "ui_schema_key") VALUES
('users', '1', '{{t("Users")}}', 'undelete', '"sort"', '{"createdBy":false,"updatedBy":false}', 2, '2021-09-02 15:07:56.914+00', '2021-09-15 00:59:20.676+00', NULL), ('users', '1', '{{t("Users")}}', 'undelete', '"sort"', '{"createdBy":false,"updatedBy":false,"scopes":{"withPassword":{"attributes":{"include":["password"]}}},"defaultScope":{"attributes":{"exclude":["password"]}}}', 1, '2021-11-17 04:49:27.376+00', '2021-11-17 04:49:27.376+00', NULL),
('roles', '1', '{{t("Roles")}}', NULL, '"sort"', '{}', 2, '2021-11-17 04:49:27.529+00', '2021-11-17 04:49:27.529+00', NULL);
INSERT INTO "collections" ("name", "logging", "title", "privilege", "sortable", "options", "sort", "created_at", "updated_at", "ui_schema_key") VALUES
('t_fsveob6p269', '1', '顾客', NULL, '"sort"', '{}', 5, '2021-09-12 01:05:52.722+00', '2021-09-18 04:15:23.113+00', NULL), ('t_fsveob6p269', '1', '顾客', NULL, '"sort"', '{}', 5, '2021-09-12 01:05:52.722+00', '2021-09-18 04:15:23.113+00', NULL),
('t_geso7fru7a9', '1', '订单', NULL, '"sort"', '{}', 4, '2021-09-12 01:06:05.19+00', '2021-09-18 04:15:42.566+00', NULL), ('t_geso7fru7a9', '1', '订单', NULL, '"sort"', '{}', 4, '2021-09-12 01:06:05.19+00', '2021-09-18 04:15:42.566+00', NULL),
('t_2uhu4szs1kq', '1', '任务', NULL, '"sort"', '{}', 3, '2021-09-03 08:17:30.495+00', '2021-09-18 04:15:42.572+00', NULL); ('t_2uhu4szs1kq', '1', '任务', NULL, '"sort"', '{}', 3, '2021-09-03 08:17:30.495+00', '2021-09-18 04:15:42.572+00', NULL);
INSERT INTO "collections" ("name", "logging", "title", "privilege", "sortable", "options", "sort", "created_at", "updated_at", "ui_schema_key") VALUES
('roles', '1', '{{t("Roles")}}', NULL, '"sort"', '{}', 2, '2021-11-16 09:25:52.28+00', '2021-11-16 09:25:52.28+00', NULL);

View File

@ -52,7 +52,7 @@ INSERT INTO "fields" ("key", "name", "interface", "data_type", "privilege", "sta
('sbrf1cdkpb9', 'h1f9o1xvevb', 'createdAt', 'date', 'undelete', 1, '{"field":"created_at"}', 1, '2021-09-12 01:06:55.123+00', '2021-09-12 01:06:55.133+00', NULL, NULL, 'oo7ejuze28i', NULL); ('sbrf1cdkpb9', 'h1f9o1xvevb', 'createdAt', 'date', 'undelete', 1, '{"field":"created_at"}', 1, '2021-09-12 01:06:55.123+00', '2021-09-12 01:06:55.133+00', NULL, NULL, 'oo7ejuze28i', NULL);
INSERT INTO "fields" ("key", "name", "interface", "data_type", "privilege", "state", "options", "sort", "created_at", "updated_at", "parent_key", "collection_name", "reverse_key", "ui_schema_key") VALUES INSERT INTO "fields" ("key", "name", "interface", "data_type", "privilege", "state", "options", "sort", "created_at", "updated_at", "parent_key", "collection_name", "reverse_key", "ui_schema_key") VALUES
('f_v3j9yv454ch', 'roles', 'linkTo', 'belongsToMany', NULL, 1, '{"target":"roles","foreignKey":"user_id","otherKey":"role_id","sourceKey":"id","targetKey":"id"}', NULL, '2021-11-16 08:32:08.033+00', '2021-11-16 08:32:08.049+00', NULL, 'users', NULL, 'sarppf56eim'), ('f_v3j9yv454ch', 'roles', 'linkTo', 'belongsToMany', NULL, 1, '{"target":"roles","foreignKey":"user_id","otherKey":"role_name","sourceKey":"id","targetKey":"name"}', NULL, '2021-11-16 08:32:08.033+00', '2021-11-16 08:32:08.049+00', NULL, 'users', NULL, 'sarppf56eim'),
('f_jd6k0hxqe91', 'title', 'string', 'string', NULL, 1, '{}', NULL, '2021-11-16 08:32:08.096+00', '2021-11-16 08:32:08.113+00', NULL, 'roles', NULL, 'bhqy0xdfiog'), ('f_jd6k0hxqe91', 'title', 'string', 'string', NULL, 1, '{}', NULL, '2021-11-16 08:32:08.096+00', '2021-11-16 08:32:08.113+00', NULL, 'roles', NULL, 'bhqy0xdfiog'),
('f_9jeplea2nwz', 'name', NULL, 'uid', NULL, 0, '{"unique":true,"prefix":"r_"}', NULL, '2021-11-16 08:32:08.121+00', '2021-11-16 08:32:08.121+00', NULL, 'roles', NULL, NULL), ('f_9jeplea2nwz', 'name', NULL, 'uid', NULL, 0, '{"unique":true,"prefix":"r_"}', NULL, '2021-11-16 08:32:08.121+00', '2021-11-16 08:32:08.121+00', NULL, 'roles', NULL, NULL),
('f_no8fg9nvnuk', 'actionPermissions', NULL, 'hasMany', NULL, 0, '{"target":"action_permissions"}', NULL, '2021-11-16 08:32:08.128+00', '2021-11-16 08:32:08.128+00', NULL, 'roles', NULL, NULL), ('f_no8fg9nvnuk', 'actionPermissions', NULL, 'hasMany', NULL, 0, '{"target":"action_permissions"}', NULL, '2021-11-16 08:32:08.128+00', '2021-11-16 08:32:08.128+00', NULL, 'roles', NULL, NULL),

View File

View File

View File

View File

View File

View File

6
packages/plugin-client/src/db/zh-CN/part2/12-roles.sql Normal file → Executable file
View File

@ -1,4 +1,4 @@
DELETE FROM "roles"; DELETE FROM "roles";
INSERT INTO "roles" ("id", "name", "title", "sort", "created_at", "updated_at", "created_by_id", "updated_by_id") VALUES INSERT INTO "roles" ("name", "title", "sort", "created_at", "updated_at", "created_by_id", "updated_by_id") VALUES
(1, 'r_tfs4qtaxjcs', '管理员', 1, '2021-09-14 02:12:19.98+00', '2021-09-14 02:12:19.98+00', 1, 1), ('r_tfs4qtaxjcs', '管理员', 1, '2021-09-14 02:12:19.98+00', '2021-09-14 02:12:19.98+00', 1, 1),
(2, 'r_np59b00ex8z', '普通成员', 2, '2021-09-14 02:12:35.799+00', '2021-09-14 02:12:35.799+00', 1, 1); ('r_np59b00ex8z', '普通成员', 2, '2021-09-14 02:12:35.799+00', '2021-09-14 02:12:35.799+00', 1, 1);

View File

@ -1,18 +1,18 @@
DELETE FROM "action_permissions"; DELETE FROM "action_permissions";
INSERT INTO "action_permissions" ("id", "action_name", "created_at", "updated_at", "collection_name", "user_id", "created_by_id", "updated_by_id", "role_id", "scope_id") VALUES INSERT INTO "action_permissions" ("id", "action_name", "created_at", "updated_at", "collection_name", "user_id", "created_by_id", "updated_by_id", "role_name", "scope_id") VALUES
(1, 'create', '2021-09-14 02:19:38.019+00', '2021-09-14 02:19:45.64+00', 't_geso7fru7a9', NULL, 1, 1, NULL, NULL), (1, 'create', '2021-09-14 02:19:38.019+00', '2021-09-14 02:19:45.64+00', 't_geso7fru7a9', NULL, 1, 1, 'r_tfs4qtaxjcs', NULL),
(2, 'get', '2021-09-14 02:19:38.04+00', '2021-09-14 02:19:45.64+00', 't_geso7fru7a9', NULL, 1, 1, NULL, NULL), (2, 'get', '2021-09-14 02:19:38.04+00', '2021-09-14 02:19:45.64+00', 't_geso7fru7a9', NULL, 1, 1, 'r_tfs4qtaxjcs', NULL),
(3, 'update', '2021-09-14 02:19:38.053+00', '2021-09-14 02:19:45.64+00', 't_geso7fru7a9', NULL, 1, 1, NULL, NULL), (3, 'update', '2021-09-14 02:19:38.053+00', '2021-09-14 02:19:45.64+00', 't_geso7fru7a9', NULL, 1, 1, 'r_tfs4qtaxjcs', NULL),
(4, 'destroy', '2021-09-14 02:19:38.067+00', '2021-09-14 02:19:45.64+00', 't_geso7fru7a9', NULL, 1, 1, NULL, NULL), (4, 'destroy', '2021-09-14 02:19:38.067+00', '2021-09-14 02:19:45.64+00', 't_geso7fru7a9', NULL, 1, 1, 'r_tfs4qtaxjcs', NULL),
(5, 'create', '2021-09-14 02:19:45.601+00', '2021-09-14 02:19:53.3+00', 't_2uhu4szs1kq', NULL, 1, 1, NULL, NULL), (5, 'create', '2021-09-14 02:19:45.601+00', '2021-09-14 02:19:53.3+00', 't_2uhu4szs1kq', NULL, 1, 1, 'r_tfs4qtaxjcs', NULL),
(6, 'get', '2021-09-14 02:19:45.616+00', '2021-09-14 02:19:53.3+00', 't_2uhu4szs1kq', NULL, 1, 1, NULL, NULL), (6, 'get', '2021-09-14 02:19:45.616+00', '2021-09-14 02:19:53.3+00', 't_2uhu4szs1kq', NULL, 1, 1, 'r_tfs4qtaxjcs', NULL),
(7, 'update', '2021-09-14 02:19:45.625+00', '2021-09-14 02:19:53.3+00', 't_2uhu4szs1kq', NULL, 1, 1, NULL, NULL), (7, 'update', '2021-09-14 02:19:45.625+00', '2021-09-14 02:19:53.3+00', 't_2uhu4szs1kq', NULL, 1, 1, 'r_tfs4qtaxjcs', NULL),
(8, 'destroy', '2021-09-14 02:19:45.633+00', '2021-09-14 02:19:53.3+00', 't_2uhu4szs1kq', NULL, 1, 1, NULL, NULL), (8, 'destroy', '2021-09-14 02:19:45.633+00', '2021-09-14 02:19:53.3+00', 't_2uhu4szs1kq', NULL, 1, 1, 'r_tfs4qtaxjcs', NULL),
(13, 'create', '2021-09-14 02:20:00.337+00', '2021-09-14 02:20:00.337+00', 'users', NULL, 1, 1, 1, NULL), (13, 'create', '2021-09-14 02:20:00.337+00', '2021-09-14 02:20:00.337+00', 'users', NULL, 1, 1, 'r_tfs4qtaxjcs', NULL),
(14, 'get', '2021-09-14 02:20:00.347+00', '2021-09-14 02:20:00.347+00', 'users', NULL, 1, 1, 1, NULL), (14, 'get', '2021-09-14 02:20:00.347+00', '2021-09-14 02:20:00.347+00', 'users', NULL, 1, 1, 'r_tfs4qtaxjcs', NULL),
(15, 'update', '2021-09-14 02:20:00.356+00', '2021-09-14 02:20:00.356+00', 'users', NULL, 1, 1, 1, NULL), (15, 'update', '2021-09-14 02:20:00.356+00', '2021-09-14 02:20:00.356+00', 'users', NULL, 1, 1, 'r_tfs4qtaxjcs', NULL),
(16, 'destroy', '2021-09-14 02:20:00.364+00', '2021-09-14 02:20:00.364+00', 'users', NULL, 1, 1, 1, NULL), (16, 'destroy', '2021-09-14 02:20:00.364+00', '2021-09-14 02:20:00.364+00', 'users', NULL, 1, 1, 'r_tfs4qtaxjcs', NULL),
(9, 'create', '2021-09-14 02:19:53.259+00', '2021-09-14 02:20:00.371+00', 't_fsveob6p269', NULL, 1, 1, NULL, NULL), (9, 'create', '2021-09-14 02:19:53.259+00', '2021-09-14 02:20:00.371+00', 't_fsveob6p269', NULL, 1, 1, 'r_tfs4qtaxjcs', NULL),
(10, 'get', '2021-09-14 02:19:53.274+00', '2021-09-14 02:20:00.371+00', 't_fsveob6p269', NULL, 1, 1, NULL, NULL), (10, 'get', '2021-09-14 02:19:53.274+00', '2021-09-14 02:20:00.371+00', 't_fsveob6p269', NULL, 1, 1, 'r_tfs4qtaxjcs', NULL),
(11, 'update', '2021-09-14 02:19:53.284+00', '2021-09-14 02:20:00.371+00', 't_fsveob6p269', NULL, 1, 1, NULL, NULL), (11, 'update', '2021-09-14 02:19:53.284+00', '2021-09-14 02:20:00.371+00', 't_fsveob6p269', NULL, 1, 1, 'r_tfs4qtaxjcs', NULL),
(12, 'destroy', '2021-09-14 02:19:53.294+00', '2021-09-14 02:20:00.371+00', 't_fsveob6p269', NULL, 1, 1, NULL, NULL); (12, 'destroy', '2021-09-14 02:19:53.294+00', '2021-09-14 02:20:00.371+00', 't_fsveob6p269', NULL, 1, 1, 'r_tfs4qtaxjcs', NULL);

View File

View File

@ -1,52 +1,52 @@
DELETE FROM "roles_ui_schemas"; DELETE FROM "roles_ui_schemas";
INSERT INTO "roles_ui_schemas" ("created_at", "updated_at", "ui_schema_key", "role_id") VALUES INSERT INTO "roles_ui_schemas" ("created_at", "updated_at", "ui_schema_key", "role_name") VALUES
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', '0b73gccskc2', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', '0b73gccskc2', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'hall72478p5', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'hall72478p5', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'im4un32remd', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'im4un32remd', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'wfa10dg0vyl', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'wfa10dg0vyl', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'k33sn747t75', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'k33sn747t75', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', '6chv7wh9gy9', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', '6chv7wh9gy9', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'h41g5aiikz1', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'h41g5aiikz1', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', '66g7jbpqsen', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', '66g7jbpqsen', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'on7wtx4zj4i', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'on7wtx4zj4i', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', '2fmrebsf4gp', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', '2fmrebsf4gp', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'p5e092zc0ot', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'p5e092zc0ot', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', '2eacz1979l5', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', '2eacz1979l5', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'ouuvop86xkn', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'ouuvop86xkn', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', '6zdy7upftb2', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', '6zdy7upftb2', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'h3irsnu3clo', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'h3irsnu3clo', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', '2891oprcahh', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', '2891oprcahh', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'tqpxc3hilti', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'tqpxc3hilti', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'kme85fmbfdp', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'kme85fmbfdp', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', '75uiuzj3a2y', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', '75uiuzj3a2y', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'o6vjinhjhad', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'o6vjinhjhad', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'knyew80qe7m', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'knyew80qe7m', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'gd7t6lt75n9', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'gd7t6lt75n9', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', '1i8da3k889z', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', '1i8da3k889z', 'r_tfs4qtaxjcs'),
('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'mqr5sytnrex', 1), ('2021-09-14 02:19:13.669+00', '2021-09-14 02:19:13.669+00', 'mqr5sytnrex', 'r_tfs4qtaxjcs'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'im4un32remd', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'im4un32remd', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'wfa10dg0vyl', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'wfa10dg0vyl', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'k33sn747t75', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'k33sn747t75', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', '6chv7wh9gy9', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', '6chv7wh9gy9', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'h41g5aiikz1', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'h41g5aiikz1', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', '66g7jbpqsen', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', '66g7jbpqsen', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'on7wtx4zj4i', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'on7wtx4zj4i', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', '2fmrebsf4gp', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', '2fmrebsf4gp', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'p5e092zc0ot', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'p5e092zc0ot', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', '2eacz1979l5', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', '2eacz1979l5', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'ouuvop86xkn', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'ouuvop86xkn', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', '6zdy7upftb2', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', '6zdy7upftb2', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'h3irsnu3clo', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'h3irsnu3clo', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', '2891oprcahh', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', '2891oprcahh', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'tqpxc3hilti', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'tqpxc3hilti', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'kme85fmbfdp', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'kme85fmbfdp', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', '75uiuzj3a2y', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', '75uiuzj3a2y', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'o6vjinhjhad', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'o6vjinhjhad', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'knyew80qe7m', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'knyew80qe7m', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', '43f9otxtq42', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', '43f9otxtq42', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'dhye1xbbr3n', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'dhye1xbbr3n', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', '1i8da3k889z', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', '1i8da3k889z', 'r_np59b00ex8z'),
('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'mqr5sytnrex', 2), ('2021-09-14 02:20:09.49+00', '2021-09-14 02:20:09.49+00', 'mqr5sytnrex', 'r_np59b00ex8z'),
('2021-09-14 02:22:46.7+00', '2021-09-14 02:22:46.7+00', '0b73gccskc2', 2), ('2021-09-14 02:22:46.7+00', '2021-09-14 02:22:46.7+00', '0b73gccskc2', 'r_np59b00ex8z'),
('2021-09-14 02:22:53.939+00', '2021-09-14 02:22:53.939+00', 'hall72478p5', 2), ('2021-09-14 02:22:53.939+00', '2021-09-14 02:22:53.939+00', 'hall72478p5', 'r_np59b00ex8z'),
('2021-09-14 02:26:04.313+00', '2021-09-14 02:26:04.313+00', 'gd7t6lt75n9', 2); ('2021-09-14 02:26:04.313+00', '2021-09-14 02:26:04.313+00', 'gd7t6lt75n9', 'r_np59b00ex8z');

View File

@ -8,8 +8,8 @@ export default {
{ {
type: 'uid', type: 'uid',
name: 'name', name: 'name',
unique: true, // unique: true,
// primaryKey: true, primaryKey: true,
prefix: 'r_', prefix: 'r_',
state: 0, state: 0,
}, },

View File

@ -58,14 +58,19 @@ export default {
name: 'roles', name: 'roles',
target: 'roles', target: 'roles',
foreignKey: 'user_id', foreignKey: 'user_id',
otherKey: 'role_id', otherKey: 'role_name',
sourceKey: 'id', sourceKey: 'id',
targetKey: 'id', targetKey: 'name',
uiSchema: { uiSchema: {
type: 'array', type: 'array',
title: '{{t("Roles")}}', title: '{{t("Roles")}}',
'x-component': 'Select.Drawer', 'x-component': 'Select.Drawer',
'x-component-props': {}, 'x-component-props': {
fieldNames: {
label: 'title',
value: 'name',
},
},
'x-decorator': 'FormItem', 'x-decorator': 'FormItem',
'x-designable-bar': 'Select.Drawer.DesignableBar', 'x-designable-bar': 'Select.Drawer.DesignableBar',
}, },