1
This commit is contained in:
@@ -12,8 +12,8 @@ CREATE TABLE IF NOT EXISTS `biz_user` (
|
||||
`email` VARCHAR(120) NULL DEFAULT NULL,
|
||||
`company_name` VARCHAR(200) NULL DEFAULT NULL,
|
||||
`status` ENUM('active', 'disabled') NOT NULL DEFAULT 'active',
|
||||
`created_at` DATETIME NOT NULL,
|
||||
`updated_at` DATETIME NOT NULL,
|
||||
`created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`updated_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_biz_user_mobile` (`mobile`),
|
||||
KEY `idx_biz_user_status` (`status`)
|
||||
@@ -34,8 +34,8 @@ CREATE TABLE IF NOT EXISTS `biz_plans` (
|
||||
`sns_quota` INT NOT NULL DEFAULT 0,
|
||||
`enabled_features` JSON NULL,
|
||||
`status` ENUM('active', 'inactive') NOT NULL DEFAULT 'active',
|
||||
`created_at` DATETIME NOT NULL,
|
||||
`updated_at` DATETIME NOT NULL,
|
||||
`created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`updated_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_biz_plans_code` (`plan_code`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='套餐';
|
||||
@@ -71,8 +71,8 @@ CREATE TABLE IF NOT EXISTS `biz_api_tokens` (
|
||||
`status` ENUM('active', 'revoked', 'expired') NOT NULL DEFAULT 'active',
|
||||
`expire_at` DATETIME NOT NULL,
|
||||
`last_used_at` DATETIME NULL DEFAULT NULL,
|
||||
`created_at` DATETIME NOT NULL,
|
||||
`updated_at` DATETIME NOT NULL,
|
||||
`created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`updated_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_biz_token_hash` (`token_hash`),
|
||||
KEY `idx_biz_token_user` (`user_id`),
|
||||
@@ -92,8 +92,8 @@ CREATE TABLE IF NOT EXISTS `biz_usage_monthly` (
|
||||
`friend_count` INT NOT NULL DEFAULT 0,
|
||||
`sns_count` INT NOT NULL DEFAULT 0,
|
||||
`active_user_count` INT NOT NULL DEFAULT 0,
|
||||
`created_at` DATETIME NOT NULL,
|
||||
`updated_at` DATETIME NOT NULL,
|
||||
`created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`updated_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_biz_usage_user_month` (`user_id`, `stat_month`),
|
||||
KEY `idx_biz_usage_plan` (`plan_id`),
|
||||
|
||||
Reference in New Issue
Block a user