package com.yuchen.saas.parking.api.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.nest.springwrap.core.tenant.mp.TenantEntity;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

/**
 * 节假日放行规则表
 *
 * @author 黄辉
 * @version 1.0
 * @date 2021-05-22 16:58:51
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value = "节假日放行规则表", description = "节假日放行规则表")
@TableName("pmg_bat_holidays_pass_rule")
public class PmgBatHolidaysPassRule extends TenantEntity {
	private static final long serialVersionUID = 1L;

	/**
	 * 节假日名称
	 */

	@NotEmpty(message = "节假日名称不能为空")
	@ApiModelProperty(name = "holidaysName", value = "节假日名称")
	private String holidaysName;
	/**
	 * 开始时间 2021-01-01（这天零点00:00开始）
	 */
	@ApiModelProperty(name = "startTime", value = "开始时间 2021-01-01（这天零点00:00开始）")
	private Date startTime;
	/**
	 * 结束时间2021-01-03（这天23:59:59）
	 */
	@ApiModelProperty(name = "endTime", value = "结束时间2021-01-03（这天23:59:59）")
	private Date endTime;
	/**
	 * 描述
	 */
	@ApiModelProperty(name = "remark", value = "描述")
	private String remark;
	/**
	 * 停车场唯一id
	 */
	@NotNull(message = "停车场id不能为空")
	@Min(value = 1, message = "停车场id必须为正整数")
	@ApiModelProperty(name = "parkingId", value = "停车场唯一id")
	private Long parkingId;

	/**
	 * 周期封装
	 */
	@TableField(exist = false)
	@ApiModelProperty(name = "daySelect", value = "daySelect")
	private List<Integer> daySelect;
}
