/* eslint-disable prettier/prettier */

import { QuestionDifficultyLevel } from 'src/assessment-evaluation/entities/entities-question-manager/question-difficulty-level.entity';
import { QuestionType } from 'src/assessment-evaluation/entities/entities-question-manager/question-type.entity';
import { ResourceClassify } from 'src/resource/entities/resource-classify.entity';
import { Feature } from 'src/system/entities/feature.entity';
import { Role } from 'src/system/entities/role.entity';
import { User } from 'src/system/entities/user.entity';

const dataSources = [
  [
    User, [
      { username: 'admin', name: '系统管理员', password: '123456', type: 1, roleId: 1 },
      { username: 'robot', name: '机器人', password: 'robot', type: 1, roleId: 1, delFlag: 1, id: '0' }
    ]
  ],

  [
    Role, [
      { id: 1, base: 1, name: '管理员' },
      { id: 2, base: 2, name: '教员' },
      { id: 3, base: 3, name: '学员' },
    ]
  ],

  [
    Feature, [
      { name: 'system', type: 1, roleId: 1 },
      { name: 'user', type: 1, roleId: 1 },
      { name: 'org', type: 1, roleId: 1 },
      { name: 'role', type: 1, roleId: 1 },
      { name: 'resource', type: 1, roleId: 1 },
      { name: 'resource-manage', type: 1, roleId: 1 },
      { name: 'resource-share', type: 1, roleId: 1 },
      { name: 'online-course', type: 1, roleId: 1 },
      { name: 'course-manage', type: 1, roleId: 1 },
      { name: 'my-course', type: 1, roleId: 1 },
      { name: 'class-notes', type: 1, roleId: 1 },
      { name: 'online-FAQ', type: 1, roleId: 1 },
      // { name: 'online-teaching', type: 1, roleId: 1 },
      { name: 'live-lectures', type: 1, roleId: 1 },
      { name: 'live-in-class', type: 1, roleId: 1 },
      { name: 'assessment-evaluation', type: 1, roleId: 1 },
      { name: 'question-bank-manage', type: 1, roleId: 1 },
      { name: 'examination-paper-manage', type: 1, roleId: 1 },
      { name: 'exam-arrangement', type: 1, roleId: 1 },
      { name: 'human-evaluation', type: 1, roleId: 1 },
      { name: 'simulation-test', type: 1, roleId: 1 },
      { name: 'online-test', type: 1, roleId: 1 },
      { name: 'wrong-topic-consolidate', type: 1, roleId: 1 },
      { name: 'evaluation', type: 1, roleId: 1 },
      { name: 'student-evaluation', type: 1, roleId: 1 },
      { name: 'evaluation-setting', type: 1, roleId: 1 },

      { name: 'online-course', type: 1, roleId: 2 },
      { name: 'online-FAQ', type: 1, roleId: 2 },
      { name: 'resource', type: 1, roleId: 2 },
      { name: 'resource-manage', type: 1, roleId: 2 },
      { name: 'resource-share', type: 1, roleId: 2 },
      { name: 'course-manage', type: 1, roleId: 2 },
      // { name: 'online-teaching', type: 1, roleId: 2 },
      { name: 'live-lectures', type: 1, roleId: 2 },
      { name: 'assessment-evaluation', type: 1, roleId: 2 },
      { name: 'question-bank-manage', type: 1, roleId: 2 },
      { name: 'examination-paper-manage', type: 1, roleId: 2 },
      { name: 'exam-arrangement', type: 1, roleId: 2 },
      { name: 'human-evaluation', type: 1, roleId: 2 },

      { name: 'online-course', type: 1, roleId: 3 },
      { name: 'my-course', type: 1, roleId: 3 },
      { name: 'resource', type: 1, roleId: 3 },
      { name: 'resource-share', type: 1, roleId: 3 },
      { name: 'class-notes', type: 1, roleId: 3 },
      { name: 'online-FAQ', type: 1, roleId: 3 },
      // { name: 'online-teaching', type: 1, roleId: 3 },
      { name: 'live-in-class', type: 1, roleId: 3 },
      { name: 'assessment-evaluation', type: 1, roleId: 3 },
      { name: 'simulation-test', type: 1, roleId: 3 },
      { name: 'online-test', type: 1, roleId: 3 },
      { name: 'wrong-topic-consolidate', type: 1, roleId: 3 },
    ]
  ],

  [
    ResourceClassify, [
      { id: 1, name: '课程资源' },
      { id: 2, name: '图片', pid: 1 },
      { id: 3, name: '视频', pid: 1 },
      { id: 4, name: '音乐', pid: 1 },
      { id: 5, name: '文档', pid: 1 },
      { id: 6, name: '我的', pid: 1 },
      { id: 7, name: '其他' },
    ]
  ],

  [
    QuestionType, [
      { id: 1, name: '单选题', element: "radio" },
      { id: 2, name: '多选题', element: "checkbox" },
      { id: 3, name: '判断题', element: "radio*2" },
      { id: 4, name: '填空题', element: "input" },
      { id: 5, name: '简答题', element: "textarea" },
    ]
  ],

  [
    QuestionDifficultyLevel, [
      { id: 1, name: '易' },
      { id: 2, name: '较易' },
      { id: 3, name: '中等' },
      { id: 4, name: '较难' },
      { id: 5, name: '难' },
    ]
  ]
];

for (const ds of dataSources) {
  for (const item of ds[1] as any) {
    item.creator = item.updater = 'SYSTEM'
  }
}

export default dataSources