-- CreateTable
CREATE TABLE `site_user` (
    `su_id` INTEGER NOT NULL AUTO_INCREMENT,
    `su_ut_id` INTEGER NOT NULL,
    `su_name` VARCHAR(255) NOT NULL,
    `su_email` VARCHAR(255) NOT NULL,
    `su_mobile` VARCHAR(255) NOT NULL,
    `su_password` VARCHAR(255) NOT NULL,
    `su_provider` VARCHAR(255) NOT NULL,
    `su_status` INTEGER NULL DEFAULT 0,
    `su_date` INTEGER NULL DEFAULT 0,

    UNIQUE INDEX `site_user_su_email_key`(`su_email`),
    UNIQUE INDEX `site_user_su_mobile_key`(`su_mobile`),
    PRIMARY KEY (`su_id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- CreateTable
CREATE TABLE `site_user_type` (
    `ut_id` INTEGER NOT NULL AUTO_INCREMENT,
    `ut_name` VARCHAR(255) NOT NULL,

    UNIQUE INDEX `site_user_type_ut_name_key`(`ut_name`),
    PRIMARY KEY (`ut_id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- CreateTable
CREATE TABLE `site_otp` (
    `so_id` INTEGER NOT NULL AUTO_INCREMENT,
    `so_email` VARCHAR(255) NOT NULL,
    `so_mobile` VARCHAR(20) NOT NULL,
    `so_otp` VARCHAR(6) NOT NULL,
    `so_date` INTEGER NULL DEFAULT 0,

    PRIMARY KEY (`so_id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- CreateTable
CREATE TABLE `uploads` (
    `up_id` INTEGER NOT NULL AUTO_INCREMENT,
    `up_s_id` INTEGER NULL,
    `up_s_type` VARCHAR(255) NULL,
    `up_fname` VARCHAR(255) NULL,
    `up_oname` VARCHAR(255) NULL,
    `up_ext` VARCHAR(255) NULL,
    `up_file_type` VARCHAR(255) NOT NULL,
    `up_date` INTEGER NOT NULL DEFAULT 0,
    `up_size` BIGINT NOT NULL DEFAULT 0,

    PRIMARY KEY (`up_id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
