-- Örnek Veri Ekleme Scripti
-- Bu dosya test amaçlı örnek veriler ekler

-- 1. Örnek Şirket
INSERT INTO companies (name, subdomain, contact_email, contact_phone, subscription_start, subscription_end, is_active)
VALUES ('KERASUSAKADEMİ', 'admin', 'admin@kerasusakademi.com', '02121234567', '2026-01-01', '2026-12-31', 1);

SET @company_id = LAST_INSERT_ID();
-- Şifre: password

SET @teacher_id = LAST_INSERT_ID();
-- Şifre: password

SET @student_id = LAST_INSERT_ID();
-- Şifre: password

SET @parent_id = LAST_INSERT_ID();

-- 3. Öğrenci-Veli İlişkisi
INSERT INTO student_parents (company_id, parent_id, student_id)
VALUES (@company_id, @parent_id, @student_id);

-- 4. Öğrenci Çalışma Programı
-- Pazartesi 18:00-20:00
INSERT INTO student_schedules (company_id, student_id, day_of_week, start_time, end_time)
VALUES (@company_id, @student_id, 1, '18:00:00', '20:00:00');

-- Çarşamba 18:00-20:00
INSERT INTO student_schedules (company_id, student_id, day_of_week, start_time, end_time)
VALUES (@company_id, @student_id, 3, '18:00:00', '20:00:00');

-- Cuma 19:00-21:00
INSERT INTO student_schedules (company_id, student_id, day_of_week, start_time, end_time)
VALUES (@company_id, @student_id, 5, '19:00:00', '21:00:00');

-- 5. Örnek Ödev
INSERT INTO assignments (company_id, created_by, student_id, title, description, subject, due_date, estimated_hours, priority, status)
VALUES (@company_id, @teacher_id, @student_id, 'Matematik Ödevi', 'Sayfa 45-50 arası problemler çözülecek', 'Matematik', DATE_ADD(CURDATE(), INTERVAL 10 DAY), 3.5, 'high', 'pending');

-- Not: Çalışma programı oluşturmak için API'yi kullanın:
-- POST /api/assignments/{assignment_id}/generate-plan
