
package com.tmerclub.cloud.supplier.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * 供应商详情DTO
 *
 * @author lhd
 * @date 2022-03-14 17:04:32
 */
@Data
public class SupplierDetailDTO implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    @Schema(description = "系统类型 1商家端  2平台端 3供应商端")
    private Integer sysType;

    @Schema(description = "供应商id")
    private Long supplierId;

    @Schema(description = "供应商名称")
    @NotBlank(message = "供应商名称不能为空")
    @Length(min = 2, max = 30, message = "供应商名称限制在2到30个字符之间")
    private String supplierName;

    @Schema(description = "供应商供应商名称")
    private String supplierShopName;

    @Schema(description = "联系人姓名")
    @NotBlank(message = "联系人不能为空")
    @Length(min = 2, max = 10, message = "联系人姓名需要在2到10个字符之间")
    private String contactName;

    @Schema(description = "联系方式")
    @NotBlank(message = "联系方式不能为空")
    private String contactPhone;

    @Schema(description = "供应商简介")
    @Length(max = 200, message = "供应商简介字符不能超过200")
    private String intro;

    @Schema(description = "接收短信号码")
    private String noticeMobile;

    @Schema(description = "供应商logo(可修改)")
    private String supplierLogo;

    @Schema(description = "供应商状态(-1:已删除 0: 停业中 1:营业中 2:平台下线 3:开店申请待审核 4:供应商申请中 5:上线申请待审核)")
    private Integer supplierStatus;

    @Schema(description = "备注信息")
    private String remarks;

    @Schema(description = "是否优选好店 1.是 0.不是")
    @Max(value = 1, message = "只能为0或1")
    @Min(value = 0, message = "只能为0或1")
    private Integer isPreferred;

    @Schema(description = "账号名", requiredMode = Schema.RequiredMode.REQUIRED)
    private String username;

    @Size(max = 64)
    @Schema(description = "密码", requiredMode = Schema.RequiredMode.REQUIRED)
    private String password;

    @Size(max = 15)
    @Schema(description = "手机号", requiredMode = Schema.RequiredMode.REQUIRED)
    private String phone;

    @Schema(description = "验证码", requiredMode = Schema.RequiredMode.REQUIRED)
    private String code;

    @Schema(description = "移动端背景图")
    private String mobileBackgroundPic;

    @Schema(description = "pc背景图")
    private String pcBackgroundPic;

    @Schema(description = "供应商中的商品数量")
    @Max(value = 5, message = "最多只能返回5个商品")
    @Min(value = 0, message = "spuNum不能小于0")
    private Integer spuNum;

    @Schema(description = "签约起始时间")
    private Date contractStartTime;

    @Schema(description = "签约终止时间")
    private Date contractEndTime;

    @Schema(description = "支付系统类型 0默认 1通联")
    private Integer paySysType;

}
