CREATE TABLE `blog_menu` (
	`id` bigint NOT NULL,
	`pid` bigint NOT NULL,
	`name` varchar(255) NOT NULL,
	`desc` varchar(255),
	`icon` varchar(255) NOT NULL DEFAULT '',
	`label` varchar(255),
	`background` varchar(255),
	`sort` int NOT NULL DEFAULT 0,
	`read` int NOT NULL DEFAULT 0,
	`like` int NOT NULL DEFAULT 0,
	`public` tinyint NOT NULL DEFAULT 1,
	`deleted` tinyint NOT NULL DEFAULT 0,
	`created_at` datetime NOT NULL DEFAULT (CURRENT_TIMESTAMP),
	`updated_at` datetime NOT NULL DEFAULT (CURRENT_TIMESTAMP),
	`deleted_at` varchar(255),
	`created_by` bigint NOT NULL,
	CONSTRAINT `blog_menu_id` PRIMARY KEY(`id`),
	CONSTRAINT `unique_checkname` UNIQUE(`pid`,`name`,`deleted_at`)
);
--> statement-breakpoint
CREATE INDEX `create_at` ON `blog_menu` (`created_at`);--> statement-breakpoint
CREATE INDEX `name` ON `blog_menu` (`name`);