export interface Entity {
  id: number;
  name: string;
  code?: string;
  type?: string;
  entity_type?: string;
  capacity: number;
  used: number;
  roles: EntityRole[];
  member_count: number;
  student_count: number;
  teacher_count: number;
  corporate_count: number;
}

export interface EntityRole {
  id: number;
  name: string;
  entity_id: number;
  permissions: string[];
  user_count: number;
}

export type RolePermission =
  | "view_students" | "edit_students" | "delete_students"
  | "view_teachers" | "edit_teachers" | "delete_teachers"
  | "view_corporates" | "edit_corporates" | "delete_corporates"
  | "view_mastercorporates" | "edit_mastercorporates" | "delete_mastercorporates"
  | "generate_reading" | "view_reading" | "delete_reading"
  | "generate_listening" | "view_listening" | "delete_listening"
  | "generate_writing" | "view_writing" | "delete_writing"
  | "generate_speaking" | "view_speaking" | "delete_speaking"
  | "generate_level" | "view_level" | "delete_level"
  | "view_classrooms" | "create_classroom" | "rename_classrooms"
  | "add_to_classroom" | "remove_from_classroom" | "delete_classroom"
  | "view_entities" | "rename_entity" | "add_to_entity" | "remove_from_entity" | "delete_entity"
  | "view_entity_roles" | "create_entity_role" | "rename_entity_role"
  | "edit_role_permissions" | "assign_to_role" | "delete_entity_role"
  | "view_assignments" | "create_assignment" | "edit_assignment"
  | "delete_assignment" | "start_assignment" | "archive_assignment"
  | "view_entity_statistics"
  | "create_user" | "create_user_batch"
  | "create_code" | "create_code_batch" | "view_code_list" | "delete_code"
  | "view_statistics" | "download_statistics_report"
  | "edit_grading_system" | "view_student_performance"
  | "upload_classroom" | "download_user_list"
  | "view_student_record" | "download_student_record"
  | "pay_entity" | "view_payment_record"
  | "view_approval_workflows" | "update_exam_privacy"
  | "view_workflows" | "configure_workflows" | "edit_workflow" | "delete_workflow"
  | "view_confidential_exams" | "create_confidential_exams" | "create_public_exams";

export type GlobalPermission =
  | "viewCorporate" | "editCorporate" | "deleteCorporate" | "createCodeCorporate"
  | "viewAdmin" | "editAdmin" | "deleteAdmin" | "createCodeAdmin"
  | "viewStudent" | "editStudent" | "deleteStudent" | "createCodeStudent"
  | "viewTeacher" | "editTeacher" | "deleteTeacher" | "createCodeTeacher"
  | "createReadingExam" | "createListeningExam" | "createWritingExam"
  | "createSpeakingExam" | "createLevelExam"
  | "viewExams" | "viewExercises" | "viewRecords" | "viewStats"
  | "viewTickets" | "viewPaymentRecords"
  | "viewGroup" | "editGroup" | "deleteGroup" | "createGroup"
  | "viewCodes" | "deleteCodes" | "createCodes"
  | "all";
