CREATE TABLE IF NOT EXISTS content_articles
(
    id BIGINT NOT NULL,
    content_type VARCHAR(32) NOT NULL,
    title VARCHAR(240) NOT NULL,
    category VARCHAR(80),
    scope VARCHAR(80),
    version VARCHAR(32),
    owner VARCHAR(64),
    article_type VARCHAR(64),
    publish_at TIMESTAMP,
    read_mode VARCHAR(64),
    status VARCHAR(32) NOT NULL DEFAULT '待发布',
    summary TEXT,
    content TEXT,
    front_template VARCHAR(80),
    front_audience VARCHAR(80),
    publish_targets VARCHAR(255),
    read_count INT NOT NULL DEFAULT 0,
    created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    deleted_at TIMESTAMP,
    PRIMARY KEY (id),
    KEY idx_content_articles_type_status (content_type, status),
    KEY idx_content_articles_publish (content_type, publish_at)
);
