package com.xunhong.erp.turbo.infra.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.xunhong.erp.turbo.api.infra.dto.enums.CategoryTypeEnum;
import com.xunhong.erp.turbo.datasource.domain.entity.BaseDO;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author shenyifei
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "material")
public class MaterialDO extends BaseDO<MaterialDO> {

	/**
	 * 分类id
	 */
	@TableId(value = "material_id", type = IdType.ASSIGN_ID)
	private Long materialId;

	/**
	 * 上级分类id
	 */
	@TableField(value = "category_id")
	private Long categoryId;

	/**
	 * 素材类型
	 */
	@TableField(value = "type")
	private CategoryTypeEnum type;

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

	/**
	 * 路劲
	 */
	@TableField(value = "path")
	private String path;

	@TableField(exist = false)
	private CategoryDO categoryDO;
}
