package com.sckw.product.model.vo.req;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Pattern;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;

/**
 * @desc: 添加商品属性
 * @author: yzc
 * @date: 2023-07-03 8:39
 */
@Getter
@Setter
@ToString
public class GoodsAttributes {

    /**
     * 参数名称
     */
    @Schema(description = "参数名称")
    @Length(max = 10,message = "参数名称最长10字符")
    @Pattern(regexp = "^[^\\s]*$", message = "参数名称不允许包含空格！")
    private String name;

    /**
     * 参数值
     */
    @Schema(description = "参数内容")
    @Length(max = 20,message = "参数内容最长20字符")
    @Pattern(regexp = "^[^\\s]*$", message = "参数内容不允许包含空格！")
    private String val;
}
