package com.ruoyi.frequency.vote.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.frequency.voteoption.entity.VoteOption;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;
import java.util.List;

/**
 * 投票活动对象 t_vote
 *
 * @author liwenlong
 * @date 2023-10-12
 */
@Data
@Accessors(chain = true)
@TableName("t_vote")
public class Vote extends BaseEntity
{
    private static final long serialVersionUID = 1L;


    @ApiModelProperty("租户号")
    private Long id;

    @ApiModelProperty("删除标志;1 正常 2 删除 3 禁用")
    private Integer delFlag;

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

    @ApiModelProperty("内容")
    @Excel(name = "内容")
    private String content;

    @ApiModelProperty("活动截止日期")
    @Excel(name = "活动截止日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date cutoffDate;

    @ApiModelProperty("投票发起人;默认官方")
    @Excel(name = "投票发起人;默认官方")
    private String initiator;

    @ApiModelProperty("1单选 2多选")
    private Integer type;

    @ApiModelProperty("选择数量")
    private Integer pickNum;

    @ApiModelProperty(value = "点赞数")
    private Integer likeNum;

    @ApiModelProperty(value = "浏览数")
    private Integer browseNum;

    @ApiModelProperty(value = "评论数")
    private Integer commentNum;

    @ApiModelProperty(value = "精彩评论ID")
    private Long commentId;

    @ApiModelProperty("累计参与人数")
    @Excel(name = "累计参与人数")
    @TableField(exist = false)
    private Integer num;

    @ApiModelProperty("开始时间")
    @TableField(exist = false)
    private Date beginTime;

    @ApiModelProperty("结束时间")
    @TableField(exist = false)
    private Date endTime;


    @ApiModelProperty("截至时间开始时间")
    @TableField(exist = false)
    private Date cutoffBeginTime;

    @ApiModelProperty("截至时间结束时间")
    @TableField(exist = false)
    private Date cutoffEndTime;



    @ApiModelProperty("投票选项")
    @TableField(exist = false)
    private List<VoteOption> voteOptionList;


}
