CREATE TABLE `application` (
	`id` varchar(36) NOT NULL,
	`job_id` varchar(36) NOT NULL,
	`full_name` varchar(256) NOT NULL,
	`email` varchar(256) NOT NULL,
	`phone` varchar(256) NOT NULL,
	`address` text NOT NULL,
	`cv_path` varchar(256) NOT NULL,
	`letter_path` varchar(256) NOT NULL,
	`created_at` timestamp NOT NULL,
	`updated_at` timestamp NOT NULL,
	CONSTRAINT `application_id` PRIMARY KEY(`id`)
);
--> statement-breakpoint
CREATE TABLE `category` (
	`id` varchar(36) NOT NULL,
	`name` varchar(256) NOT NULL,
	`slug` varchar(256) NOT NULL,
	`created_at` timestamp NOT NULL,
	`updated_at` timestamp NOT NULL,
	CONSTRAINT `category_id` PRIMARY KEY(`id`)
);
--> statement-breakpoint
CREATE TABLE `contact_us` (
	`id` varchar(36) NOT NULL,
	`name` varchar(256) NOT NULL,
	`email` varchar(256) NOT NULL,
	`subject` varchar(256),
	`message` text NOT NULL,
	`created_at` timestamp NOT NULL,
	`updated_at` timestamp NOT NULL,
	CONSTRAINT `contact_us_id` PRIMARY KEY(`id`)
);
--> statement-breakpoint
CREATE TABLE `equipment` (
	`id` varchar(36) NOT NULL,
	`name` varchar(256),
	`position` varchar(256),
	`company` varchar(256),
	`link` varchar(256),
	`content` text,
	`image` varchar(256),
	`created_at` timestamp NOT NULL,
	`updated_at` timestamp NOT NULL,
	CONSTRAINT `equipment_id` PRIMARY KEY(`id`)
);
--> statement-breakpoint
CREATE TABLE `hero_content` (
	`id` varchar(36) NOT NULL,
	`title` varchar(256) NOT NULL,
	`subtitle` varchar(256),
	`description` text,
	`image_path` varchar(256) NOT NULL,
	`button_text` varchar(256),
	`button_link` varchar(256),
	`is_active` boolean NOT NULL DEFAULT true,
	`created_at` timestamp NOT NULL,
	`updated_at` timestamp NOT NULL,
	CONSTRAINT `hero_content_id` PRIMARY KEY(`id`)
);
--> statement-breakpoint
CREATE TABLE `more_project` (
	`id` varchar(36) NOT NULL,
	`projectId` varchar(36) NOT NULL,
	`doc` text NOT NULL,
	`image` varchar(256) NOT NULL,
	`position` enum('left','right') NOT NULL DEFAULT 'right',
	`created_at` timestamp NOT NULL,
	`updated_at` timestamp NOT NULL,
	CONSTRAINT `more_project_id` PRIMARY KEY(`id`)
);
--> statement-breakpoint
CREATE TABLE `page` (
	`id` varchar(36) NOT NULL,
	`page_title` varchar(256) NOT NULL,
	`page_contents` text NOT NULL,
	`page_image` varchar(256),
	`page_slug` varchar(256) NOT NULL,
	`page_more` text,
	`created_at` timestamp NOT NULL,
	`updated_at` timestamp NOT NULL,
	CONSTRAINT `page_id` PRIMARY KEY(`id`),
	CONSTRAINT `page_page_slug_unique` UNIQUE(`page_slug`)
);
--> statement-breakpoint
CREATE TABLE `slider` (
	`id` varchar(36) NOT NULL,
	`smallCaption` varchar(256) NOT NULL,
	`bigCaption` varchar(256) NOT NULL,
	`image` varchar(256) NOT NULL,
	`buttonText` varchar(256),
	`buttonLink` varchar(256),
	`isActive` boolean NOT NULL DEFAULT true,
	`created_at` timestamp NOT NULL,
	`updated_at` timestamp NOT NULL,
	CONSTRAINT `slider_id` PRIMARY KEY(`id`)
);
--> statement-breakpoint
CREATE TABLE `testimony` (
	`id` varchar(36) NOT NULL,
	`name` varchar(256) NOT NULL,
	`position` varchar(256),
	`company` varchar(256),
	`content` text NOT NULL,
	`image` varchar(256),
	`created_at` timestamp NOT NULL,
	`updated_at` timestamp NOT NULL,
	CONSTRAINT `testimony_id` PRIMARY KEY(`id`)
);
--> statement-breakpoint
ALTER TABLE `application` ADD CONSTRAINT `application_job_id_job_id_fk` FOREIGN KEY (`job_id`) REFERENCES `job`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
ALTER TABLE `more_project` ADD CONSTRAINT `more_project_projectId_project_id_fk` FOREIGN KEY (`projectId`) REFERENCES `project`(`id`) ON DELETE cascade ON UPDATE no action;