SET search_path TO public;

INSERT INTO university (name, location, isprivate) VALUES
('University of Skopje', 'Skopje', FALSE),
('Private Tech University', 'Bitola', TRUE);

INSERT INTO faculty (name, location, study_field, university_id) VALUES
('Faculty of Computer Science', 'Skopje', 'ENGINEERING', 1),
('Faculty of Economics', 'Skopje', 'SCIENCE', 1),
('Faculty of Engineering', 'Bitola', 'ENGINEERING', 2);

INSERT INTO professor (name, surname, age, facultyid) VALUES
('Ivan', 'Petrov', 45, 1),
('Ana', 'Markoska', 38, 2),
('Boris', 'Stojanov', 50, 3);

INSERT INTO student (name, surname, location, studentindex, facultyid) VALUES
('Elena', 'Georgieva', 'Skopje', 12345, 1),
('Marko', 'Trajkov', 'Skopje', 12346, 2),
('Petar', 'Ivanov', 'Bitola', 12347, 3);

INSERT INTO subject (name, semester, credits, facultyid) VALUES
('Databases', 3, 6, 1),
('Economics 101', 2, 5, 2),
('Engineering Basics', 1, 4, 3);

INSERT INTO student_subject (ss_id, student_id, subject_id, professor_id, final_grade, status, enrollment_date, absences_count) VALUES 
(1, 1, 1, 1, 10, 'Passed', '2026-01-10', 0);

INSERT INTO advice (student_id, professor_id, start_date, end_date) VALUES
(1, 1, '2026-07-01', '2026-12-31'),
(2, 2, '2026-07-01', '2026-12-31'),
(3, 3, '2026-07-01', '2026-12-31');

INSERT INTO affiliated (university_id, professor_id) VALUES
(1, 1),
(1, 2),
(2, 3);

INSERT INTO teach (professor_id, subject_id) VALUES
(1, 1),
(2, 2),
(3, 3);