department_mapping
表 · 14 字段
部门映射表-维护钉钉部门ID与名称的映射关系
字段信息
| 字段名 | 类型 | 必填 | 说明 | 关联关系 |
|---|---|---|---|---|
| dept_id主键 | bigint(20) | 否 | 钉钉部门ID-主键 | - |
| dept_name索引 | varchar(200) | 否 | 部门名称 | - |
| parent_dept_id索引 | bigint(20) | 是 | 父部门ID-0表示根部门 | - |
| dept_level索引 | int(11) | 是 | 部门层级-1=根部门-2=一级部门-3=二级部门 | - |
| full_path | varchar(500) | 是 | 完整路径-如:根部门/广西分公司/营销中台 | - |
| path_ids | json | 是 | 路径ID数组-如[1,657421344,594731237] | - |
| auto_add_user | tinyint(1) | 是 | 是否自动添加用户 | - |
| create_dept_group | tinyint(1) | 是 | 是否创建部门群 | - |
| ext | text | 是 | 扩展信息-JSON字符串-如{"faceCount":"60"} | - |
| employee_count | int(11) | 是 | 部门人数-定期更新 | - |
| is_active索引 | tinyint(1) | 是 | 是否有效-0无效-1有效 | - |
| sync_time索引 | datetime | 是 | 同步时间 | - |
| created_at | datetime | 是 | 创建时间 | - |
| updated_at | datetime | 是 | 更新时间 | - |
索引信息
idx_dept_level
普通索引: dept_level
idx_dept_name
普通索引: dept_name
idx_is_active
普通索引: is_active
idx_parent_dept_id
普通索引: parent_dept_id
idx_sync_time
普通索引: sync_time
PRIMARY
唯一索引: dept_id
相关表
v_current_performance_config
v_employee_with_dept
v_按天业绩统计_净实收计算
v_钉钉员工表
v_销售业绩
v_销售业绩_快照版
conversation_sessions
crm_member_orders
customer_pool_proxy
dingtalk_employee_raw
employee_roster
n8n_html_reports
notification
order_salesperson_snapshot
performance_verification
sales_amount_manual_input
star_subject
weike_phone_mapping
wm_order_discounts
wm_order_items
wm_order_rights
wm_orders