package com.ym.mec.biz.dal.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author hgw
 * Created by 2021-12-06
 */
@ApiModel(value = "机构产品参数")
public class TenantProductInfoDto {

    @ApiModelProperty(value = "id")
    private Integer id;

    /**
     * 机构id
     */
    @ApiModelProperty(value="机构id")
    private Integer tenantId;

    /**
     * 选择的服务的id
     */
    @NotNull(message = "请选择一个服务！")
    @ApiModelProperty(value="选择的服务的id")
    private Integer serveId;

    /**
     * 服务的付费类型id
     */
    @NotNull(message = "请选择付费类型！")
    @ApiModelProperty(value="服务的付费类型id")
    private Integer serveDetailId;

    /**
     * 原价单价
     */
    @ApiModelProperty(value="原价单价")
    private BigDecimal originalPrice;

    /**
     * 合同价单价
     */
    @DecimalMin(value = "0.01", message = "合同价单价必需大于0元！")
    @DecimalMax(value = "1000000", message = "合同价单价不能大于100万元！")
    @ApiModelProperty(value="合同价单价")
    private BigDecimal contractPrice;

    /**
     * 本次开通价格/本次实际应付金额
     */
    @DecimalMin(value = "0.01", message = "开通价必需大于0元！")
    @DecimalMax(value = "1000000", message = "开通价不能大于100万元！")
    @ApiModelProperty(value="本次开通价格/本次实际应付金额")
    private BigDecimal payAmount;

    /**
     * 有效期(数字-结合有效期单位)
     */
    @NotNull(message = "请填写有效期！")
    @Pattern(regexp = "^[0-9]*$", message = "有效期只能填写数字！")
    @ApiModelProperty(value="有效期(数字-结合有效期单位)")
    private Integer expiryCount;

    /**
     * 有效期单位(年/月)
     */
    @NotBlank(message = "有效期单位不能为空！")
    @ApiModelProperty(value="有效期单位(年/月)")
    private String expiryUnit;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getTenantId() {
        return tenantId;
    }

    public void setTenantId(Integer tenantId) {
        this.tenantId = tenantId;
    }

    public Integer getServeId() {
        return serveId;
    }

    public void setServeId(Integer serveId) {
        this.serveId = serveId;
    }

    public Integer getServeDetailId() {
        return serveDetailId;
    }

    public void setServeDetailId(Integer serveDetailId) {
        this.serveDetailId = serveDetailId;
    }

    public BigDecimal getOriginalPrice() {
        return originalPrice;
    }

    public void setOriginalPrice(BigDecimal originalPrice) {
        this.originalPrice = originalPrice;
    }

    public BigDecimal getContractPrice() {
        return contractPrice;
    }

    public void setContractPrice(BigDecimal contractPrice) {
        this.contractPrice = contractPrice;
    }

    public BigDecimal getPayAmount() {
        return payAmount;
    }

    public void setPayAmount(BigDecimal payAmount) {
        this.payAmount = payAmount;
    }

    public Integer getExpiryCount() {
        return expiryCount;
    }

    public void setExpiryCount(Integer expiryCount) {
        this.expiryCount = expiryCount;
    }

    public String getExpiryUnit() {
        return expiryUnit;
    }

    public void setExpiryUnit(String expiryUnit) {
        this.expiryUnit = expiryUnit;
    }
}
