package com.cool.modules.dingtalk.entity;

import com.cool.core.base.BaseEntity;
import com.mybatisflex.annotation.Table;
import com.cool.core.annotation.ColumnDefine;
import com.tangzc.mybatisflex.autotable.annotation.UniIndex;
import lombok.Getter;
import lombok.Setter;

/**
 * 钉钉部门实体
 * 用于存储从钉钉同步的部门信息
 */
@Getter
@Setter
@Table(value = "dingtalk_department", comment = "钉钉部门表")
public class DingtalkDepartmentEntity extends BaseEntity<DingtalkDepartmentEntity> {

    @UniIndex
    @ColumnDefine(comment = "钉钉部门ID", notNull = true)
    private Long deptId;

    @ColumnDefine(comment = "部门名称", notNull = true, length = 200)
    private String name;

    @ColumnDefine(comment = "父部门ID（钉钉ID）", defaultValue = "0")
    private Long parentId;

    @ColumnDefine(comment = "排序号", defaultValue = "0")
    private Integer deptOrder;

    @ColumnDefine(comment = "是否创建部门群", defaultValue = "false")
    private Boolean createDeptGroup;

    @ColumnDefine(comment = "是否自动加入部门群", defaultValue = "false")
    private Boolean autoAddUser;
}
