package easydo.technology.system.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import easydo.technology.base.CommonEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.springframework.beans.BeanUtils;

import javax.validation.constraints.NotBlank;

/**
 * @author jinjin
 * @date 2020-09-24
 */
@Getter
@Setter
@TableName("sys_dict")
@Accessors(chain = true)
public class Dict extends CommonEntity {

    @TableId(value = "dict_id", type = IdType.AUTO)
    private Long id;

    @NotBlank
    private String name;

    private String description;

    public void copyFrom(Dict source) {
        BeanUtils.copyProperties(source, this);
    }
}
