package com.zbkj.common.response;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

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

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="ActivityResponse对象", description="活动响应对象")
public class ActivityResponse implements Serializable {

    private static final long serialVersionUID = -4585094537501770138L;

    @ApiModelProperty(value = "活动管理ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

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

    @ApiModelProperty(value = "活动作者")
    private String author;

    @ApiModelProperty(value = "活动图片")
    private String imageInput;

    @ApiModelProperty(value = "活动简介")
    private String synopsis;

    @ApiModelProperty(value = "浏览次数")
    private String visit;

    @ApiModelProperty(value = "活动内容")
    private String content;

    @ApiModelProperty(value = "活动地址")
    private String activityAddr;

    @ApiModelProperty(value = "活动时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String activityTime;

    @ApiModelProperty(value = "活动人数")
    private Integer activityNum;

    @ApiModelProperty(value = "已参加人数")
    private Integer validNum;

    @ApiModelProperty(value = "费用")
    private String activityPrice;

    @ApiModelProperty(value = "是否逾期：0否，1是")
    public Integer isExpired;

    @ApiModelProperty(value = "标签")
    private String tags;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createTime;

    @ApiModelProperty(value = "开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date beginTime;

    @ApiModelProperty(value = "结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    @ApiModelProperty(value = "是否参加：空(未登录/未参加)，有值(已参加)")
    private String registerActivityId = "";

    @ApiModelProperty(value = "当前状态：0未开始，1进行中，2已结束")
    private Integer flag;

    @ApiModelProperty(value = "参与的用户头像")
    public List<String> userAvatar;

}
