package com.sckw.system.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * 系统内容配置表
 * @author chenxiaofei
 * @date 2026-01-07
 */
@EqualsAndHashCode(callSuper = false)
@Data
@Accessors(chain = true)
@TableName("sys_articles")
public class SysArticles implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 雪花ID
     */
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 条款唯一标识 (如: REG_AGREEMENT, PRIVACY_POLICY)
     */
    @TableField("article_key")
    private String articleKey;

    /**
     * 条款标题
     */
    @TableField("title")
    private String title;

    /**
     * 条款详细内容 (富文本/HTML)
     */
    @TableField("content")
    private String content;

    /**
     * 版本号
     */
    @TableField("version")
    private String version;

    /**
     * 更新时间
     */
    @TableField("updated_at")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedAt;

}

