-- Perangkat Guru: safe XAMPP trial data
-- Import database/schema.sql first, then import this file into database perangkat_guru_xampp.
-- Trial administrator: admin@perangkatguru.local / StrongPass2026


INSERT INTO school_profiles (id, school_name, address, phone, accreditation, principal_name, principal_identity_number)
VALUES (1, 'SMA Contoh Nusantara', 'Jl. Pendidikan No. 1, Kota Contoh', '(021) 555 0101', 'A', 'Kepala Sekolah Uji, M.Pd.', 'NIP-TEST-001');

INSERT INTO academic_periods (id, name, semester, start_date, end_date, is_active)
VALUES (1, '2026/2027', 'Gasal', '2026-07-01', '2026-12-31', 1);

INSERT INTO teachers (id, name, identity_number)
VALUES (1, 'Guru Uji, S.Pd.', 'NIP-TEST-101');

INSERT INTO classes (id, name, grade_level, homeroom_teacher_id)
VALUES (1, 'X - 1', 'X', 1);

INSERT INTO subjects (id, name, code)
VALUES (1, 'Kemuhammadiyahan', 'KEMUH');

INSERT INTO students (id, student_number, nisn, name, gender, is_active) VALUES
  (1, 'DEMO-001', '9000000001', 'Siswa Uji Alpha', 'L', 1),
  (2, 'DEMO-002', '9000000002', 'Siswa Uji Beta', 'P', 1),
  (3, 'DEMO-003', '9000000003', 'Siswa Uji Gamma', 'L', 1);

INSERT INTO enrollments (id, student_id, class_id, academic_period_id, attendance_number) VALUES
  (1, 1, 1, 1, '01'),
  (2, 2, 1, 1, '02'),
  (3, 3, 1, 1, '03');

INSERT INTO calendar_events (id, academic_period_id, title, category, start_date, end_date, is_effective, notes, created_by) VALUES
  (1, 1, 'Masa Pengenalan Lingkungan Sekolah', 'sekolah', '2026-07-13', '2026-07-15', 0, 'Kegiatan awal tahun ajaran.', 1),
  (2, 1, 'Pembelajaran Efektif Dimulai', 'pembelajaran', '2026-07-20', '2026-07-20', 1, 'Awal pembelajaran efektif.', 1),
  (3, 1, 'Penilaian Sumatif Tengah Semester', 'asesmen', '2026-09-21', '2026-09-25', 0, 'Jadwal asesmen tengah semester.', 1);

INSERT INTO effective_week_plans (id, academic_period_id, class_id, subject_id, teacher_id, lessons_per_week, total_calendar_weeks, non_effective_weeks, effective_weeks, effective_lessons)
VALUES (1, 1, 1, 1, 1, 2, 20, 2, 18, 36);

INSERT INTO effective_week_months (id, effective_week_plan_id, month_name, week_count, effective_day_count, notes) VALUES
  (1, 1, 'Juli', 2, 8, 'Awal pembelajaran efektif'),
  (2, 1, 'Agustus', 4, 22, NULL),
  (3, 1, 'September', 4, 20, 'Termasuk jadwal asesmen'),
  (4, 1, 'Oktober', 4, 22, NULL),
  (5, 1, 'November', 4, 20, NULL),
  (6, 1, 'Desember', 2, 10, 'Akhir semester');

INSERT INTO non_effective_events (id, effective_week_plan_id, title, week_count, notes) VALUES
  (1, 1, 'MPLS', 1, 'Pekan orientasi siswa baru'),
  (2, 1, 'Penilaian Sumatif Tengah Semester', 1, 'Pekan asesmen tengah semester');

INSERT INTO teaching_schedules (id, academic_period_id, class_id, subject_id, teacher_id, day_of_week, start_time, end_time, room)
VALUES (1, 1, 1, 1, 1, 1, '07:00:00', '08:30:00', 'Ruang X-1');

INSERT INTO teaching_journals (id, teaching_schedule_id, effective_week_plan_id, journal_date, learning_objective, material, activities, allocation_minutes, students_present, students_absent, absent_student_names, implementation_status, notes, created_by)
VALUES (1, 1, 1, '2026-07-20', 'Memahami ciri gerakan Muhammadiyah sebagai gerakan Islam dan dakwah.', 'Ciri gerakan Muhammadiyah.', 'Apersepsi, diskusi kelompok, dan refleksi.', 90, 3, 0, NULL, 'terlaksana', 'Pembelajaran berlangsung sesuai rencana.', 1);

INSERT INTO assessment_sets (id, academic_period_id, class_id, subject_id, teacher_id, name, tp_code, tp_description, components, is_report_sumatif_1, is_active) VALUES
  (1, 1, 1, 1, 1, 'Nilai Pengetahuan 1', 'TP 1', 'Memahami ciri gerakan Muhammadiyah sebagai gerakan Islam dan dakwah.', '["ulangan","tugas","observasi"]', 1, 1),
  (2, 1, 1, 1, 1, 'Nilai Pengetahuan 2', 'TP 2', 'Menjelaskan sejarah Muhammadiyah pada periode awal.', '["ulangan","tugas"]', 0, 1);

INSERT INTO knowledge_scores (id, assessment_set_id, student_id, component_scores, calculated_average, updated_by) VALUES
  (1, 1, 1, '{"ulangan":80,"tugas":90,"observasi":85}', 85.00, 1),
  (2, 1, 2, '{"ulangan":75,"tugas":80,"observasi":80}', 78.33, 1),
  (3, 1, 3, '{"ulangan":70,"tugas":75,"observasi":75}', 73.33, 1),
  (4, 2, 1, '{"ulangan":70,"tugas":75}', 72.50, 1),
  (5, 2, 2, '{"ulangan":80,"tugas":85}', 82.50, 1),
  (6, 2, 3, '{"ulangan":65,"tugas":70}', 67.50, 1);

INSERT INTO diagnostic_profiles (id, academic_period_id, class_id, subject_id, student_id, non_cognitive, cognitive, updated_by) VALUES
  (1, 1, 1, 1, 1, '{"interaction_pattern":"Aktif berdiskusi","initiative":"Baik","learning_motivation":"Tinggi","learning_assessment":"Mandiri","parent_occupation":"Wiraswasta","parent_education":"SMA","parent_expectation":"Melanjutkan pendidikan","auditory":"Cukup","visual":"Baik","kinesthetic":"Baik","student_interest":"Sejarah organisasi"}', '{"tp1_prerequisite":"Baik","tp1_initial_understanding":"Cukup","tp2_prerequisite":"Cukup","tp2_initial_understanding":"Cukup"}', 1);

INSERT INTO daily_assessments (id, academic_period_id, class_id, subject_id, title, competency_description, assessment_date, item_count, maximum_score, kktp, created_by)
VALUES (1, 1, 1, 1, 'UH 1 — Ciri Gerakan Muhammadiyah', 'Memahami ciri gerakan Muhammadiyah.', '2026-08-10', 5, 5, 75, 1);

INSERT INTO daily_assessment_scores (id, daily_assessment_id, student_id, item_scores, total_score, achievement, is_complete, updated_by) VALUES
  (1, 1, 1, '{"1":1,"2":1,"3":0,"4":1,"5":1}', 4, 80.00, 1, 1),
  (2, 1, 2, '{"1":1,"2":1,"3":1,"4":1,"5":0}', 4, 80.00, 1, 1),
  (3, 1, 3, '{"1":1,"2":0,"3":0,"4":1,"5":1}', 3, 60.00, 0, 1);

INSERT INTO learning_objectives (id, academic_period_id, class_id, subject_id, objective_number, objective_text) VALUES
  (1, 1, 1, 1, 1, 'Memahami ciri gerakan Muhammadiyah sebagai gerakan Islam dan dakwah.'),
  (2, 1, 1, 1, 2, 'Menjelaskan sejarah Muhammadiyah pada periode awal.');

INSERT INTO report_settings (id, academic_period_id, class_id, subject_id, teacher_id, kktp)
VALUES (1, 1, 1, 1, 1, 75.00);

INSERT INTO report_scores (id, report_setting_id, student_id, sumatif_1, sumatif_2, sumatif_3, sumatif_4, psts, psas_non_test, psas_test, final_score, rounded_score, predicate, completion_status, strongest_objective, improvement_objective) VALUES
  (1, 1, 1, 85.00, 82.00, NULL, NULL, 80.00, 85.00, 88.00, 84.38, 84, 'Sangat Baik', 'TUNTAS', 'Memahami ciri gerakan Muhammadiyah sebagai gerakan Islam dan dakwah.', 'Menjelaskan sejarah Muhammadiyah pada periode awal.'),
  (2, 1, 2, 78.33, 80.00, NULL, NULL, 78.00, 80.00, 82.00, 79.67, 80, 'Baik', 'TUNTAS', 'Menjelaskan sejarah Muhammadiyah pada periode awal.', 'Memahami ciri gerakan Muhammadiyah sebagai gerakan Islam dan dakwah.'),
  (3, 1, 3, 73.33, 72.00, NULL, NULL, 70.00, 75.00, 74.00, 72.58, 73, 'Baik', 'TIDAK TUNTAS', 'Memahami ciri gerakan Muhammadiyah sebagai gerakan Islam dan dakwah.', 'Menjelaskan sejarah Muhammadiyah pada periode awal.');
