package beilv.competition.domain;

import java.math.BigDecimal;
import java.util.Date;

import beilv.common.constant.PriceOptions;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import beilv.common.annotation.Excel;
import beilv.common.core.domain.BaseEntity;

import javax.validation.constraints.NotBlank;

/**
 * 赛事发布对象 competition
 *
 * @author LG
 * @date 2024-12-31
 */
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class Competition extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    private String id;

    /**
     * 活动标题
     */
    @Excel(name = "赛事标题")
    private String competitionTitle;

    /**
     * 活动类型
     */
    @Excel(name = "赛事类型")
    private String competitionType;
    private String competitionTypeLabel;

    /**
     * 团队最大人数
     */
    @Excel(name = "团队最大人数")
    private Integer personMax;

    /**
     * 最大团队数
     */
    @Excel(name = "赛事总人数/总团队数")
    private Integer teamMax;

    /**
     * 场地
     */
    @Excel(name = "赛事场地")
    private String competitionPlace;

    /**
     * 报名开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @Excel(name = "赛事开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
    private Date applyStartTime;

    /**
     * 报名结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @Excel(name = "赛事结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
    private Date applyEndTime;

    /**
     * 取消报名截至时间(活动开始前N小时可退款)
     */
    @Excel(name = "取消报名截至时间")
    private Integer applyBeforeTime;

    /**
     * 活动上限人数
     */
    @Excel(name = "赛事上限人数")
    private Integer competitionMaximum;

    /**
     * 活动费用(每人)
     */
    @Excel(name = "赛事费用")
    private BigDecimal competitionExpense;

    /**
     * 观看门票
     */
    @Excel(name = "观看门票")
    private BigDecimal viewingTicket;

    /**
     * 活动详情
     */
    @Excel(name = "赛事详情")
    private String competitionDetails;

    /**
     * 报名须知
     */
    @Excel(name = "报名须知")
    private String registrationNotes;

    /**
     * 活动状态
     */
    @Excel(name = "赛事状态")
    private String competitionState;
    private String competitionStateLabel;

    /**
     * 创建人姓名
     */
    private String createName;
    /**
     * 更新人姓名
     */
    private String updateName;
    /**
     * 发布人姓名
     */
    private String publishName;
    /**
     * 发布人id
     */
    private String publishBy;

    /**
     * 发布时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date publishTime;
    /**
     * 封面
     */
    private String competitionImg;

    @NotBlank(message = "封面不能为空")
    private String file;

    private Long allowPublishTime;

    //参赛费用
    private PriceOptions competitionPrice;
    //门票费用
    private PriceOptions viewingPrice;

    private String userId;

}
