package com.softwarebr.nunu.json.api.center;

import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Digits;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @date 2020-02-21 11:49:00
 * @author lilin
 */

@Data
@ApiModel
public class PropertyParam {

	@ApiModelProperty(value = "载体名称", required = true, example = "")
	@NotEmpty(message = "载体名称不能为空")
	private String name;

	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	@ApiModelProperty(value = "出租开始时间", required = true, example = "")
	private LocalDateTime startDate;

	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	@ApiModelProperty(value = "出租结束时间", required = true, example = "")
	private LocalDateTime endDate;

	@ApiModelProperty(value = "项目价格(-1面议)", required = true, example = "")
	@Digits(fraction = 2, integer = 11, message = "项目价格不能为空，最低单位为分")
	private BigDecimal price;

	@ApiModelProperty(value = "最小容量", required = true, example = "")
	private Integer minCapacity;

	@ApiModelProperty(value = "最大容量", required = true, example = "")
	private Integer maxCapacity;

	@ApiModelProperty(value = "出售类型(1出租 2出售)", required = true, example = "")
	@NotNull(message = "请选择出售类型")
	private Integer type;

	@ApiModelProperty(value = "出售状态(1未出租 2已出租)", required = true, example = "")
	@NotNull(message = "请选择出售状态")
	private Integer status;

	@ApiModelProperty(value = "载体封面图", required = true, example = "")
	@NotEmpty(message = "请上传载体封面图")
	private String coverUri;

	@ApiModelProperty(value = "出租省份", required = true, example = "")
	@NotNull(message = "请选择省份")
	private Long provinceId;

	@ApiModelProperty(value = "出租城市", required = true, example = "")
	@NotNull(message = "请选择城市")
	private Long cityId;

	@ApiModelProperty(value = "出租区县", required = true, example = "")
	@NotNull(message = "请选择城市")
	private Long areaId;

	@ApiModelProperty(value = "出租镇", required = true, example = "")
	@NotNull(message = "请选择镇")
	private Long streetId;

	@ApiModelProperty(value = "出租详情(text)", required = true, example = "")
	private String detail;

	@ApiModelProperty(value = "项目联系人", required = true, example = "")
	@NotEmpty(message = "项目联系人不能为空")
	private String contact;

	@ApiModelProperty(value = "手机号码", required = true, example = "")
	@NotEmpty(message = "手机号码不能为空")
	private String contactPhone;

	@ApiModelProperty(value = "电子邮箱", required = true, example = "")
	@NotEmpty(message = "电子邮箱不能为空")
	private String email;

	@ApiModelProperty(value = "公开状态(1公开 2隐私 3平台可见)", required = true, example = "")
	@NotNull
	private Integer publicity;

}