You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
type UserRole =
|
|
|
|
| 'super'
|
|
|
|
| 'admin'
|
|
|
|
| 'student'
|
|
|
|
|
|
|
|
interface User {
|
|
|
|
id: number
|
|
|
|
phone_number: string
|
|
|
|
avatar: string
|
|
|
|
email: string
|
|
|
|
id_card: string // 身份证
|
|
|
|
is_active: 1 // 激活
|
|
|
|
| 0
|
|
|
|
is_lock: 0 // 不加锁
|
|
|
|
| 1
|
|
|
|
name: string
|
|
|
|
role_type: 0 // 员工
|
|
|
|
| 1 // 管理员
|
|
|
|
| 2 // 超级管理员
|
|
|
|
user_course_records: string // 课程记录
|
|
|
|
|
|
|
|
[key: string]: unknown
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 部门 */
|
|
|
|
interface Department {
|
|
|
|
id: number
|
|
|
|
company_id: number
|
|
|
|
json_learn_info: unknown
|
|
|
|
name: string
|
|
|
|
parent_chain: string
|
|
|
|
parent_id: number
|
|
|
|
sort: number
|
|
|
|
users: null
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 公司 */
|
|
|
|
interface Company {
|
|
|
|
id: number
|
|
|
|
company_name: string
|
|
|
|
created_at: string
|
|
|
|
delete_flag: boolean
|
|
|
|
email: string
|
|
|
|
is_active: number
|
|
|
|
is_lock: number
|
|
|
|
log: string
|
|
|
|
name: string
|
|
|
|
phone_number: string
|
|
|
|
updated_at: string
|
|
|
|
}
|
|
|
|
|
|
|
|
interface CueStats {
|
|
|
|
/** 必修课数量 */
|
|
|
|
required_course_count: number
|
|
|
|
/** 选修课数量 */
|
|
|
|
nun_required_course_count: number
|
|
|
|
/** 必修已完成 */
|
|
|
|
required_finished_course_count: number
|
|
|
|
/** 选修已完成 */
|
|
|
|
nun_required_finished_course_count: number
|
|
|
|
|
|
|
|
/** 必修课时数量 */
|
|
|
|
required_hour_count: number
|
|
|
|
/** 选修课时数量 */
|
|
|
|
nun_required_hour_count: number
|
|
|
|
/** 必修课时已完成 */
|
|
|
|
nun_required_finished_hour_count: number
|
|
|
|
/** 选修课时已完成 */
|
|
|
|
required_finished_hour_count: number
|
|
|
|
|
|
|
|
/** 今日学习时长 */
|
|
|
|
today_learn_duration: number
|
|
|
|
/** 总学习时长 */
|
|
|
|
learn_duration: number
|
|
|
|
|
|
|
|
total_course_count: number
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 课时学习记录 */
|
|
|
|
interface HourHistory extends Curriculum {
|
|
|
|
userCourseRecord: {
|
|
|
|
id: number;
|
|
|
|
duration: number;
|
|
|
|
user_id: number;
|
|
|
|
created_date: string;
|
|
|
|
start_at: string;
|
|
|
|
end_at: string;
|
|
|
|
course_id: number;
|
|
|
|
hour_id: number;
|
|
|
|
unique_ident: number;
|
|
|
|
hour_count: number;
|
|
|
|
finished_count: number;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|