import type { Component } from 'vue'

export interface IMenuItem {
  tag?: string
  name: string
  path: string
  icon?: Component
  children?: IMenuItem[]
}

// 用户类型
export interface UserType {
  avatar: string
  email: string
  id: string
  mobile: string
  name: string
  username: string
}

// 项目类型
export interface ProjectType {
  id: string
  name: string
  tab: string
}

// 机构类型
export interface OrganizationType {
  contact_information: string
  contact_name: string
  id: string
  is_valid: 1 | 2
  name: string
  validity_date: string
}

// 角色类型
export interface RoleType {
  desc: string
  id: string
  name: string
}

// 权限类型
export interface PermissionType {
  desc: string
  effect_uris: string
  id: string
  name: string
  parent_id: string
  system_tag: number
  tag: string
  type: number
}

// 课程类型
export interface CourseType {
  course_id: string
  cover: string
  credit: number
  elective_type: number
  id: string
  is_finished: number
  is_top: number
  lecturers?: LecturerType[]
  name: string
  online_type: number
  previous_preparation: string
  represent: string
  semester: SemesterType
  target: string
}

// 章节类型
export interface ChapterType {
  id: string
  name: string
  schedule: string
  watch_video_length: number
  is_finished: number
}

// 学期类型
export interface SemesterType {
  id: string
  name: string
  start_time?: string
  end_time?: string
}

// 讲师类型
export interface LecturerType {
  avatar: string
  id: string
  name: string
  summarize: string
}

// 资源类型
export interface ResourceType {
  id: string
  knowledge_points: string
  name: string
  pdf?: string
  url?: string
  size: number
  source_id: string
  paper_title?: string
}
