PRAGMA foreign_keys = ON;

PRAGMA writable_schema = 1;
DELETE FROM sqlite_master WHERE type IN ("table", "index", "trigger");
PRAGMA writable_schema = 0;
VACUUM;

CREATE TABLE "Charges" (
"charge_id" INT,
"charge_type" VARCHAR(10),
"charge_amount" DECIMAL(19, 4),
PRIMARY KEY ("charge_id")
);

CREATE TABLE "Treatment_Types" (
"treatment_type_code" VARCHAR(10),
"treatment_type_description" VARCHAR(80),
PRIMARY KEY ("treatment_type_code")
);

CREATE TABLE "Treatments" (
"treatment_id" INT,
"date_of_treatment" DATETIME,
"cost_of_treatment" DECIMAL(19, 4),
PRIMARY KEY ("treatment_id")
);





INSERT INTO "Charges" VALUES ("1", "Boarding", "25.0000");
INSERT INTO "Charges" VALUES ("2", "Grooming", "40.0000");
INSERT INTO "Charges" VALUES ("3", "Training", "30.0000");
INSERT INTO "Charges" VALUES ("4", "Vaccination", "15.0000");
INSERT INTO "Charges" VALUES ("5", "Medication", "20.0000");
INSERT INTO "Charges" VALUES ("6", "Emergency", "100.0000");
INSERT INTO "Charges" VALUES ("7", "Late Pickup", "10.0000");
INSERT INTO "Charges" VALUES ("8", "Special Diet", "12.5000");
INSERT INTO "Treatment_Types" VALUES ("VAX", "Vaccination for common diseases");
INSERT INTO "Treatment_Types" VALUES ("MED", "Medication administration");
INSERT INTO "Treatment_Types" VALUES ("SURG", "Surgical procedures");
INSERT INTO "Treatment_Types" VALUES ("CHK", "General health check");
INSERT INTO "Treatment_Types" VALUES ("EMG", "Emergency treatment");
INSERT INTO "Treatment_Types" VALUES ("DNT", "Dental cleaning");
INSERT INTO "Treatment_Types" VALUES ("PHY", "Physical therapy");
INSERT INTO "Treatments" VALUES ("1", "2024-01-15 10:00:00", "15.0000");
INSERT INTO "Treatments" VALUES ("2", "2024-02-20 14:30:00", "20.0000");
INSERT INTO "Treatments" VALUES ("3", "2024-03-05 09:00:00", "100.0000");
INSERT INTO "Treatments" VALUES ("4", "2024-04-10 11:15:00", "50.0000");
INSERT INTO "Treatments" VALUES ("5", "2024-05-22 16:45:00", "30.0000");
INSERT INTO "Treatments" VALUES ("6", "2024-06-01 08:00:00", "15.0000");
INSERT INTO "Treatments" VALUES ("7", "2024-06-15 13:30:00", "20.0000");
INSERT INTO "Treatments" VALUES ("8", "2024-07-10 10:00:00", "100.0000");
INSERT INTO "Treatments" VALUES ("9", "2024-07-20 09:30:00", "40.0000");
INSERT INTO "Treatments" VALUES ("10", "2024-08-05 15:00:00", "25.0000");