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 = "category", autoResultMap = true)
public class CategoryDO extends BaseDO<CategoryDO> {

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

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

	/**
	 * 资源类型
	 */
	@TableField(value = "type")
	private CategoryTypeEnum type;


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

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