package org.springblade.modules.business.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.common.base.BaseEntity;
import org.springblade.common.config.LocalTimeDeserializer;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalTime;

/**
 * 门店表实体类
 *
 * @author zzyd
 * @since 2024-07-16
 */
@Data
@TableName("t_shop")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Shop对象", description = "门店表")
public class Shop extends BaseEntity {

	private static final long serialVersionUID = 1L;

	/**
	* 门店名称
	*/
	@ApiModelProperty(value = "门店名称")
	@NotBlank(message = "门店名称不能为空")
	private String storeName;
	/**
	* 门店图片
	*/
	@NotBlank(message = "门店图片不能为空")
	@ApiModelProperty(value = "门店图片")
	private String storeImage;
	/**
	* 门店地址
	*/
	@NotBlank(message = "门店地址不能为空")
	@ApiModelProperty(value = "门店地址")
	private String address;
	/**
	* 经度
	*/
	@NotNull(message = "经度不能为空")
//	@ApiModelProperty(value = "经度")
	private Double longitude;
	/**
	* 纬度
	*/
	@NotNull(message = "纬度不能为空")
//	@ApiModelProperty(value = "纬度")
	private Double latitude;
	/**
	* 所属商家id
	*/
	@ApiModelProperty(value = "所属商家id")
	private Long merchantId;
	/**
	* 店长姓名
	*/
	@ApiModelProperty(value = "店长姓名")
	private String managerName;
	/**
	* 店长电话
	*/
	@ApiModelProperty(value = "店长电话")
	private String managerPhone;
	/**
	* 营业状态 1-营业中 0-已歇业
	*/
	@ApiModelProperty(value = "营业状态 1-营业中 0-已歇业")
	private Integer businessStatus;
	/**
	* 营业执照
	*/
	@ApiModelProperty(value = "营业执照")
	private String businessLicence;
	/**
	* 营业开始时间
	*/
	@JsonDeserialize(using = LocalTimeDeserializer.class)
	@ApiModelProperty(value = "营业开始时间")
	@JsonFormat(pattern = "HH:mm")
	private LocalTime openingHours;
	/**
	* 营业结束时间
	*/
	@JsonFormat(pattern = "HH:mm")
	@JsonDeserialize(using = LocalTimeDeserializer.class)
	@ApiModelProperty(value = "营业结束时间")
	private LocalTime closingHours;
	/**
	 * 门店设备
	 */
	@NotEmpty(message = "请选择门店设备")
	@TableField(exist = false)
	@ApiModelProperty(value = "门店设备id集合，以逗号分隔")
	private String facilityIds;

}
