37 lines
988 B
JavaScript
37 lines
988 B
JavaScript
|
|
'use strict';
|
||
|
|
|
||
|
|
module.exports = {
|
||
|
|
up: async (queryInterface, Sequelize) => {
|
||
|
|
const now = new Date();
|
||
|
|
await queryInterface.bulkInsert('accounts', [
|
||
|
|
{
|
||
|
|
role: 'admin',
|
||
|
|
name_cn: '系统管理员',
|
||
|
|
name_en: 'Administrator',
|
||
|
|
gender: null,
|
||
|
|
phone: null,
|
||
|
|
email: 'admin@competition.com',
|
||
|
|
id_number: '000000000000000000',
|
||
|
|
password: '$2b$10$Nc6PCJItIwuOzpM22dTiAezB.jZMI8mzkCbg3oRZkAWx.QaI4co9.',
|
||
|
|
salt: '$2b$10$Nc6PCJItIwuOzpM22dTiAe',
|
||
|
|
position: '系统管理员',
|
||
|
|
major: null,
|
||
|
|
country: '中国',
|
||
|
|
region: null,
|
||
|
|
organization_cn: '赛事组委会',
|
||
|
|
organization_en: 'Competition Committee',
|
||
|
|
activated: 1,
|
||
|
|
score: null,
|
||
|
|
created_at: now,
|
||
|
|
updated_at: now,
|
||
|
|
},
|
||
|
|
], {});
|
||
|
|
},
|
||
|
|
|
||
|
|
down: async (queryInterface, Sequelize) => {
|
||
|
|
await queryInterface.bulkDelete('accounts', {
|
||
|
|
id_number: '000000000000000000',
|
||
|
|
}, {});
|
||
|
|
},
|
||
|
|
};
|