package com.cpop.oam.business.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.Table;
import com.cpop.core.base.entity.BaseEntity;
import com.cpop.core.base.entity.BaseInsertListener;
import com.cpop.core.base.entity.BaseUpdateListener;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * 部门表 实体类。
 *
 * @author DB
 * @since 2023-09-08
 */
@Data
@EqualsAndHashCode(callSuper=false)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Table(value = "cp_oam_dept", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false)
public class Dept extends BaseEntity implements Serializable {

    /**
     * 部门id
     */
    @Id
    private String id;

    /**
     * 父部门id
     */
    private String parentId;

    /**
     * 企微id
     */
    private Long wxCpId;

    /**
     * 企微父id
     */
    private Long wxCpParentId;

    /**
     * 部门名称
     */
    private String name;

    /**
     * 排序
     */
    private Integer orderNo;

    /**
     * 负责人
     */
    private String leader;

    /**
     * 电话
     */
    private String phone;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 部门状态:1正常,0停用
     */
    private Boolean status;

    /**
     * 备注
     */
    private String remark;

    /**
     * 逻辑删除(0否1是)
     */
    @Column(isLogicDelete = true)
    private Boolean isDelete;

}
