-- CreateTable
CREATE TABLE `Webinar` (
    `id` INTEGER NOT NULL AUTO_INCREMENT,
    `name` VARCHAR(255) NOT NULL,
    `status` SMALLINT NOT NULL DEFAULT 1,
    `date` DATETIME(3) NOT NULL,
    `hour` VARCHAR(20) NOT NULL,
    `thumbnail_link` VARCHAR(500) NULL,
    `invitation_link` VARCHAR(500) NULL,
    `instructorId` INTEGER NOT NULL,
    `created_at` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),

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

-- AddForeignKey
ALTER TABLE `Webinar` ADD CONSTRAINT `Webinar_instructorId_fkey` FOREIGN KEY (`instructorId`) REFERENCES `User`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
