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 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.NotNull;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 按总计时长收费表
 *
 * @author 黄辉
 * @version 1.0
 * @date 2021-05-06 19:59:16
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "按总计时长收费表 ", description = "按总计时长收费表 ")
@TableName("pmg_bat_park_charge_duration")
public class PmgBatParkChargeDuration extends TenantEntity {
    private static final long serialVersionUID = 1L;
    /**
     * 项目Id
     */
    @ApiModelProperty(name = "projectId", value = "项目Id")
    @NotNull(message = "请选择项目")
    private Long projectId;

    /**
     * 规则类型(临时停车，群组)
     */
    @ApiModelProperty(name = "ruleType", value = "规则类型(临时停车，群组)")
    private Integer ruleType;
    /**
     * 规则名称
     */
    @ApiModelProperty(name = "ruleName", value = "规则名称")
    private String ruleName;
    /**
     * 车辆群组
     */
    @ApiModelProperty(name = "carGroup", value = "车辆群组")
    private String carGroup;
    /**
     * 车辆类型
     */
    @ApiModelProperty(name = "carType", value = "车辆类型")
    private String carType;
    /**
     * 单日计费时长(0:入场时间至0点,1:连续24小时,1:连续计费)
     */
    @ApiModelProperty(name = "periodOption", value = "单日计费时长(0:入场时间至0点,1:连续24小时,1:连续计费)")
    private Integer periodOption;
    /**
     * 每日多次封顶(0:不封顶,1:按金额)
     */
    @ApiModelProperty(name = "periodLimitOption", value = "每日多次封顶(0:不封顶,1:按金额)")
    private Integer periodLimitOption;
    /**
     * 封顶金额(分)
     */
    @ApiModelProperty(name = "periodLimitPrice", value = "封顶金额")
    private Long periodLimitPrice;


    /**
     * 停车场id
     */
    @ApiModelProperty(name = "parkingId", value = "停车场id")
    private String parkingId;


    @ApiModelProperty(name = "rate", value = "总时长  1按次数  2停车时段  3单位时长  4日夜组合")
    private Long rate;
    /**
     * 0-未产生账单，1-产生账单
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "0-未产生账单，1-产生账单")
    private Integer hasBill;

    @TableField(exist = false)
    @ApiModelProperty(value = "时间段")
    private List<PmgConfigPeriodDto> list;

    /**
     * 封顶金额(元)
     */
    @TableField(exist = false)
    private Double periodLimitPriceDouble;
    @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 = "是否默认")
    private Integer isDefault;
    /**
     * 免费停车时长
     */
    @ApiModelProperty(name = "freeTime", value = "免费停车时长")
    private Long freeTime;
    /**
     * 免费出场时长
     */
    @ApiModelProperty(name = "freeOutTime", value = "免费出场时长")
    private Long freeOutTime;

}
