package com.aircraft.modules.article.domain;

import cn.hutool.core.date.DateTime;
import com.baomidou.mybatisplus.annotation.*;
import com.aircraft.base.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.sql.Timestamp;
import java.time.LocalDateTime;

/**
 * <p>
 * 文章表
 * </p>
 *
 * @author cli
 * @since 2025-07-10
 */
@Data
@TableName("cp_article")
public class CpArticle {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "标题")
    private String title;

    @ApiModelProperty(value = "封面（预留字段）")
    private String photo;

    @ApiModelProperty(value = "正文id，关联文章内容表id")
    private Long textid;

    @ApiModelProperty(value = "文章类型：0-图文，1-外链")
    private Integer articleType;

    @ApiModelProperty(value = "文章外链")
    private String url;

    @ApiModelProperty(value = "类型id，关联标签表id")
    private Integer cplabelId;

    @ApiModelProperty(value = "是否置顶：1-置顶，0-不置顶")
    private Integer top;

    @ApiModelProperty(value = "浏览量")
    private Long viewCount;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "发布者id（用户表或管理员表由发布者类型决定）")
    private Long authorId;

    @ApiModelProperty(value = "审核状态：t-审核通过，f-不通过，w-未审核")
    private String checkState = "t";

    @ApiModelProperty(value = "逻辑删除：1-删除，0-正常")
    private Integer delFlag;

}
