CREATE TABLE `about` (
	`id` varchar(36) NOT NULL,
	`title` varchar(256) NOT NULL,
	`about` text NOT NULL,
	`history` text NOT NULL,
	`achievement` text NOT NULL,
	`purpose` text NOT NULL,
	`image` varchar(256),
	`logo` varchar(256),
	`logo2` varchar(256),
	`vision` text NOT NULL,
	`mission` text NOT NULL,
	`phone` varchar(256),
	`email` varchar(256),
	`address` text,
	`facebook` varchar(256),
	`twitter` varchar(256),
	`instagram` varchar(256),
	`linkedin` varchar(256),
	`created_at` timestamp NOT NULL,
	`updated_at` timestamp NOT NULL,
	CONSTRAINT `about_id` PRIMARY KEY(`id`)
);
--> statement-breakpoint
CREATE TABLE `account` (
	`id` varchar(36) NOT NULL,
	`account_id` text NOT NULL,
	`provider_id` text NOT NULL,
	`user_id` varchar(36) NOT NULL,
	`access_token` text,
	`refresh_token` text,
	`id_token` text,
	`access_token_expires_at` timestamp,
	`refresh_token_expires_at` timestamp,
	`scope` text,
	`password` text,
	`created_at` timestamp NOT NULL,
	`updated_at` timestamp NOT NULL,
	CONSTRAINT `account_id` PRIMARY KEY(`id`)
);
--> statement-breakpoint
CREATE TABLE `blog` (
	`id` varchar(36) NOT NULL,
	`title` varchar(256) NOT NULL,
	`slug` varchar(256) NOT NULL,
	`content` text NOT NULL,
	`description` varchar(256),
	`status` boolean,
	`image` varchar(256),
	`author` varchar(256),
	`category` varchar(256),
	`post_by` varchar(256),
	`edit_by` varchar(256),
	`created_at` timestamp NOT NULL,
	`updated_at` timestamp NOT NULL,
	CONSTRAINT `blog_id` PRIMARY KEY(`id`)
);
--> statement-breakpoint
CREATE TABLE `branch` (
	`id` varchar(36) NOT NULL,
	`name` varchar(256) NOT NULL,
	`phone` varchar(256),
	`email` varchar(256),
	`address` text,
	`location` json,
	`working_hours` text,
	`created_at` timestamp NOT NULL,
	`updated_at` timestamp NOT NULL,
	CONSTRAINT `branch_id` PRIMARY KEY(`id`)
);
--> statement-breakpoint
CREATE TABLE `client` (
	`id` varchar(36) NOT NULL,
	`name` varchar(256) NOT NULL,
	`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 `client_id` PRIMARY KEY(`id`)
);
--> statement-breakpoint
CREATE TABLE `image` (
	`id` varchar(36) NOT NULL,
	`projectId` varchar(36) NOT NULL,
	`image` varchar(256) NOT NULL,
	`created_at` timestamp NOT NULL,
	`updated_at` timestamp NOT NULL,
	CONSTRAINT `image_id` PRIMARY KEY(`id`)
);
--> statement-breakpoint
CREATE TABLE `job` (
	`id` varchar(36) NOT NULL,
	`title` varchar(256) NOT NULL,
	`location` varchar(256),
	`type` varchar(256),
	`department` varchar(256),
	`postedDate` timestamp,
	`description` text,
	`responsibilities` text,
	`requirements` text,
	`closing_date` timestamp,
	`status` boolean,
	`closed` boolean,
	`slug` varchar(256) NOT NULL,
	`created_at` timestamp NOT NULL,
	`updated_at` timestamp NOT NULL,
	CONSTRAINT `job_id` PRIMARY KEY(`id`)
);
--> statement-breakpoint
CREATE TABLE `project` (
	`id` varchar(36) NOT NULL,
	`title` varchar(256) NOT NULL,
	`description` text,
	`doc` varchar(256),
	`image` varchar(256),
	`link` varchar(256),
	`location` varchar(256),
	`complete` varchar(256),
	`slug` varchar(256) NOT NULL,
	`status` boolean,
	`type` varchar(256),
	`category` varchar(256),
	`clientId` varchar(36),
	`post_by` varchar(36),
	`edit_by` varchar(36),
	`created_at` timestamp NOT NULL,
	`updated_at` timestamp NOT NULL,
	CONSTRAINT `project_id` PRIMARY KEY(`id`)
);
--> statement-breakpoint
CREATE TABLE `service` (
	`id` varchar(36) NOT NULL,
	`name` varchar(256) NOT NULL,
	`description` text,
	`image` varchar(256),
	`status` boolean,
	`created_at` timestamp NOT NULL,
	`updated_at` timestamp NOT NULL,
	CONSTRAINT `service_id` PRIMARY KEY(`id`)
);
--> statement-breakpoint
CREATE TABLE `session` (
	`id` varchar(36) NOT NULL,
	`expires_at` timestamp NOT NULL,
	`token` varchar(255) NOT NULL,
	`created_at` timestamp NOT NULL,
	`updated_at` timestamp NOT NULL,
	`ip_address` text,
	`user_agent` text,
	`user_id` varchar(36) NOT NULL,
	CONSTRAINT `session_id` PRIMARY KEY(`id`),
	CONSTRAINT `session_token_unique` UNIQUE(`token`)
);
--> statement-breakpoint
CREATE TABLE `team` (
	`id` varchar(36) NOT NULL,
	`name` varchar(256) NOT NULL,
	`facebook` varchar(256),
	`twitter` varchar(256),
	`linkedin` varchar(256),
	`title` varchar(256),
	`image` varchar(256),
	`email` varchar(256),
	`status` boolean,
	`about` text,
	`role` varchar(256),
	`email_verified_at` varchar(256),
	`profile_photo_path` varchar(256),
	`created_at` timestamp NOT NULL,
	`updated_at` timestamp NOT NULL,
	CONSTRAINT `team_id` PRIMARY KEY(`id`)
);
--> statement-breakpoint
CREATE TABLE `user` (
	`id` varchar(36) NOT NULL,
	`name` text NOT NULL,
	`email` varchar(255) NOT NULL,
	`email_verified` boolean NOT NULL,
	`image` text,
	`created_at` timestamp NOT NULL,
	`updated_at` timestamp NOT NULL,
	CONSTRAINT `user_id` PRIMARY KEY(`id`),
	CONSTRAINT `user_email_unique` UNIQUE(`email`)
);
--> statement-breakpoint
CREATE TABLE `verification` (
	`id` varchar(36) NOT NULL,
	`identifier` text NOT NULL,
	`value` text NOT NULL,
	`expires_at` timestamp NOT NULL,
	`created_at` timestamp,
	`updated_at` timestamp,
	CONSTRAINT `verification_id` PRIMARY KEY(`id`)
);
--> statement-breakpoint
ALTER TABLE `account` ADD CONSTRAINT `account_user_id_user_id_fk` FOREIGN KEY (`user_id`) REFERENCES `user`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
ALTER TABLE `image` ADD CONSTRAINT `image_projectId_project_id_fk` FOREIGN KEY (`projectId`) REFERENCES `project`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
ALTER TABLE `project` ADD CONSTRAINT `project_clientId_client_id_fk` FOREIGN KEY (`clientId`) REFERENCES `client`(`id`) ON DELETE set null ON UPDATE no action;--> statement-breakpoint
ALTER TABLE `project` ADD CONSTRAINT `project_post_by_client_id_fk` FOREIGN KEY (`post_by`) REFERENCES `client`(`id`) ON DELETE set null ON UPDATE no action;--> statement-breakpoint
ALTER TABLE `project` ADD CONSTRAINT `project_edit_by_client_id_fk` FOREIGN KEY (`edit_by`) REFERENCES `client`(`id`) ON DELETE set null ON UPDATE no action;--> statement-breakpoint
ALTER TABLE `session` ADD CONSTRAINT `session_user_id_user_id_fk` FOREIGN KEY (`user_id`) REFERENCES `user`(`id`) ON DELETE cascade ON UPDATE no action;