package com.xunhong.erp.turbo.biz.infrastructure.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.xunhong.erp.turbo.api.biz.dto.enums.BoxBrandTypeEnum;
import com.xunhong.erp.turbo.datasource.domain.entity.BaseDO;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author shenyifei
 */
@Data
@TableName(value = "box_brand", autoResultMap = true)
@EqualsAndHashCode(callSuper = true)
public class BoxBrandDO extends BaseDO<BoxBrandDO> {

	/**
	 * 品牌ID
	 */
	@TableId(value = "brand_id", type = IdType.ASSIGN_ID)
	private Long brandId;

	/**
	 * 品牌名称
	 */
	@TableField(value = "name")
	private String name;

	/**
	 * 品牌图片URL
	 */
	@TableField(value = "image")
	private String image;

	/**
	 * 品牌类型：1_我方纸箱；2_瓜农纸箱；3_第三方纸箱；4_礼盒；
	 */
	@TableField(value = "type")
	private BoxBrandTypeEnum type;

	/**
	 * 规格ID
	 */
	@TableField(value = "spec_ids", typeHandler = JacksonTypeHandler.class)
	private List<Long> specIds;

	/**
	 * 备注
	 */
	@TableField(value = "remark")
	private String remark;

	/**
	 * 状态：1_启用；0_禁用
	 */
	@TableField(value = "status")
	private Boolean status;

	/**
	 * 排序
	 */
	@TableField(value = "sort")
	private BigDecimal sort;

	@TableField(exist = false)
	private List<BoxProductDO> boxProductDOList;

	@TableField(exist = false)
	private List<BoxSpecDO> boxSpecDOList;

}
