package com.gxwebsoft.cms.param;

import com.baomidou.mybatisplus.annotation.TableField;
import com.gxwebsoft.common.core.annotation.QueryField;
import com.gxwebsoft.common.core.annotation.QueryType;
import com.gxwebsoft.common.core.web.BaseParam;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.Set;

/**
 * 文章查询参数
 *
 * @author 科技小王子
 * @since 2024-09-10 20:47:57
 */
@Data
@EqualsAndHashCode(callSuper = false)
@JsonInclude(JsonInclude.Include.NON_NULL)
@Schema(name = "CmsArticleParam对象", description = "文章查询参数")
public class CmsArticleParam extends BaseParam {
    private static final long serialVersionUID = 1L;

    @Schema(description = "文章ID")
    @QueryField(type = QueryType.EQ)
    private Integer articleId;

    @Schema(description = "父级栏目ID")
    @TableField(exist = false)
    private Set<Integer> categoryIds;

    @Schema(description = "文章标题")
    private String title;

    @Schema(description = "文章类型 0常规 1视频")
    @QueryField(type = QueryType.EQ)
    private Integer type;

    @Schema(description = "文章模型")
    @QueryField(type = QueryType.EQ)
    private String model;

    @Schema(description = "文章编号")
    @QueryField(type = QueryType.EQ)
    private String code;

    @Schema(description = "详情页标识")
    @QueryField(type = QueryType.EQ)
    private String detail;

    @Schema(description = "列表显示方式(10小图展示 20大图展示)")
    @QueryField(type = QueryType.EQ)
    private Integer showType;

    @Schema(description = "话题")
    @QueryField(type = QueryType.LIKE)
    private String topic;

    @Schema(description = "标签")
    @QueryField(type = QueryType.EQ)
    private String tags;

    @Schema(description = "栏目ID")
    @QueryField(type = QueryType.EQ)
    private Integer navigationId;

    @Schema(description = "文章分类ID")
    @QueryField(type = QueryType.EQ)
    private Integer categoryId;

    @Schema(description = "父级栏目ID")
    @QueryField(type = QueryType.EQ)
    private Integer parentId;

    @Schema(description = "封面图")
    private String image;

    @Schema(description = "是否包含封面图")
    @QueryField(type = QueryType.EQ)
    private Boolean hasImage;

    @Schema(description = "价格")
    private BigDecimal price;

    @Schema(description = "来源")
    private String source;

    @Schema(description = "虚拟阅读量(仅用作展示)")
    @QueryField(type = QueryType.EQ)
    private Integer virtualViews;

    @Schema(description = "实际阅读量")
    @QueryField(type = QueryType.EQ)
    private Integer actualViews;

    @Schema(description = "可见类型 0所有人 1登录可见 2密码可见")
    @QueryField(type = QueryType.EQ)
    private Integer permission;

    @Schema(description = "访问密码")
    @QueryField(type = QueryType.EQ)
    private String password;

    @Schema(description = "访问密码")
    @QueryField(type = QueryType.EQ)
    private String password2;

    @Schema(description = "发布来源客户端 (APP、H5、小程序等)")
    private String platform;

    @Schema(description = "文章附件")
    private String files;

    @Schema(description = "视频地址")
    private String video;

    @Schema(description = "接受的文件类型")
    private String accept;

    @Schema(description = "经度")
    private String longitude;

    @Schema(description = "纬度")
    private String latitude;

    @Schema(description = "所在省份")
    private String province;

    @Schema(description = "所在城市")
    private String city;

    @Schema(description = "所在辖区")
    private String region;

    @Schema(description = "街道地址")
    private String address;

    @Schema(description = "点赞数")
    @QueryField(type = QueryType.EQ)
    private Integer likes;

    @Schema(description = "评论数")
    @QueryField(type = QueryType.EQ)
    private Integer commentNumbers;

    @Schema(description = "提醒谁看")
    private String toUsers;

    @Schema(description = "用户ID")
    @QueryField(type = QueryType.EQ)
    private Integer userId;

    @Schema(description = "项目ID")
    @QueryField(type = QueryType.EQ)
    private Long projectId;

    @Schema(description = "排序(数字越小越靠前)")
    @QueryField(type = QueryType.EQ)
    private Integer sortNumber;

    @Schema(description = "备注")
    private String comments;

    @Schema(description = "状态, 0已发布, 1待审核 2已驳回 3违规内容")
    @QueryField(type = QueryType.EQ)
    private Integer status;

    @Schema(description = "是否删除, 0否, 1是")
    @QueryField(type = QueryType.EQ)
    private Integer deleted;

    @Schema(description = "是否推荐")
    @QueryField(type = QueryType.EQ)
    private Integer recommend;

    @Schema(description = "文章ID集查询")
    @TableField(exist = false)
    private Set<Integer> articleIds;

    @Schema(description = "网站创建者ID")
    @QueryField(type = QueryType.EQ)
    private Integer websiteUserId;

}
