
delete from project_2425.pol_dog ;
delete from project_2425.package ;
delete from project_2425.covers ;
delete from project_2425."policy" ;
delete from project_2425.payment ;
delete from project_2425.vehicle ;
delete from project_2425.property ;
delete from project_2425.pol_osi ;
delete from project_2425.auto_pol ;
delete from project_2425.property_pol ;
delete from project_2425.travel_pol ;

-- Pol_dog (носители на полиси - мора да постојат customers)
INSERT INTO project_2425.Pol_dog (d_embg, name, surname, birthdate, kontakt, c_id)
VALUES
 ('1234567890123', 'Иван', 'Петров', '1990-05-10', '070123456', 1),
 ('9876543210987', 'Марија', 'Стојанова', '1985-03-22', '071987654', 2);

-- Package (типови на осигурување)
INSERT INTO project_2425.Package (title, type_pol, total, valute)
VALUES
 ('Auto Kasko', 'Auto', 15000, 'MKD'),
 ('Travel Basic', 'Travel', 3000, 'MKD'),
 ('Property Standard', 'Property', 12000, 'MKD');

-- Covers (покритија)
INSERT INTO project_2425.Covers (cov_type, cov_amount, package_code)
VALUES
 ('Штета од сообраќајка', 10000, 1),
 ('Кражба на возило', 5000, 1),
 ('Медицински трошоци во странство', 2000, 2),
 ('Пожар', 8000, 3);

-- Policy (полиси - врзани со пакети и носители)
INSERT INTO project_2425.Policy (s_date, e_date, package_code, d_embg)
VALUES
 ('2025-01-01', '2025-12-31', 1, '1234567890123'),
 ('2025-02-01', '2025-02-28', 2, '9876543210987'),
 ('2025-03-15', '2026-03-14', 3, '1234567890123');

-- Payment (плаќања за полиси)
INSERT INTO project_2425.Payment (visa_number, p_date, p_amount, policy_id)
VALUES
 ('4111111111111111', '2025-01-05', 15000, 1),
 ('4222222222222222', '2025-02-02', 3000, 2),
 ('4333333333333333', '2025-03-20', 12000, 3);

-- Vehicle (возила)
INSERT INTO project_2425.Vehicle (model, marka, type, license_plate)
VALUES
 ('Golf 7', 'Volkswagen', 'Hatchback', 'SK-123-AB'),
 ('X5', 'BMW', 'SUV', 'SK-456-CD');

-- Property (недвижности)
INSERT INTO project_2425.Property (address, floor, year_build, security)
VALUES
 ('Бул. Партизански Одреди 45, Скопје', 5, '2005', true),
 ('Ул. Маршал Тито 12, Битола', 2, '1990', false);

-- Pol_osi (осигурени лица за патничко)
INSERT INTO project_2425.Pol_osi (o_embg, name, surname, birthdate, kontakt)
VALUES
 ('2222222222222', 'Стефан', 'Илиевски', '1995-11-30', '072222222'),
 ('3333333333333', 'Елена', 'Костова', '2000-07-15', '073333333');

-- Auto_pol (Policy ↔ Vehicle)
INSERT INTO project_2425.Auto_pol (pol_id, v_id)
VALUES
 (1, 1),
 (1, 2);

-- Property_pol (Policy ↔ Property)
INSERT INTO project_2425.Property_pol (pol_id, prop_id)
VALUES
 (3, 1),
 (3, 2);

-- Travel_pol (Policy ↔ Осигурено лице)
INSERT INTO project_2425.Travel_pol (pol_id, o_embg)
VALUES
 (2, '2222222222222'),
 (2, '3333333333333');
