/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.shopping.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * 属性表实体类
 *
 * @author BladeX
 * @since 2022-02-13
 */
@Data
@TableName("t_attributes")
@ApiModel(value = "Attributes对象", description = "属性表")
public class Attributes implements Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * 分类属性表
	 */
	@JsonSerialize(using = ToStringSerializer.class)
	@TableId(value = "attr_id", type = IdType.ASSIGN_ID)
	@ApiModelProperty(value = "主键")
	private Long attrId;
	/**
	 * 分类ID
	 */
	@ApiModelProperty(value = "分类ID")
	private Long categoryId;
	/**
	 * 分类名
	 */
	@ApiModelProperty(value = "分类名")
	private String categoryName;
	/**
	 * 属性code
	 */
	@ApiModelProperty(value = "属性code")
	private String fieldName;
	/**
	 * 名称
	 */
	@ApiModelProperty(value = "名称")
	private String title;
	/**
	 * 描述
	 */
	@ApiModelProperty(value = "描述")
	private String description;
	/**
	 * 是否必填
	 */
	@ApiModelProperty(value = "是否必填")
	private Integer required;
	/**
	 * 表单类型 0:输入框 1:多选项 2:下拉框
	 */
	@ApiModelProperty(value = "表单类型 0:输入框 1:多选项 2:下拉框")
	private Integer formtype;
	/**
	 * 值选项
	 */
	@ApiModelProperty(value = "值选项")
	private String choices;
	/**
	 * 排序
	 */
	@ApiModelProperty(value = "排序")
	private Integer sort;
	/**
	 * 单位
	 */
	@ApiModelProperty(value = "单位")
	private String unit;
	/**
	 * 文本框时的最小值
	 */
	@ApiModelProperty(value = "文本框时的最小值")
	private Integer min;
	/**
	 * 文本框时的最大值
	 */
	@ApiModelProperty(value = "文本框时的最大值")
	private Integer max;
	/**
	 * 删除标志
	 */
	@TableLogic
	@ApiModelProperty(value = "删除标志")
	private Integer isDeleted;


}
