init: 初始化 AssetX 项目仓库
包含 webapp(Next.js 用户端)、webapp-back(Go 后端)、 antdesign(管理后台)、landingpage(营销落地页)、 数据库 SQL 和配置文件。
This commit is contained in:
21
webapp-back/migrations/add_product_links.sql
Normal file
21
webapp-back/migrations/add_product_links.sql
Normal file
@@ -0,0 +1,21 @@
|
||||
-- ============================================================
|
||||
-- Migration: add product_links table + footer_links.page column
|
||||
-- ============================================================
|
||||
|
||||
-- 1. 新建 product_links 表
|
||||
CREATE TABLE IF NOT EXISTS `product_links` (
|
||||
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`asset_id` BIGINT UNSIGNED NOT NULL,
|
||||
`link_text` VARCHAR(100) NOT NULL,
|
||||
`link_url` TEXT NOT NULL,
|
||||
`display_order` INT NOT NULL DEFAULT 0,
|
||||
`is_active` TINYINT(1) NOT NULL DEFAULT 1,
|
||||
`created_at` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||
`updated_at` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3),
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `idx_product_links_asset_id` (`asset_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- 2. footer_links 增加 page 列(如果还没有)
|
||||
ALTER TABLE `footer_links`
|
||||
ADD COLUMN IF NOT EXISTS `page` VARCHAR(50) NOT NULL DEFAULT '' AFTER `id`;
|
||||
16
webapp-back/migrations/seed_product_links.sql
Normal file
16
webapp-back/migrations/seed_product_links.sql
Normal file
@@ -0,0 +1,16 @@
|
||||
-- Seed: product_links for YT-A(7), YT-B(8), YT-C(9)
|
||||
INSERT INTO `product_links` (`asset_id`, `link_text`, `link_url`, `display_order`, `is_active`) VALUES
|
||||
(7, 'Smart Contract', 'https://www.baidu.com', 1, 1),
|
||||
(7, 'Compliance', 'https://www.baidu.com', 2, 1),
|
||||
(7, 'Proof of Reserves', 'https://www.baidu.com', 3, 1),
|
||||
(7, 'Protocol Information', 'https://www.baidu.com', 4, 1),
|
||||
|
||||
(8, 'Smart Contract', 'https://www.baidu.com', 1, 1),
|
||||
(8, 'Compliance', 'https://www.baidu.com', 2, 1),
|
||||
(8, 'Proof of Reserves', 'https://www.baidu.com', 3, 1),
|
||||
(8, 'Protocol Information', 'https://www.baidu.com', 4, 1),
|
||||
|
||||
(9, 'Smart Contract', 'https://www.baidu.com', 1, 1),
|
||||
(9, 'Compliance', 'https://www.baidu.com', 2, 1),
|
||||
(9, 'Proof of Reserves', 'https://www.baidu.com', 3, 1),
|
||||
(9, 'Protocol Information', 'https://www.baidu.com', 4, 1);
|
||||
Reference in New Issue
Block a user