libra_bot_c_agent.sql 4.6 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. create table c_agent
  2. (
  3. id bigint unsigned auto_increment comment '主键'
  4. primary key,
  5. saas_id varchar(16) default '' not null comment '租户隔离',
  6. agent_num varchar(32) default '' not null comment '坐席工号',
  7. agent_name varchar(32) default '' not null comment '坐席姓名',
  8. out_id varchar(32) default '' not null comment '外部id',
  9. agent_pwd varchar(64) default '' not null comment '坐席密码',
  10. agent_type tinyint default 0 not null comment '坐席类型 0:普通坐席 ;1:组长:2:主管',
  11. phone_num varchar(32) default '0' not null comment '分机号',
  12. distribute tinyint default 1 not null comment '分配标志 0:不参与排队;1:参与排队',
  13. agent_state tinyint default 0 not null comment '账号状态 0:可用;1:禁用',
  14. identity_type tinyint default 0 not null comment '身份标识',
  15. is_delete tinyint default 0 not null comment '删除标识',
  16. update_time timestamp default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '更新时间',
  17. create_time timestamp default CURRENT_TIMESTAMP not null comment '创建时间',
  18. constraint uniq_vcc_id_agent_num
  19. unique (saas_id, agent_num)
  20. )
  21. comment '坐席信息表';
  22. create index idx_vcc_id_out_id
  23. on c_agent (saas_id, out_id);
  24. create index idx_vcc_id_phone_num
  25. on c_agent (saas_id, phone_num);
  26. INSERT INTO libra_bot.c_agent (id, saas_id, agent_num, agent_name, out_id, agent_pwd, agent_type, phone_num, distribute, agent_state, identity_type, is_delete, update_time, create_time) VALUES (1, 'mdj', '1000', 'user0', '1000', '123456', 0, '1000', 1, 0, 0, 0, '2024-10-08 16:50:08', '2024-10-08 16:46:31');
  27. INSERT INTO libra_bot.c_agent (id, saas_id, agent_num, agent_name, out_id, agent_pwd, agent_type, phone_num, distribute, agent_state, identity_type, is_delete, update_time, create_time) VALUES (3, 'mdj', '1001', 'user1', '1001', '123456', 0, '1001', 1, 0, 0, 0, '2024-10-08 16:50:08', '2024-10-08 16:49:10');
  28. INSERT INTO libra_bot.c_agent (id, saas_id, agent_num, agent_name, out_id, agent_pwd, agent_type, phone_num, distribute, agent_state, identity_type, is_delete, update_time, create_time) VALUES (4, 'mdj', '1002', 'user2', '1002', '123456', 0, '1002', 1, 0, 0, 0, '2024-10-08 16:50:08', '2024-10-08 16:49:10');
  29. INSERT INTO libra_bot.c_agent (id, saas_id, agent_num, agent_name, out_id, agent_pwd, agent_type, phone_num, distribute, agent_state, identity_type, is_delete, update_time, create_time) VALUES (5, 'mdj', '1003', 'user3', '1003', '123456', 0, '1003', 1, 0, 0, 0, '2024-10-08 16:50:08', '2024-10-08 16:49:10');
  30. INSERT INTO libra_bot.c_agent (id, saas_id, agent_num, agent_name, out_id, agent_pwd, agent_type, phone_num, distribute, agent_state, identity_type, is_delete, update_time, create_time) VALUES (6, 'mdj', '1004', 'user4', '1004', '123456', 0, '1004', 1, 0, 0, 0, '2024-10-08 16:50:08', '2024-10-08 16:49:10');
  31. INSERT INTO libra_bot.c_agent (id, saas_id, agent_num, agent_name, out_id, agent_pwd, agent_type, phone_num, distribute, agent_state, identity_type, is_delete, update_time, create_time) VALUES (7, 'mdj', '1005', 'user5', '1005', '123456', 0, '1005', 1, 0, 0, 0, '2024-10-08 16:50:08', '2024-10-08 16:49:10');
  32. INSERT INTO libra_bot.c_agent (id, saas_id, agent_num, agent_name, out_id, agent_pwd, agent_type, phone_num, distribute, agent_state, identity_type, is_delete, update_time, create_time) VALUES (8, 'mdj', '1006', 'user6', '1006', '123456', 0, '1006', 1, 0, 0, 0, '2024-10-08 16:50:08', '2024-10-08 16:49:10');
  33. INSERT INTO libra_bot.c_agent (id, saas_id, agent_num, agent_name, out_id, agent_pwd, agent_type, phone_num, distribute, agent_state, identity_type, is_delete, update_time, create_time) VALUES (9, 'mdj', '1007', 'user7', '1007', '123456', 0, '1007', 1, 0, 0, 0, '2024-10-08 16:50:08', '2024-10-08 16:49:10');
  34. INSERT INTO libra_bot.c_agent (id, saas_id, agent_num, agent_name, out_id, agent_pwd, agent_type, phone_num, distribute, agent_state, identity_type, is_delete, update_time, create_time) VALUES (10, 'mdj', '1008', 'user8', '1008', '123456', 0, '1008', 1, 0, 0, 0, '2024-10-08 16:50:08', '2024-10-08 16:49:10');
  35. INSERT INTO libra_bot.c_agent (id, saas_id, agent_num, agent_name, out_id, agent_pwd, agent_type, phone_num, distribute, agent_state, identity_type, is_delete, update_time, create_time) VALUES (11, 'mdj', '1009', 'user9', '1009', '123456', 0, '1009', 1, 0, 0, 0, '2024-10-08 16:50:08', '2024-10-08 16:49:10');