We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6d6a5a1 commit 01745dcCopy full SHA for 01745dc
tests/helper/add_super.js
@@ -1,8 +1,22 @@
1
require('./initial');
2
const { db } = require('lin-mizar/lin/db');
3
const { User, UserAdmin } = require('lin-mizar/lin');
4
+const { UserInterface } = require('lin-mizar/lin/interface');
5
+const lodash = require('lodash');
6
7
const run = async () => {
8
+ await User.init(
9
+ { ...UserInterface.attributes },
10
+ lodash.merge(
11
+ {
12
+ sequelize: db,
13
+ tableName: 'lin_user',
14
+ modelName: 'user'
15
+ },
16
+ UserInterface.options
17
+ )
18
+ );
19
+ // 创建super
20
try {
21
await User.create({
22
nickname: 'super',
0 commit comments