diff --git a/backend/.env.example b/backend/.env.example index bd1be21..9c483e2 100644 --- a/backend/.env.example +++ b/backend/.env.example @@ -1,6 +1,6 @@ # ==================== Server Configuration ==================== # Gin运行模式: debug, release, test -GIN_MODE=debug +GIN_MODE=release # API网关端口 SERVER_PORT=8080 diff --git a/backend/deploy/envs/gateway.env b/backend/deploy/envs/gateway.env index d86c38b..71821cc 100644 --- a/backend/deploy/envs/gateway.env +++ b/backend/deploy/envs/gateway.env @@ -2,7 +2,7 @@ # 多机部署时将此文件放到 gateway 服务器的 /etc/topfans/gateway.env # Gin 运行模式: debug, release -GIN_MODE=debug +GIN_MODE=release # API 网关监听端口 SERVER_PORT=8080 diff --git a/backend/pkg/health/health.go b/backend/pkg/health/health.go new file mode 100644 index 0000000..f22ccbe --- /dev/null +++ b/backend/pkg/health/health.go @@ -0,0 +1,61 @@ +package health + +import ( + "fmt" + "log" + "net/http" + "sync" +) + +// Handler 健康检查处理器 +type Handler struct { + serviceName string + port int + server *http.Server + wg sync.WaitGroup +} + +// NewHandler 创建健康检查处理器 +func NewHandler(serviceName string, port int) *Handler { + return &Handler{ + serviceName: serviceName, + port: port, + } +} + +// Start 启动健康检查 HTTP 服务器 +func (h *Handler) Start() { + mux := http.NewServeMux() + mux.HandleFunc("/health", h.handleHealth) + + h.server = &http.Server{ + Addr: fmt.Sprintf(":%d", h.port), + Handler: mux, + } + + h.wg.Add(1) + go func() { + defer h.wg.Done() + log.Printf("[%s] Health check server started on port %d", h.serviceName, h.port) + if err := h.server.ListenAndServe(); err != nil && err != http.ErrServerClosed { + log.Printf("[%s] Health check server error: %v", h.serviceName, err) + } + }() +} + +// Stop 停止健康检查 HTTP 服务器 +func (h *Handler) Stop() { + if h.server != nil { + if err := h.server.Close(); err != nil { + log.Printf("[%s] Health check server close error: %v", h.serviceName, err) + } + } + h.wg.Wait() + log.Printf("[%s] Health check server stopped", h.serviceName) +} + +func (h *Handler) handleHealth(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusOK) + w.Header().Set("Content-Type", "application/json") + fmt.Fprintf(w, `{"status":"ok","service":"%s"}`, h.serviceName) +} diff --git a/backend/scripts/migrate_add_overall_end_time.sql b/backend/scripts/migrate_add_overall_end_time.sql new file mode 100644 index 0000000..4fd9398 --- /dev/null +++ b/backend/scripts/migrate_add_overall_end_time.sql @@ -0,0 +1,65 @@ +-- Migration: Add overall_end_time to activities table +-- Date: 2026-04-13 +-- Description: Add overall_end_time column for activity overall end time management + +-- Add overall_end_time column to activities if it doesn't exist +DO $$ +BEGIN + IF NOT EXISTS ( + SELECT 1 FROM information_schema.columns + WHERE table_name = 'activities' AND column_name = 'overall_end_time' + ) THEN + ALTER TABLE activities ADD COLUMN overall_end_time BIGINT DEFAULT 0; + RAISE NOTICE 'Column overall_end_time added to activities table'; + ELSE + RAISE NOTICE 'Column overall_end_time already exists in activities table'; + END IF; +END $$; + +-- Add avatar_url column to fan_profiles if it doesn't exist +DO $$ +BEGIN + IF NOT EXISTS ( + SELECT 1 FROM information_schema.columns + WHERE table_name = 'fan_profiles' AND column_name = 'avatar_url' + ) THEN + ALTER TABLE fan_profiles ADD COLUMN avatar_url VARCHAR(500); + RAISE NOTICE 'Column avatar_url added to fan_profiles table'; + ELSE + RAISE NOTICE 'Column avatar_url already exists in fan_profiles table'; + END IF; +END $$; + +-- Add is_original column to assets if it doesn't exist +DO $$ +BEGIN + IF NOT EXISTS ( + SELECT 1 FROM information_schema.columns + WHERE table_name = 'assets' AND column_name = 'is_original' + ) THEN + ALTER TABLE assets ADD COLUMN is_original BOOLEAN DEFAULT false; + RAISE NOTICE 'Column is_original added to assets table'; + ELSE + RAISE NOTICE 'Column is_original already exists in assets table'; + END IF; +END $$; + +-- Add theme column to activities if it doesn't exist +DO $$ +BEGIN + IF NOT EXISTS ( + SELECT 1 FROM information_schema.columns + WHERE table_name = 'activities' AND column_name = 'theme' + ) THEN + ALTER TABLE activities ADD COLUMN theme VARCHAR(100); + RAISE NOTICE 'Column theme added to activities table'; + ELSE + RAISE NOTICE 'Column theme already exists in activities table'; + END IF; +END $$; + +-- Migration complete +DO $$ +BEGIN + RAISE NOTICE 'Migration completed successfully'; +END $$; diff --git a/backend/services/activityService/main.go b/backend/services/activityService/main.go index e42b248..fd04a85 100644 --- a/backend/services/activityService/main.go +++ b/backend/services/activityService/main.go @@ -14,6 +14,7 @@ import ( "dubbo.apache.org/dubbo-go/v3/server" "github.com/topfans/backend/pkg/database" + "github.com/topfans/backend/pkg/health" "github.com/topfans/backend/pkg/logger" "github.com/topfans/backend/pkg/models" pb "github.com/topfans/backend/pkg/proto/activity" @@ -32,6 +33,7 @@ var ( dbPassword = flag.String("db-password", getEnv("DB_PASSWORD", ""), "Database password") dbName = flag.String("db-name", getEnv("DB_NAME", "top-fans"), "Database name") userServiceURL = flag.String("user-service-url", getEnv("USER_SERVICE_URL", "tri://localhost:20000"), "User service URL") + healthHandler *health.Handler ) func getEnv(key, fallback string) string { @@ -174,6 +176,11 @@ func createUserRPCClient() (activityClient.UserRPCClient, error) { // initDubboService 初始化 Dubbo 服务 func initDubboService(activityProvider *provider.ActivityProvider) error { + // 启动健康检查 HTTP 服务器 + healthPort := *port + 1000 // e.g., 20004 -> 21004 + healthHandler = health.NewHandler("activity-service", healthPort) + healthHandler.Start() + // 创建 Dubbo Server srv, err := server.NewServer( server.WithServerProtocol( @@ -210,6 +217,11 @@ func gracefulShutdown() { logger.Sugar.Info("Shutting down Activity Service...") + // 关闭健康检查服务器 + if healthHandler != nil { + healthHandler.Stop() + } + // 关闭数据库连接 if err := database.Close(); err != nil { logger.Sugar.Errorf("Error closing database: %v", err) diff --git a/backend/services/assetService/main.go b/backend/services/assetService/main.go index 4605225..02d486e 100644 --- a/backend/services/assetService/main.go +++ b/backend/services/assetService/main.go @@ -15,6 +15,7 @@ import ( "github.com/joho/godotenv" "github.com/topfans/backend/pkg/database" + "github.com/topfans/backend/pkg/health" "github.com/topfans/backend/pkg/logger" "github.com/topfans/backend/pkg/models" pbAsset "github.com/topfans/backend/pkg/proto/asset" @@ -35,6 +36,7 @@ var ( dbPassword = flag.String("db-password", getEnv("DB_PASSWORD", ""), "Database password") dbName = flag.String("db-name", getEnv("DB_NAME", "top-fans"), "Database name") userServiceURL = flag.String("user-service-url", getEnv("USER_SERVICE_URL", "tri://localhost:20000"), "User service URL") + healthHandler *health.Handler ) func getEnv(key, fallback string) string { @@ -92,6 +94,11 @@ func main() { } logger.Logger.Info("Database initialized successfully") + // 启动健康检查 HTTP 服务器 + healthPort := *port + 1000 // e.g., 20003 -> 21003 + healthHandler = health.NewHandler("asset-service", healthPort) + healthHandler.Start() + // 自动迁移数据库表 if err := autoMigrate(); err != nil { logger.Logger.Fatal(fmt.Sprintf("Failed to migrate database: %v", err)) @@ -166,6 +173,11 @@ func main() { <-quit logger.Logger.Info("Shutting down Asset Service...") + + // 关闭健康检查服务器 + if healthHandler != nil { + healthHandler.Stop() + } } // autoMigrate 自动迁移数据库表 diff --git a/backend/services/galleryService/main.go b/backend/services/galleryService/main.go index 1ad2817..0599496 100644 --- a/backend/services/galleryService/main.go +++ b/backend/services/galleryService/main.go @@ -14,6 +14,7 @@ import ( "dubbo.apache.org/dubbo-go/v3/server" "github.com/topfans/backend/pkg/database" + "github.com/topfans/backend/pkg/health" "github.com/topfans/backend/pkg/logger" "github.com/topfans/backend/pkg/models" pbAsset "github.com/topfans/backend/pkg/proto/asset" @@ -34,6 +35,7 @@ var ( dbName = flag.String("db-name", getEnv("DB_NAME", "top-fans"), "Database name") assetServiceURL = flag.String("asset-service-url", getEnv("ASSET_SERVICE_URL", "tri://localhost:20003"), "Asset service URL") userServiceURL = flag.String("user-service-url", getEnv("USER_SERVICE_URL", "tri://localhost:20000"), "User service URL") + healthHandler *health.Handler ) func getEnv(key, fallback string) string { @@ -88,6 +90,11 @@ func main() { } logger.Logger.Info("Database initialized successfully") + // 启动健康检查 HTTP 服务器 + healthPort := *port + 1000 // e.g., 20001 -> 21001 + healthHandler = health.NewHandler("gallery-service", healthPort) + healthHandler.Start() + // 创建 Repository 层实例 db := database.GetDB() // 自动迁移展馆相关表(booth_slots / exhibitions) @@ -174,6 +181,11 @@ func main() { logger.Logger.Info("Shutting down Gallery Service...") + // 停止健康检查服务器 + if healthHandler != nil { + healthHandler.Stop() + } + // 停止清理 Worker cleanupWorker.Stop() logger.Logger.Info("Cleanup worker stopped") diff --git a/backend/services/socialService/main.go b/backend/services/socialService/main.go index 51e9f0a..c66d675 100644 --- a/backend/services/socialService/main.go +++ b/backend/services/socialService/main.go @@ -14,6 +14,7 @@ import ( "dubbo.apache.org/dubbo-go/v3/server" "github.com/topfans/backend/pkg/database" + "github.com/topfans/backend/pkg/health" "github.com/topfans/backend/pkg/logger" "github.com/topfans/backend/pkg/models" pb "github.com/topfans/backend/pkg/proto/social" @@ -33,6 +34,7 @@ var ( dbName = flag.String("db-name", getEnv("DB_NAME", "top-fans"), "Database name") userServiceURL = flag.String("user-service-url", getEnv("USER_SERVICE_URL", "tri://localhost:20000"), "User service URL") assetServiceURL = flag.String("asset-service-url", getEnv("ASSET_SERVICE_URL", "tri://localhost:20003"), "Asset service URL") + healthHandler *health.Handler ) func getEnv(key, fallback string) string { @@ -137,6 +139,11 @@ func gracefulShutdown() { logger.Sugar.Info("Shutting down server...") + // 关闭健康检查服务器 + if healthHandler != nil { + healthHandler.Stop() + } + // 关闭数据库连接 if err := database.Close(); err != nil { logger.Sugar.Errorf("Error closing database: %v", err) @@ -147,6 +154,11 @@ func gracefulShutdown() { // initDubboService 初始化Dubbo-go服务 func initDubboService() error { + // 启动健康检查 HTTP 服务器 + healthPort := *port + 1000 // e.g., 20002 -> 21002 + healthHandler = health.NewHandler("social-service", healthPort) + healthHandler.Start() + db := database.GetDB() if db == nil { return fmt.Errorf("database is not initialized") diff --git a/backend/services/userService/main.go b/backend/services/userService/main.go index a0ddab7..c5a96f5 100644 --- a/backend/services/userService/main.go +++ b/backend/services/userService/main.go @@ -13,6 +13,7 @@ import ( "dubbo.apache.org/dubbo-go/v3/server" "github.com/topfans/backend/pkg/database" + "github.com/topfans/backend/pkg/health" "github.com/topfans/backend/pkg/logger" "github.com/topfans/backend/pkg/models" pb "github.com/topfans/backend/pkg/proto/user" @@ -28,6 +29,7 @@ var ( dbUser = flag.String("db-user", getEnv("DB_USER", "postgres"), "Database user") dbPassword = flag.String("db-password", getEnv("DB_PASSWORD", ""), "Database password") dbName = flag.String("db-name", getEnv("DB_NAME", "top-fans"), "Database name") + healthHandler *health.Handler ) func getEnv(key, fallback string) string { @@ -133,6 +135,11 @@ func gracefulShutdown() { logger.Sugar.Info("Shutting down server...") + // 关闭健康检查服务器 + if healthHandler != nil { + healthHandler.Stop() + } + // 关闭数据库连接 if err := database.Close(); err != nil { logger.Sugar.Errorf("Error closing database: %v", err) @@ -143,6 +150,11 @@ func gracefulShutdown() { // initDubboService 初始化Dubbo-go服务 func initDubboService() error { + // 启动健康检查 HTTP 服务器 + healthPort := *port + 1000 // e.g., 20000 -> 21000 + healthHandler = health.NewHandler("user-service", healthPort) + healthHandler.Start() + db := database.GetDB() if db == nil { return fmt.Errorf("database is not initialized") diff --git a/docker/docker-compose.prod.yml b/docker/docker-compose.prod.yml index 84c19f3..bbe2cdb 100644 --- a/docker/docker-compose.prod.yml +++ b/docker/docker-compose.prod.yml @@ -84,7 +84,7 @@ services: expose: - "20000" healthcheck: - test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:20000 || exit 1"] + test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:21000 || exit 1"] <<: *healthcheck deploy: resources: @@ -128,7 +128,7 @@ services: expose: - "20003" healthcheck: - test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:20003 || exit 1"] + test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:21003 || exit 1"] <<: *healthcheck deploy: resources: @@ -167,7 +167,7 @@ services: expose: - "20002" healthcheck: - test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:20002 || exit 1"] + test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:21002 || exit 1"] <<: *healthcheck deploy: resources: @@ -188,7 +188,7 @@ services: restart: always environment: <<: *common-env - PORT: 20004 + PORT: 20001 DB_HOST: postgres DB_PORT: 5432 DB_USER: postgres @@ -204,9 +204,9 @@ services: networks: - topfans-net expose: - - "20004" + - "20001" healthcheck: - test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:20004 || exit 1"] + test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:21001 || exit 1"] <<: *healthcheck deploy: resources: @@ -227,7 +227,7 @@ services: restart: always environment: <<: *common-env - PORT: 20005 + PORT: 20004 DB_HOST: postgres DB_PORT: 5432 DB_USER: postgres @@ -240,9 +240,9 @@ services: networks: - topfans-net expose: - - "20005" + - "20004" healthcheck: - test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:20005 || exit 1"] + test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:21004 || exit 1"] <<: *healthcheck deploy: resources: @@ -271,8 +271,8 @@ services: DUBBO_USER_SERVICE_URL: tri://userservice:20000 DUBBO_SOCIAL_SERVICE_URL: tri://socialservice:20002 DUBBO_ASSET_SERVICE_URL: tri://assetservice:20003 - DUBBO_GALLERY_SERVICE_URL: tri://galleryservice:20004 - DUBBO_ACTIVITY_SERVICE_URL: tri://activityservice:20005 + DUBBO_GALLERY_SERVICE_URL: tri://galleryservice:20001 + DUBBO_ACTIVITY_SERVICE_URL: tri://activityservice:20004 depends_on: userservice: condition: service_started diff --git a/docker/init-db.sql b/docker/init-db.sql index 4ca1f5b..5412619 100644 --- a/docker/init-db.sql +++ b/docker/init-db.sql @@ -1,8 +1,3 @@ --- --- PostgreSQL database dump --- - -\restrict NXfw4AHf53ndLJtQCalhae0Ymr5IJAi9umqWVq9QzKT09ZnpJXuxhwgGiRaJV9Y -- Dumped from database version 18.1 (Debian 18.1-1.pgdg13+2) -- Dumped by pg_dump version 18.1 (Debian 18.1-1.pgdg13+2) @@ -27,7 +22,7 @@ CREATE EXTENSION IF NOT EXISTS "uuid-ossp" WITH SCHEMA public; -- --- Name: EXTENSION "uuid-ossp"; Type: COMMENT; Schema: -; Owner: +-- Name: EXTENSION "uuid-ossp"; Type: COMMENT; Schema: -; Owner: - -- COMMENT ON EXTENSION "uuid-ossp" IS 'generate universally unique identifiers (UUIDs)'; @@ -38,7 +33,7 @@ SET default_tablespace = ''; SET default_table_access_method = heap; -- --- Name: activities; Type: TABLE; Schema: public; Owner: postgres +-- Name: activities; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.activities ( @@ -55,21 +50,20 @@ CREATE TABLE public.activities ( stage_configs jsonb, created_at bigint NOT NULL, updated_at bigint NOT NULL, - theme character varying(100) + theme character varying(100), + overall_end_time bigint DEFAULT 0 ); -ALTER TABLE public.activities OWNER TO postgres; - -- --- Name: TABLE activities; Type: COMMENT; Schema: public; Owner: postgres +-- Name: TABLE activities; Type: COMMENT; Schema: public; Owner: - -- COMMENT ON TABLE public.activities IS '运营活动表'; -- --- Name: activities_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- Name: activities_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE public.activities_id_seq @@ -80,17 +74,15 @@ CREATE SEQUENCE public.activities_id_seq CACHE 1; -ALTER SEQUENCE public.activities_id_seq OWNER TO postgres; - -- --- Name: activities_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres +-- Name: activities_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE public.activities_id_seq OWNED BY public.activities.id; -- --- Name: activity_contributions; Type: TABLE; Schema: public; Owner: postgres +-- Name: activity_contributions; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.activity_contributions ( @@ -107,17 +99,15 @@ CREATE TABLE public.activity_contributions ( ); -ALTER TABLE public.activity_contributions OWNER TO postgres; - -- --- Name: TABLE activity_contributions; Type: COMMENT; Schema: public; Owner: postgres +-- Name: TABLE activity_contributions; Type: COMMENT; Schema: public; Owner: - -- COMMENT ON TABLE public.activity_contributions IS '用户活动贡献记录表'; -- --- Name: activity_contributions_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- Name: activity_contributions_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE public.activity_contributions_id_seq @@ -128,17 +118,15 @@ CREATE SEQUENCE public.activity_contributions_id_seq CACHE 1; -ALTER SEQUENCE public.activity_contributions_id_seq OWNER TO postgres; - -- --- Name: activity_contributions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres +-- Name: activity_contributions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE public.activity_contributions_id_seq OWNED BY public.activity_contributions.id; -- --- Name: activity_items; Type: TABLE; Schema: public; Owner: postgres +-- Name: activity_items; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.activity_items ( @@ -156,17 +144,15 @@ CREATE TABLE public.activity_items ( ); -ALTER TABLE public.activity_items OWNER TO postgres; - -- --- Name: TABLE activity_items; Type: COMMENT; Schema: public; Owner: postgres +-- Name: TABLE activity_items; Type: COMMENT; Schema: public; Owner: - -- COMMENT ON TABLE public.activity_items IS '活动道具表'; -- --- Name: activity_items_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- Name: activity_items_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE public.activity_items_id_seq @@ -177,17 +163,15 @@ CREATE SEQUENCE public.activity_items_id_seq CACHE 1; -ALTER SEQUENCE public.activity_items_id_seq OWNER TO postgres; - -- --- Name: activity_items_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres +-- Name: activity_items_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE public.activity_items_id_seq OWNED BY public.activity_items.id; -- --- Name: activity_user_stats; Type: TABLE; Schema: public; Owner: postgres +-- Name: activity_user_stats; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.activity_user_stats ( @@ -204,17 +188,15 @@ CREATE TABLE public.activity_user_stats ( ); -ALTER TABLE public.activity_user_stats OWNER TO postgres; - -- --- Name: TABLE activity_user_stats; Type: COMMENT; Schema: public; Owner: postgres +-- Name: TABLE activity_user_stats; Type: COMMENT; Schema: public; Owner: - -- COMMENT ON TABLE public.activity_user_stats IS '用户活动贡献汇总表'; -- --- Name: activity_user_stats_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- Name: activity_user_stats_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE public.activity_user_stats_id_seq @@ -225,17 +207,15 @@ CREATE SEQUENCE public.activity_user_stats_id_seq CACHE 1; -ALTER SEQUENCE public.activity_user_stats_id_seq OWNER TO postgres; - -- --- Name: activity_user_stats_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres +-- Name: activity_user_stats_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE public.activity_user_stats_id_seq OWNED BY public.activity_user_stats.id; -- --- Name: asset_likes; Type: TABLE; Schema: public; Owner: postgres +-- Name: asset_likes; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.asset_likes ( @@ -247,17 +227,15 @@ CREATE TABLE public.asset_likes ( ); -ALTER TABLE public.asset_likes OWNER TO postgres; - -- --- Name: TABLE asset_likes; Type: COMMENT; Schema: public; Owner: postgres +-- Name: TABLE asset_likes; Type: COMMENT; Schema: public; Owner: - -- COMMENT ON TABLE public.asset_likes IS '点赞记录表'; -- --- Name: asset_likes_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- Name: asset_likes_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE public.asset_likes_id_seq @@ -268,17 +246,15 @@ CREATE SEQUENCE public.asset_likes_id_seq CACHE 1; -ALTER SEQUENCE public.asset_likes_id_seq OWNER TO postgres; - -- --- Name: asset_likes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres +-- Name: asset_likes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE public.asset_likes_id_seq OWNED BY public.asset_likes.id; -- --- Name: assets; Type: TABLE; Schema: public; Owner: postgres +-- Name: assets; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.assets ( @@ -301,21 +277,20 @@ CREATE TABLE public.assets ( updated_at bigint NOT NULL, minted_at bigint, deleted_at bigint, - is_active boolean DEFAULT true NOT NULL + is_active boolean DEFAULT true NOT NULL, + info text ); -ALTER TABLE public.assets OWNER TO postgres; - -- --- Name: TABLE assets; Type: COMMENT; Schema: public; Owner: postgres +-- Name: TABLE assets; Type: COMMENT; Schema: public; Owner: - -- COMMENT ON TABLE public.assets IS '资产表(藏品)'; -- --- Name: assets_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- Name: assets_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE public.assets_id_seq @@ -326,17 +301,15 @@ CREATE SEQUENCE public.assets_id_seq CACHE 1; -ALTER SEQUENCE public.assets_id_seq OWNER TO postgres; - -- --- Name: assets_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres +-- Name: assets_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE public.assets_id_seq OWNED BY public.assets.id; -- --- Name: booth_slots; Type: TABLE; Schema: public; Owner: postgres +-- Name: booth_slots; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.booth_slots ( @@ -354,17 +327,15 @@ CREATE TABLE public.booth_slots ( ); -ALTER TABLE public.booth_slots OWNER TO postgres; - -- --- Name: TABLE booth_slots; Type: COMMENT; Schema: public; Owner: postgres +-- Name: TABLE booth_slots; Type: COMMENT; Schema: public; Owner: - -- COMMENT ON TABLE public.booth_slots IS '展位表'; -- --- Name: booth_slots_slot_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- Name: booth_slots_slot_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE public.booth_slots_slot_id_seq @@ -375,17 +346,15 @@ CREATE SEQUENCE public.booth_slots_slot_id_seq CACHE 1; -ALTER SEQUENCE public.booth_slots_slot_id_seq OWNER TO postgres; - -- --- Name: booth_slots_slot_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres +-- Name: booth_slots_slot_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE public.booth_slots_slot_id_seq OWNED BY public.booth_slots.slot_id; -- --- Name: exhibition_revenue_records; Type: TABLE; Schema: public; Owner: postgres +-- Name: exhibition_revenue_records; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.exhibition_revenue_records ( @@ -406,10 +375,8 @@ CREATE TABLE public.exhibition_revenue_records ( ); -ALTER TABLE public.exhibition_revenue_records OWNER TO postgres; - -- --- Name: exhibition_revenue_records_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- Name: exhibition_revenue_records_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE public.exhibition_revenue_records_id_seq @@ -420,17 +387,15 @@ CREATE SEQUENCE public.exhibition_revenue_records_id_seq CACHE 1; -ALTER SEQUENCE public.exhibition_revenue_records_id_seq OWNER TO postgres; - -- --- Name: exhibition_revenue_records_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres +-- Name: exhibition_revenue_records_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE public.exhibition_revenue_records_id_seq OWNED BY public.exhibition_revenue_records.id; -- --- Name: exhibitions; Type: TABLE; Schema: public; Owner: postgres +-- Name: exhibitions; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.exhibitions ( @@ -447,17 +412,15 @@ CREATE TABLE public.exhibitions ( ); -ALTER TABLE public.exhibitions OWNER TO postgres; - -- --- Name: TABLE exhibitions; Type: COMMENT; Schema: public; Owner: postgres +-- Name: TABLE exhibitions; Type: COMMENT; Schema: public; Owner: - -- COMMENT ON TABLE public.exhibitions IS '展品展示表'; -- --- Name: exhibitions_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- Name: exhibitions_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE public.exhibitions_id_seq @@ -468,17 +431,15 @@ CREATE SEQUENCE public.exhibitions_id_seq CACHE 1; -ALTER SEQUENCE public.exhibitions_id_seq OWNER TO postgres; - -- --- Name: exhibitions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres +-- Name: exhibitions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE public.exhibitions_id_seq OWNED BY public.exhibitions.id; -- --- Name: fan_profiles; Type: TABLE; Schema: public; Owner: postgres +-- Name: fan_profiles; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.fan_profiles ( @@ -504,17 +465,15 @@ CREATE TABLE public.fan_profiles ( ); -ALTER TABLE public.fan_profiles OWNER TO postgres; - -- --- Name: TABLE fan_profiles; Type: COMMENT; Schema: public; Owner: postgres +-- Name: TABLE fan_profiles; Type: COMMENT; Schema: public; Owner: - -- COMMENT ON TABLE public.fan_profiles IS '粉丝档案表'; -- --- Name: fan_profiles_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- Name: fan_profiles_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE public.fan_profiles_id_seq @@ -525,17 +484,15 @@ CREATE SEQUENCE public.fan_profiles_id_seq CACHE 1; -ALTER SEQUENCE public.fan_profiles_id_seq OWNER TO postgres; - -- --- Name: fan_profiles_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres +-- Name: fan_profiles_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE public.fan_profiles_id_seq OWNED BY public.fan_profiles.id; -- --- Name: friend_requests; Type: TABLE; Schema: public; Owner: postgres +-- Name: friend_requests; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.friend_requests ( @@ -552,17 +509,15 @@ CREATE TABLE public.friend_requests ( ); -ALTER TABLE public.friend_requests OWNER TO postgres; - -- --- Name: TABLE friend_requests; Type: COMMENT; Schema: public; Owner: postgres +-- Name: TABLE friend_requests; Type: COMMENT; Schema: public; Owner: - -- COMMENT ON TABLE public.friend_requests IS '好友请求表'; -- --- Name: friend_requests_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- Name: friend_requests_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE public.friend_requests_id_seq @@ -573,17 +528,15 @@ CREATE SEQUENCE public.friend_requests_id_seq CACHE 1; -ALTER SEQUENCE public.friend_requests_id_seq OWNER TO postgres; - -- --- Name: friend_requests_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres +-- Name: friend_requests_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE public.friend_requests_id_seq OWNED BY public.friend_requests.id; -- --- Name: friendships; Type: TABLE; Schema: public; Owner: postgres +-- Name: friendships; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.friendships ( @@ -599,17 +552,15 @@ CREATE TABLE public.friendships ( ); -ALTER TABLE public.friendships OWNER TO postgres; - -- --- Name: TABLE friendships; Type: COMMENT; Schema: public; Owner: postgres +-- Name: TABLE friendships; Type: COMMENT; Schema: public; Owner: - -- COMMENT ON TABLE public.friendships IS '好友关系表'; -- --- Name: friendships_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- Name: friendships_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE public.friendships_id_seq @@ -620,17 +571,15 @@ CREATE SEQUENCE public.friendships_id_seq CACHE 1; -ALTER SEQUENCE public.friendships_id_seq OWNER TO postgres; - -- --- Name: friendships_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres +-- Name: friendships_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE public.friendships_id_seq OWNED BY public.friendships.id; -- --- Name: mint_orders; Type: TABLE; Schema: public; Owner: postgres +-- Name: mint_orders; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.mint_orders ( @@ -649,21 +598,20 @@ CREATE TABLE public.mint_orders ( event character varying(100), created_at bigint NOT NULL, updated_at bigint NOT NULL, - minted_at bigint + minted_at bigint, + info text ); -ALTER TABLE public.mint_orders OWNER TO postgres; - -- --- Name: TABLE mint_orders; Type: COMMENT; Schema: public; Owner: postgres +-- Name: TABLE mint_orders; Type: COMMENT; Schema: public; Owner: - -- COMMENT ON TABLE public.mint_orders IS '铸造订单表'; -- --- Name: stars; Type: TABLE; Schema: public; Owner: postgres +-- Name: stars; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.stars ( @@ -680,17 +628,15 @@ CREATE TABLE public.stars ( ); -ALTER TABLE public.stars OWNER TO postgres; - -- --- Name: TABLE stars; Type: COMMENT; Schema: public; Owner: postgres +-- Name: TABLE stars; Type: COMMENT; Schema: public; Owner: - -- COMMENT ON TABLE public.stars IS '明星信息表'; -- --- Name: stars_star_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- Name: stars_star_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE public.stars_star_id_seq @@ -701,17 +647,15 @@ CREATE SEQUENCE public.stars_star_id_seq CACHE 1; -ALTER SEQUENCE public.stars_star_id_seq OWNER TO postgres; - -- --- Name: stars_star_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres +-- Name: stars_star_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE public.stars_star_id_seq OWNED BY public.stars.star_id; -- --- Name: task_definitions; Type: TABLE; Schema: public; Owner: postgres +-- Name: task_definitions; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.task_definitions ( @@ -729,10 +673,8 @@ CREATE TABLE public.task_definitions ( ); -ALTER TABLE public.task_definitions OWNER TO postgres; - -- --- Name: task_definitions_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- Name: task_definitions_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE public.task_definitions_id_seq @@ -743,17 +685,15 @@ CREATE SEQUENCE public.task_definitions_id_seq CACHE 1; -ALTER SEQUENCE public.task_definitions_id_seq OWNER TO postgres; - -- --- Name: task_definitions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres +-- Name: task_definitions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE public.task_definitions_id_seq OWNED BY public.task_definitions.id; -- --- Name: user_onboarding_status; Type: TABLE; Schema: public; Owner: postgres +-- Name: user_onboarding_status; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.user_onboarding_status ( @@ -770,10 +710,8 @@ CREATE TABLE public.user_onboarding_status ( ); -ALTER TABLE public.user_onboarding_status OWNER TO postgres; - -- --- Name: user_onboarding_status_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- Name: user_onboarding_status_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE public.user_onboarding_status_id_seq @@ -784,17 +722,15 @@ CREATE SEQUENCE public.user_onboarding_status_id_seq CACHE 1; -ALTER SEQUENCE public.user_onboarding_status_id_seq OWNER TO postgres; - -- --- Name: user_onboarding_status_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres +-- Name: user_onboarding_status_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE public.user_onboarding_status_id_seq OWNED BY public.user_onboarding_status.id; -- --- Name: user_task_progress; Type: TABLE; Schema: public; Owner: postgres +-- Name: user_task_progress; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.user_task_progress ( @@ -810,10 +746,8 @@ CREATE TABLE public.user_task_progress ( ); -ALTER TABLE public.user_task_progress OWNER TO postgres; - -- --- Name: user_task_progress_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- Name: user_task_progress_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE public.user_task_progress_id_seq @@ -824,17 +758,15 @@ CREATE SEQUENCE public.user_task_progress_id_seq CACHE 1; -ALTER SEQUENCE public.user_task_progress_id_seq OWNER TO postgres; - -- --- Name: user_task_progress_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres +-- Name: user_task_progress_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE public.user_task_progress_id_seq OWNED BY public.user_task_progress.id; -- --- Name: users; Type: TABLE; Schema: public; Owner: postgres +-- Name: users; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.users ( @@ -852,17 +784,15 @@ CREATE TABLE public.users ( ); -ALTER TABLE public.users OWNER TO postgres; - -- --- Name: TABLE users; Type: COMMENT; Schema: public; Owner: postgres +-- Name: TABLE users; Type: COMMENT; Schema: public; Owner: - -- COMMENT ON TABLE public.users IS '用户表'; -- --- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE public.users_id_seq @@ -873,136 +803,134 @@ CREATE SEQUENCE public.users_id_seq CACHE 1; -ALTER SEQUENCE public.users_id_seq OWNER TO postgres; - -- --- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres +-- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id; -- --- Name: activities id; Type: DEFAULT; Schema: public; Owner: postgres +-- Name: activities id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.activities ALTER COLUMN id SET DEFAULT nextval('public.activities_id_seq'::regclass); -- --- Name: activity_contributions id; Type: DEFAULT; Schema: public; Owner: postgres +-- Name: activity_contributions id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.activity_contributions ALTER COLUMN id SET DEFAULT nextval('public.activity_contributions_id_seq'::regclass); -- --- Name: activity_items id; Type: DEFAULT; Schema: public; Owner: postgres +-- Name: activity_items id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.activity_items ALTER COLUMN id SET DEFAULT nextval('public.activity_items_id_seq'::regclass); -- --- Name: activity_user_stats id; Type: DEFAULT; Schema: public; Owner: postgres +-- Name: activity_user_stats id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.activity_user_stats ALTER COLUMN id SET DEFAULT nextval('public.activity_user_stats_id_seq'::regclass); -- --- Name: asset_likes id; Type: DEFAULT; Schema: public; Owner: postgres +-- Name: asset_likes id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.asset_likes ALTER COLUMN id SET DEFAULT nextval('public.asset_likes_id_seq'::regclass); -- --- Name: assets id; Type: DEFAULT; Schema: public; Owner: postgres +-- Name: assets id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.assets ALTER COLUMN id SET DEFAULT nextval('public.assets_id_seq'::regclass); -- --- Name: booth_slots slot_id; Type: DEFAULT; Schema: public; Owner: postgres +-- Name: booth_slots slot_id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.booth_slots ALTER COLUMN slot_id SET DEFAULT nextval('public.booth_slots_slot_id_seq'::regclass); -- --- Name: exhibition_revenue_records id; Type: DEFAULT; Schema: public; Owner: postgres +-- Name: exhibition_revenue_records id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.exhibition_revenue_records ALTER COLUMN id SET DEFAULT nextval('public.exhibition_revenue_records_id_seq'::regclass); -- --- Name: exhibitions id; Type: DEFAULT; Schema: public; Owner: postgres +-- Name: exhibitions id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.exhibitions ALTER COLUMN id SET DEFAULT nextval('public.exhibitions_id_seq'::regclass); -- --- Name: fan_profiles id; Type: DEFAULT; Schema: public; Owner: postgres +-- Name: fan_profiles id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.fan_profiles ALTER COLUMN id SET DEFAULT nextval('public.fan_profiles_id_seq'::regclass); -- --- Name: friend_requests id; Type: DEFAULT; Schema: public; Owner: postgres +-- Name: friend_requests id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.friend_requests ALTER COLUMN id SET DEFAULT nextval('public.friend_requests_id_seq'::regclass); -- --- Name: friendships id; Type: DEFAULT; Schema: public; Owner: postgres +-- Name: friendships id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.friendships ALTER COLUMN id SET DEFAULT nextval('public.friendships_id_seq'::regclass); -- --- Name: stars star_id; Type: DEFAULT; Schema: public; Owner: postgres +-- Name: stars star_id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.stars ALTER COLUMN star_id SET DEFAULT nextval('public.stars_star_id_seq'::regclass); -- --- Name: task_definitions id; Type: DEFAULT; Schema: public; Owner: postgres +-- Name: task_definitions id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.task_definitions ALTER COLUMN id SET DEFAULT nextval('public.task_definitions_id_seq'::regclass); -- --- Name: user_onboarding_status id; Type: DEFAULT; Schema: public; Owner: postgres +-- Name: user_onboarding_status id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.user_onboarding_status ALTER COLUMN id SET DEFAULT nextval('public.user_onboarding_status_id_seq'::regclass); -- --- Name: user_task_progress id; Type: DEFAULT; Schema: public; Owner: postgres +-- Name: user_task_progress id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.user_task_progress ALTER COLUMN id SET DEFAULT nextval('public.user_task_progress_id_seq'::regclass); -- --- Name: users id; Type: DEFAULT; Schema: public; Owner: postgres +-- Name: users id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.users ALTER COLUMN id SET DEFAULT nextval('public.users_id_seq'::regclass); -- --- Name: activities activities_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- Name: activities activities_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.activities @@ -1010,7 +938,7 @@ ALTER TABLE ONLY public.activities -- --- Name: activity_contributions activity_contributions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- Name: activity_contributions activity_contributions_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.activity_contributions @@ -1018,7 +946,7 @@ ALTER TABLE ONLY public.activity_contributions -- --- Name: activity_items activity_items_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- Name: activity_items activity_items_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.activity_items @@ -1026,7 +954,7 @@ ALTER TABLE ONLY public.activity_items -- --- Name: activity_user_stats activity_user_stats_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- Name: activity_user_stats activity_user_stats_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.activity_user_stats @@ -1034,7 +962,7 @@ ALTER TABLE ONLY public.activity_user_stats -- --- Name: asset_likes asset_likes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- Name: asset_likes asset_likes_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.asset_likes @@ -1042,7 +970,7 @@ ALTER TABLE ONLY public.asset_likes -- --- Name: assets assets_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- Name: assets assets_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.assets @@ -1050,7 +978,7 @@ ALTER TABLE ONLY public.assets -- --- Name: booth_slots booth_slots_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- Name: booth_slots booth_slots_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.booth_slots @@ -1058,7 +986,7 @@ ALTER TABLE ONLY public.booth_slots -- --- Name: exhibition_revenue_records exhibition_revenue_records_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- Name: exhibition_revenue_records exhibition_revenue_records_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.exhibition_revenue_records @@ -1066,7 +994,7 @@ ALTER TABLE ONLY public.exhibition_revenue_records -- --- Name: exhibitions exhibitions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- Name: exhibitions exhibitions_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.exhibitions @@ -1074,7 +1002,7 @@ ALTER TABLE ONLY public.exhibitions -- --- Name: fan_profiles fan_profiles_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- Name: fan_profiles fan_profiles_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.fan_profiles @@ -1082,7 +1010,7 @@ ALTER TABLE ONLY public.fan_profiles -- --- Name: friend_requests friend_requests_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- Name: friend_requests friend_requests_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.friend_requests @@ -1090,7 +1018,7 @@ ALTER TABLE ONLY public.friend_requests -- --- Name: friendships friendships_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- Name: friendships friendships_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.friendships @@ -1098,7 +1026,7 @@ ALTER TABLE ONLY public.friendships -- --- Name: mint_orders mint_orders_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- Name: mint_orders mint_orders_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.mint_orders @@ -1106,7 +1034,7 @@ ALTER TABLE ONLY public.mint_orders -- --- Name: stars stars_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- Name: stars stars_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.stars @@ -1114,7 +1042,7 @@ ALTER TABLE ONLY public.stars -- --- Name: task_definitions task_definitions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- Name: task_definitions task_definitions_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.task_definitions @@ -1122,7 +1050,7 @@ ALTER TABLE ONLY public.task_definitions -- --- Name: activity_user_stats uk_activity_user_star; Type: CONSTRAINT; Schema: public; Owner: postgres +-- Name: activity_user_stats uk_activity_user_star; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.activity_user_stats @@ -1130,7 +1058,7 @@ ALTER TABLE ONLY public.activity_user_stats -- --- Name: asset_likes uk_asset_likes_user_asset; Type: CONSTRAINT; Schema: public; Owner: postgres +-- Name: asset_likes uk_asset_likes_user_asset; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.asset_likes @@ -1138,7 +1066,7 @@ ALTER TABLE ONLY public.asset_likes -- --- Name: user_onboarding_status user_onboarding_status_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- Name: user_onboarding_status user_onboarding_status_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.user_onboarding_status @@ -1146,7 +1074,7 @@ ALTER TABLE ONLY public.user_onboarding_status -- --- Name: user_task_progress user_task_progress_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- Name: user_task_progress user_task_progress_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.user_task_progress @@ -1154,7 +1082,7 @@ ALTER TABLE ONLY public.user_task_progress -- --- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.users @@ -1162,371 +1090,371 @@ ALTER TABLE ONLY public.users -- --- Name: idx_activities_star_id; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_activities_star_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_activities_star_id ON public.activities USING btree (star_id); -- --- Name: idx_activities_start_end; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_activities_start_end; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_activities_start_end ON public.activities USING btree (start_time, end_time); -- --- Name: idx_activities_status; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_activities_status; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_activities_status ON public.activities USING btree (status); -- --- Name: idx_activity_contributions_activity; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_activity_contributions_activity; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_activity_contributions_activity ON public.activity_contributions USING btree (activity_id); -- --- Name: idx_activity_contributions_created; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_activity_contributions_created; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_activity_contributions_created ON public.activity_contributions USING btree (created_at DESC); -- --- Name: idx_activity_contributions_user_star; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_activity_contributions_user_star; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_activity_contributions_user_star ON public.activity_contributions USING btree (user_id, star_id); -- --- Name: idx_activity_items_activity; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_activity_items_activity; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_activity_items_activity ON public.activity_items USING btree (activity_id); -- --- Name: idx_activity_items_type; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_activity_items_type; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_activity_items_type ON public.activity_items USING btree (item_type); -- --- Name: idx_activity_user_stats_activity; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_activity_user_stats_activity; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_activity_user_stats_activity ON public.activity_user_stats USING btree (activity_id); -- --- Name: idx_activity_user_stats_contribution; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_activity_user_stats_contribution; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_activity_user_stats_contribution ON public.activity_user_stats USING btree (activity_id, total_contribution DESC); -- --- Name: idx_activity_user_stats_user_star; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_activity_user_stats_user_star; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_activity_user_stats_user_star ON public.activity_user_stats USING btree (user_id, star_id); -- --- Name: idx_asset_likes_asset; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_asset_likes_asset; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_asset_likes_asset ON public.asset_likes USING btree (asset_id); -- --- Name: idx_asset_likes_user_star; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_asset_likes_user_star; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_asset_likes_user_star ON public.asset_likes USING btree (user_id, star_id); -- --- Name: idx_assets_created_at; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_assets_created_at; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_assets_created_at ON public.assets USING btree (created_at DESC); -- --- Name: idx_assets_deleted_at; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_assets_deleted_at; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_assets_deleted_at ON public.assets USING btree (deleted_at); -- --- Name: idx_assets_owner_star; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_assets_owner_star; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_assets_owner_star ON public.assets USING btree (owner_uid, star_id); -- --- Name: idx_assets_star_active; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_assets_star_active; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_assets_star_active ON public.assets USING btree (star_id, is_active); -- --- Name: idx_assets_status; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_assets_status; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_assets_status ON public.assets USING btree (status); -- --- Name: idx_assets_tx_hash; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_assets_tx_hash; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_assets_tx_hash ON public.assets USING btree (tx_hash); -- --- Name: idx_expire; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_expire; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_expire ON public.exhibitions USING btree (expire_at); -- --- Name: idx_fan_profiles_star_id; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_fan_profiles_star_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_fan_profiles_star_id ON public.fan_profiles USING btree (star_id); -- --- Name: idx_fan_profiles_user_id; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_fan_profiles_user_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_fan_profiles_user_id ON public.fan_profiles USING btree (user_id); -- --- Name: idx_friend_requests_expires; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_friend_requests_expires; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_friend_requests_expires ON public.friend_requests USING btree (expires_at); -- --- Name: idx_friend_requests_from_status; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_friend_requests_from_status; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_friend_requests_from_status ON public.friend_requests USING btree (from_user_id, status, created_at DESC); -- --- Name: idx_friend_requests_star; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_friend_requests_star; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_friend_requests_star ON public.friend_requests USING btree (star_id); -- --- Name: idx_friend_requests_to_status; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_friend_requests_to_status; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_friend_requests_to_status ON public.friend_requests USING btree (to_user_id, status, created_at DESC); -- --- Name: idx_friend_requests_users_star; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_friend_requests_users_star; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_friend_requests_users_star ON public.friend_requests USING btree (from_user_id, to_user_id, star_id, created_at DESC); -- --- Name: idx_friendships_friend_star; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_friendships_friend_star; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_friendships_friend_star ON public.friendships USING btree (friend_id); -- --- Name: idx_friendships_list_query; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_friendships_list_query; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_friendships_list_query ON public.friendships USING btree (user_id, friend_id, star_id, status, remark, created_at); -- --- Name: idx_friendships_user_star_created; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_friendships_user_star_created; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_friendships_user_star_created ON public.friendships USING btree (user_id, star_id, created_at DESC); -- --- Name: idx_friendships_user_star_status; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_friendships_user_star_status; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_friendships_user_star_status ON public.friendships USING btree (user_id, star_id, status); -- --- Name: idx_host; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_host; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_host ON public.exhibitions USING btree (host_profile_id); -- --- Name: idx_host_slot; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_host_slot; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX idx_host_slot ON public.booth_slots USING btree (host_profile_id, slot_index); -- --- Name: idx_mint_orders_asset; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_mint_orders_asset; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_mint_orders_asset ON public.mint_orders USING btree (asset_id); -- --- Name: idx_mint_orders_created_at; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_mint_orders_created_at; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_mint_orders_created_at ON public.mint_orders USING btree (created_at DESC); -- --- Name: idx_mint_orders_status; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_mint_orders_status; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_mint_orders_status ON public.mint_orders USING btree (status); -- --- Name: idx_mint_orders_user_star; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_mint_orders_user_star; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_mint_orders_user_star ON public.mint_orders USING btree (user_id, star_id); -- --- Name: idx_occupier; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_occupier; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_occupier ON public.exhibitions USING btree (occupier_uid, occupier_star_id); -- --- Name: idx_slot; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_slot; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_slot ON public.exhibitions USING btree (slot_id); -- --- Name: idx_star_enabled; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_star_enabled; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_star_enabled ON public.booth_slots USING btree (star_id); -- --- Name: idx_task_definitions_task_key; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_task_definitions_task_key; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX idx_task_definitions_task_key ON public.task_definitions USING btree (task_key); -- --- Name: idx_user_revenue; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_user_revenue; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_user_revenue ON public.exhibition_revenue_records USING btree (user_id, star_id); -- --- Name: idx_user_star; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_user_star; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_user_star ON public.booth_slots USING btree (user_id, star_id); -- --- Name: idx_users_deleted_at; Type: INDEX; Schema: public; Owner: postgres +-- Name: idx_users_deleted_at; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX idx_users_deleted_at ON public.users USING btree (deleted_at); -- --- Name: uk_asset; Type: INDEX; Schema: public; Owner: postgres +-- Name: uk_asset; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX uk_asset ON public.exhibitions USING btree (asset_id); -- --- Name: uk_fan_profiles_star_nickname; Type: INDEX; Schema: public; Owner: postgres +-- Name: uk_fan_profiles_star_nickname; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX uk_fan_profiles_star_nickname ON public.fan_profiles USING btree (star_id, nickname); -- --- Name: uk_fan_profiles_user_star; Type: INDEX; Schema: public; Owner: postgres +-- Name: uk_fan_profiles_user_star; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX uk_fan_profiles_user_star ON public.fan_profiles USING btree (user_id, star_id); -- --- Name: uk_friendships_user_friend_star; Type: INDEX; Schema: public; Owner: postgres +-- Name: uk_friendships_user_friend_star; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX uk_friendships_user_friend_star ON public.friendships USING btree (user_id, friend_id, star_id); -- --- Name: uk_stars_identity_id; Type: INDEX; Schema: public; Owner: postgres +-- Name: uk_stars_identity_id; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX uk_stars_identity_id ON public.stars USING btree (identity_id); -- --- Name: uk_user_star_onboarding; Type: INDEX; Schema: public; Owner: postgres +-- Name: uk_user_star_onboarding; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX uk_user_star_onboarding ON public.user_onboarding_status USING btree (user_id, star_id); -- --- Name: uk_user_task; Type: INDEX; Schema: public; Owner: postgres +-- Name: uk_user_task; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX uk_user_task ON public.user_task_progress USING btree (user_id, star_id, task_key); -- --- Name: uk_users_mobile; Type: INDEX; Schema: public; Owner: postgres +-- Name: uk_users_mobile; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX uk_users_mobile ON public.users USING btree (mobile); -- --- Name: activity_items fk_activities_items; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: activity_items fk_activities_items; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.activity_items @@ -1534,7 +1462,7 @@ ALTER TABLE ONLY public.activity_items -- --- Name: activity_contributions fk_activity_contributions_activity; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: activity_contributions fk_activity_contributions_activity; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.activity_contributions @@ -1542,7 +1470,7 @@ ALTER TABLE ONLY public.activity_contributions -- --- Name: activity_contributions fk_activity_contributions_item; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: activity_contributions fk_activity_contributions_item; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.activity_contributions @@ -1550,7 +1478,7 @@ ALTER TABLE ONLY public.activity_contributions -- --- Name: activity_contributions fk_activity_contributions_star; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: activity_contributions fk_activity_contributions_star; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.activity_contributions @@ -1558,7 +1486,7 @@ ALTER TABLE ONLY public.activity_contributions -- --- Name: activity_contributions fk_activity_contributions_user; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: activity_contributions fk_activity_contributions_user; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.activity_contributions @@ -1566,7 +1494,7 @@ ALTER TABLE ONLY public.activity_contributions -- --- Name: activity_items fk_activity_items_activity; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: activity_items fk_activity_items_activity; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.activity_items @@ -1574,7 +1502,7 @@ ALTER TABLE ONLY public.activity_items -- --- Name: activity_user_stats fk_activity_user_stats_activity; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: activity_user_stats fk_activity_user_stats_activity; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.activity_user_stats @@ -1582,7 +1510,7 @@ ALTER TABLE ONLY public.activity_user_stats -- --- Name: activity_user_stats fk_activity_user_stats_star; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: activity_user_stats fk_activity_user_stats_star; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.activity_user_stats @@ -1590,7 +1518,7 @@ ALTER TABLE ONLY public.activity_user_stats -- --- Name: activity_user_stats fk_activity_user_stats_user; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: activity_user_stats fk_activity_user_stats_user; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.activity_user_stats @@ -1598,7 +1526,7 @@ ALTER TABLE ONLY public.activity_user_stats -- --- Name: asset_likes fk_asset_likes_asset; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: asset_likes fk_asset_likes_asset; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.asset_likes @@ -1606,7 +1534,7 @@ ALTER TABLE ONLY public.asset_likes -- --- Name: asset_likes fk_asset_likes_star; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: asset_likes fk_asset_likes_star; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.asset_likes @@ -1614,7 +1542,7 @@ ALTER TABLE ONLY public.asset_likes -- --- Name: asset_likes fk_asset_likes_user; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: asset_likes fk_asset_likes_user; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.asset_likes @@ -1622,7 +1550,7 @@ ALTER TABLE ONLY public.asset_likes -- --- Name: assets fk_assets_owner; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: assets fk_assets_owner; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.assets @@ -1630,7 +1558,7 @@ ALTER TABLE ONLY public.assets -- --- Name: assets fk_assets_star; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: assets fk_assets_star; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.assets @@ -1638,7 +1566,7 @@ ALTER TABLE ONLY public.assets -- --- Name: booth_slots fk_booth_slots_profile; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: booth_slots fk_booth_slots_profile; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.booth_slots @@ -1646,7 +1574,7 @@ ALTER TABLE ONLY public.booth_slots -- --- Name: exhibitions fk_exhibitions_asset; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: exhibitions fk_exhibitions_asset; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.exhibitions @@ -1654,7 +1582,7 @@ ALTER TABLE ONLY public.exhibitions -- --- Name: exhibitions fk_exhibitions_slot; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: exhibitions fk_exhibitions_slot; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.exhibitions @@ -1662,7 +1590,7 @@ ALTER TABLE ONLY public.exhibitions -- --- Name: fan_profiles fk_fan_profiles_star; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: fan_profiles fk_fan_profiles_star; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.fan_profiles @@ -1670,7 +1598,7 @@ ALTER TABLE ONLY public.fan_profiles -- --- Name: fan_profiles fk_fan_profiles_user; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: fan_profiles fk_fan_profiles_user; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.fan_profiles @@ -1678,7 +1606,7 @@ ALTER TABLE ONLY public.fan_profiles -- --- Name: friend_requests fk_friend_requests_from_user; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: friend_requests fk_friend_requests_from_user; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.friend_requests @@ -1686,7 +1614,7 @@ ALTER TABLE ONLY public.friend_requests -- --- Name: friend_requests fk_friend_requests_to_user; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: friend_requests fk_friend_requests_to_user; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.friend_requests @@ -1694,7 +1622,7 @@ ALTER TABLE ONLY public.friend_requests -- --- Name: friendships fk_friendships_friend; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: friendships fk_friendships_friend; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.friendships @@ -1702,7 +1630,7 @@ ALTER TABLE ONLY public.friendships -- --- Name: friendships fk_friendships_user; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: friendships fk_friendships_user; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.friendships @@ -1710,7 +1638,7 @@ ALTER TABLE ONLY public.friendships -- --- Name: mint_orders fk_mint_orders_asset; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: mint_orders fk_mint_orders_asset; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.mint_orders @@ -1718,7 +1646,7 @@ ALTER TABLE ONLY public.mint_orders -- --- Name: mint_orders fk_mint_orders_star; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: mint_orders fk_mint_orders_star; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.mint_orders @@ -1726,7 +1654,7 @@ ALTER TABLE ONLY public.mint_orders -- --- Name: mint_orders fk_mint_orders_user; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: mint_orders fk_mint_orders_user; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.mint_orders @@ -1734,7 +1662,7 @@ ALTER TABLE ONLY public.mint_orders -- --- Name: fan_profiles fk_users_fan_profiles; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: fan_profiles fk_users_fan_profiles; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.fan_profiles @@ -1745,5 +1673,5 @@ ALTER TABLE ONLY public.fan_profiles -- PostgreSQL database dump complete -- -\unrestrict NXfw4AHf53ndLJtQCalhae0Ymr5IJAi9umqWVq9QzKT09ZnpJXuxhwgGiRaJV9Y +\unrestrict sMtfDGEC88HGZIJke0nEBhyCFPngc2Pj7gKFCpH88m7WybaopqjS9o0UnzJwYTx diff --git a/frontend/pages/castlove/create.vue b/frontend/pages/castlove/create.vue index 2ab7c25..44ffae9 100644 --- a/frontend/pages/castlove/create.vue +++ b/frontend/pages/castlove/create.vue @@ -481,16 +481,13 @@ const handleBack = async () => { content: '确定要返回吗?未保存的数据将会丢失', success: async (res) => { if (res.confirm) { - uni.redirectTo({ - url: '/pages/castlove/mall' - }); + resetForm(); + uni.navigateBack() } } }); } else { - uni.redirectTo({ - url: '/pages/castlove/mall' - }); + uni.navigateBack() } }; @@ -569,7 +566,7 @@ const handleSkip = async () => { // resetForm(); // 跳转到成功页面 - uni.redirectTo({ + uni.navigateTo({ url: '/pages/castlove/success' }); @@ -594,7 +591,7 @@ const handleTabChange = (newTab) => { ]; if (newTab >= 0 && newTab < routes.length) { - uni.redirectTo({ url: routes[newTab] }); + uni.navigateTo({ url: routes[newTab] }); } }; diff --git a/frontend/pages/castlove/index.vue b/frontend/pages/castlove/index.vue index c593f15..d5a0610 100644 --- a/frontend/pages/castlove/index.vue +++ b/frontend/pages/castlove/index.vue @@ -506,17 +506,13 @@ const handleBack = async () => { // 清空表单数据 resetForm(); // 返回广场页面 - uni.redirectTo({ - url: '/pages/square/square' - }); + uni.navigateBack(); } } }); } else { // 没有未保存数据,直接返回 - uni.redirectTo({ - url: '/pages/square/square' - }); + uni.navigateBack(); } }; @@ -531,7 +527,7 @@ const handleTabChange = (newTab) => { ]; if (newTab >= 0 && newTab < routes.length) { - uni.redirectTo({ + uni.navigateTo({ url: routes[newTab] }); } diff --git a/frontend/pages/castlove/mall.vue b/frontend/pages/castlove/mall.vue index 9a62d81..8da69ce 100644 --- a/frontend/pages/castlove/mall.vue +++ b/frontend/pages/castlove/mall.vue @@ -26,7 +26,7 @@ const handleTabChange = (newTab) => { ]; if (newTab >= 0 && newTab < routes.length) { - uni.redirectTo({ + uni.navigateTo({ url: routes[newTab] }); } diff --git a/frontend/pages/components/CastloveContent.vue b/frontend/pages/components/CastloveContent.vue index 30fc0d1..70b6690 100644 --- a/frontend/pages/components/CastloveContent.vue +++ b/frontend/pages/components/CastloveContent.vue @@ -363,9 +363,7 @@ const formatCount = (count) => { // 返回按钮 const handleBack = () => { - uni.redirectTo({ - url: '/pages/square/square' - }); + uni.navigateBack(); }; diff --git a/frontend/pages/components/Header.vue b/frontend/pages/components/Header.vue index e0499c2..b5e0e51 100644 --- a/frontend/pages/components/Header.vue +++ b/frontend/pages/components/Header.vue @@ -246,7 +246,7 @@ const handleStarActivityClick = async () => { }); // 调用API获取活动列表 - const response = await getActivityListApi(starId, 'active', 1, 10); + const response = await getActivityListApi(starId, 1, 10); uni.hideLoading(); diff --git a/frontend/pages/discover/discover.vue b/frontend/pages/discover/discover.vue index 86e900d..49aba66 100644 --- a/frontend/pages/discover/discover.vue +++ b/frontend/pages/discover/discover.vue @@ -240,7 +240,7 @@ const handleSkip = async () => { uni.setStorageSync('temp_nft_data', JSON.stringify(nftData)); // 跳转到成功页面 - uni.redirectTo({ + uni.navigateTo({ url: '/pages/castlove/success' }); diff --git a/frontend/pages/discover/generation-loading.vue b/frontend/pages/discover/generation-loading.vue index b208f95..dc39c74 100644 --- a/frontend/pages/discover/generation-loading.vue +++ b/frontend/pages/discover/generation-loading.vue @@ -129,7 +129,7 @@ const handleSuccess = () => { // 跳转到结果页面 setTimeout(() => { - uni.redirectTo({ + uni.navigateTo({ url: '/pages/discover/generation-result' }); }, 1500); diff --git a/frontend/pages/discover/generation-result.vue b/frontend/pages/discover/generation-result.vue index b27994d..01af5eb 100644 --- a/frontend/pages/discover/generation-result.vue +++ b/frontend/pages/discover/generation-result.vue @@ -692,7 +692,7 @@ const selectAsset = async () => { uni.setStorageSync('temp_nft_data', JSON.stringify(nftData)); // 跳转到成功页面 - uni.redirectTo({ + uni.navigateTo({ url: '/pages/castlove/success' }); } catch (error) { diff --git a/frontend/pages/friends/index.vue b/frontend/pages/friends/index.vue index 8fec316..3851258 100644 --- a/frontend/pages/friends/index.vue +++ b/frontend/pages/friends/index.vue @@ -28,7 +28,7 @@ const handleTabChange = (newTab) => { ]; if (newTab >= 0 && newTab < routes.length) { - uni.redirectTo({ + uni.navigateTo({ url: routes[newTab] }); } diff --git a/frontend/pages/starbook/index.vue b/frontend/pages/starbook/index.vue index 0bde579..a5edea1 100644 --- a/frontend/pages/starbook/index.vue +++ b/frontend/pages/starbook/index.vue @@ -28,7 +28,7 @@ const handleTabChange = (newTab) => { ]; if (newTab >= 0 && newTab < routes.length) { - uni.redirectTo({ + uni.navigateTo({ url: routes[newTab] }); } diff --git a/frontend/pages/starcity/index.vue b/frontend/pages/starcity/index.vue index 914c693..667e9ae 100644 --- a/frontend/pages/starcity/index.vue +++ b/frontend/pages/starcity/index.vue @@ -28,7 +28,7 @@ const handleTabChange = (newTab) => { ]; if (newTab >= 0 && newTab < routes.length) { - uni.redirectTo({ + uni.navigateTo({ url: routes[newTab] }); } diff --git a/frontend/pages/support-activity/index.vue b/frontend/pages/support-activity/index.vue index 42b7bc4..800e8f9 100644 --- a/frontend/pages/support-activity/index.vue +++ b/frontend/pages/support-activity/index.vue @@ -156,7 +156,7 @@ function handleTabChange(newTab) { ] if (newTab >= 0 && newTab < tabRoutes.length) { - uni.redirectTo({ + uni.navigateTo({ url: tabRoutes[newTab], fail: (err) => { console.error('页面跳转失败:', err) diff --git a/frontend/utils/api.js b/frontend/utils/api.js index 5bf00c8..fe0e09c 100644 --- a/frontend/utils/api.js +++ b/frontend/utils/api.js @@ -1,6 +1,6 @@ // API 基础配置 -// const baseURL = 'http://101.132.250.62:8080' -const baseURL = 'http://192.168.110.60:8080' +const baseURL = 'http://101.132.250.62:8080' +// const baseURL = 'http://192.168.110.60:8080' // const baseURL = 'http://localhost:8080' // 是否使用模拟数据(开发调试时设为 true,后端API准备好后改为 false)