package com.zfire.mall.manager.bean.manage.take;

import com.zfire.mall.manager.bean.valid.EditGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import java.math.BigDecimal;
import java.util.Date;

@Data
@ApiModel(value="TakeCarRecordBean对象", description="TakeCarRecordBean对象")
public class TakeCarRecordBean {

    private static final long serialVersionUID=1L;

    @NotEmpty(message = "编码不能空", groups = EditGroup.class)
    @ApiModelProperty(value = "编码", notes = "添加时非填充，编辑时必填")
    private String id;

    @ApiModelProperty(value = "企业id")
    private String adminCompanyId;

    @NotEmpty(message = "请选择经销商")
    @ApiModelProperty(value = "客户编码", notes = "必填")
    private String customerId;

    @ApiModelProperty(value = "客户名称", notes = "非填充")
    private String customerName;

    @NotEmpty(message = "车牌不能为空")
    @ApiModelProperty(value = "车牌", notes = "必填")
    private String carBrand;

    @NotEmpty(message = "联系电话不能为空")
    @Pattern(regexp = "1[2-9]\\d{9}", message = "联系电话不符合格式")
    @ApiModelProperty(value = "联系电话", notes = "必填")
    private String mobile;

    @ApiModelProperty(value = "车型", notes = "非填充")
    private String carType;

    @Min(value = 1, message = "体积不能少于1")
    @ApiModelProperty(value = "体积", notes = "必填")
    private BigDecimal volume;

    @ApiModelProperty(value = "创建人")
    private String createBy;

    @ApiModelProperty(value = "创建人名称")
    private String createName;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "更新人名称")
    private String updateBy;

    @ApiModelProperty(value = "更新人名称")
    private String updateName;

    @ApiModelProperty(value = "更新时间")
    private Date updateTime;
}
