import api from './api'; export interface SectionSchedule { id: number; section_id: number; account_id: number; day_of_week: number; entry_time: string; exit_time: string; subject_id: number | null; subject_name: string | null; teacher_id?: number | null; teacher_name?: string | null; } export async function listSectionSchedules(sectionId: number): Promise { const { data } = await api.get(`/sections/${sectionId}/schedules`); return data; } export async function updateSectionSchedules(sectionId: number, schedules: { day_of_week: number; entry_time: string; exit_time: string; subject_id?: number | null }[]): Promise { const { data } = await api.put(`/sections/${sectionId}/schedules`, { schedules }); return data; }