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

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.thinkunion.park.service.common.entity.BasicEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * @Author: 肖润飞
 * @CreateTime: 2022/09/22 10:32
 * @Description: 错时月卡车收费规则
 * @Version: 1.0
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "停车场 错时月卡收费规则表", description = "停车场 错时月卡收费规则表")
@TableName("staggered_month_charge_rule")
public class StaggeredMonthChargeRule extends BasicEntity {
    /**
     * 停车库唯一标识
     */
    @ApiModelProperty("停车库唯一标识")
    private String parkingId;
    /**
     * 规则名称
     */
    @ApiModelProperty("规则名称")
    private String ruleName;
    /**
     * 车辆类型
     */
    @ApiModelProperty(name = "carType", value = "车辆类型")
    private String carType;

    /**
     * 包期费用(分)
     */
    @ApiModelProperty("包期费用(分)")
    private Long fee;

    @Deprecated
    @ApiModelProperty("是否固定车位号:0否,1是")
    private Integer isConstSpaceNo;

//    @NotNull
    @ApiModelProperty("缴费有效期(天)")
    private Integer validityPeriod;
    @ApiModelProperty("是否月卡失效日期限制")
    private Integer isValidityPeriod;

    @ApiModelProperty("错时卡数量")
    private Integer residueCard;
    @ApiModelProperty("是否月卡数量限制")
    private Integer isResidueCard;
    @ApiModelProperty(value = "生效开始时间")
    @TableField(value = "begin_time", fill = FieldFill.INSERT)
    private LocalDateTime beginTime;

    @ApiModelProperty(value = "生效结束时间")
    @TableField(value = "end_time", fill = FieldFill.INSERT)
    private LocalDateTime endTime;
    /**
     * 是否默认
     */
    @ApiModelProperty(name = "isDefault", value = "是否默认")
    @NotNull(message = "请输入是否默认")
    private Integer isDefault;
    /**
     * 协议内容
     */
    @ApiModelProperty(name = "protocolContent", value = "协议内容")
    @NotBlank(message = "请输入协议内容")
    private String protocolContent;
    @ApiModelProperty("最大月份数")
    private Integer maxMonth;
//    @ApiModelProperty("是否仅工作日")
//    private Integer isWorkDay;
//    @ApiModelProperty("是否可选跨天")
//    private Integer isCrossingDay;
    @ApiModelProperty("备注")
    private String remark;
    @ApiModelProperty("开放对象(1:公众，2:住户)")
    private Integer accessibleObject;
    @ApiModelProperty("绑定车辆数")
    private Integer bindCarNum;
    @ApiModelProperty("免费车申请(0否1是)")
    private Integer freeApply;
}