package com.bocloud.ims.entity.common;

import com.bocloud.entity.annotations.Column;
import com.bocloud.entity.annotations.IgnoreAll;
import com.bocloud.entity.annotations.PK;
import com.bocloud.entity.annotations.Table;
import com.bocloud.entity.bean.Generic;
import com.bocloud.entity.meta.PKStrategy;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 字典实体类
 *
 * @author dmw
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Table("dictionary")
@EqualsAndHashCode(callSuper = true)
public class Dictionary extends Generic {
	/**
	 * id
	 */
	@PK(value = PKStrategy.AUTO)
	private Long id;
	/**
	 * 父id
	 */
	@Column("pid")
	private Long pid;
	/**
	 * 字典名称
	 */
	@Column("name")
	private String name;
	/**
	 * 字典value
	 */
	@Column("value")
	private String value;
	/**
	 * 子集合
	 */
	@IgnoreAll
	private List<Dictionary> children;

	@IgnoreAll
	private String pvalue;

}
