DROP TABLE IF EXISTS "user_balance_log";
DROP TABLE IF EXISTS "user_commission_log";
DROP TABLE IF EXISTS "user_gift_amount_log";
DROP TABLE IF EXISTS "user_login_log";
DROP TABLE IF EXISTS "user_reset_subscribe_log";
DROP TABLE IF EXISTS "user_subscribe_log";
DROP TABLE IF EXISTS "message_log";
DROP TABLE IF EXISTS "system_logs";
CREATE TABLE "system_logs" (
    "id" BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL,
    "type" SMALLINT NOT NULL DEFAULT '0',
    "date" varchar(20)  DEFAULT NULL,
    "object_id" bigint NOT NULL DEFAULT '0',
    "content" text  NOT NULL,
    "created_at" TIMESTAMP(3) DEFAULT NULL,
    PRIMARY KEY ("id")
);
CREATE INDEX IF NOT EXISTS "system_logs_idx_type" ON "system_logs" ("type");
CREATE INDEX IF NOT EXISTS "system_logs_idx_object_id" ON "system_logs" ("object_id");
