-- phpMyAdmin SQL Dump
-- version 4.6.6
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: 2017-03-09 15:27:45
-- 服务器版本： 10.1.21-MariaDB-1~xenial
-- PHP Version: 7.0.15-0ubuntu0.16.04.4

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `dongleerp`
--

-- --------------------------------------------------------

--
-- 表的结构 `CLD_accountItem`
--

CREATE TABLE `CLD_accountItem` (
  `aid` int(11) NOT NULL,
  `category` varchar(160) NOT NULL,
  `name` varchar(160) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_action_log`
--

CREATE TABLE `CLD_action_log` (
  `aid` int(11) NOT NULL,
  `updatetime` varchar(20) NOT NULL,
  `time` varchar(40) NOT NULL,
  `action` varchar(250) NOT NULL,
  `class` varchar(40) NOT NULL,
  `sid` int(10) NOT NULL,
  `cid` int(10) NOT NULL,
  `status` int(2) NOT NULL,
  `districtid` varchar(20) NOT NULL,
  `city` varchar(25) NOT NULL,
  `province` varchar(25) NOT NULL,
  `nature` varchar(25) NOT NULL,
  `company` varchar(160) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_client`
--

CREATE TABLE `CLD_client` (
  `cid` int(10) NOT NULL,
  `gender` varchar(2) NOT NULL,
  `nicename` varchar(40) NOT NULL,
  `qq` varchar(40) NOT NULL,
  `telephone` varchar(35) NOT NULL,
  `phone` varchar(45) NOT NULL,
  `email` varchar(80) NOT NULL,
  `clientname` varchar(40) NOT NULL,
  `keynum` varchar(160) NOT NULL,
  `companyid` int(10) NOT NULL,
  `companyname` varchar(120) NOT NULL,
  `unit` varchar(90) NOT NULL,
  `area` varchar(100) NOT NULL,
  `nature` varchar(400) NOT NULL,
  `local` varchar(35) NOT NULL,
  `fax` varchar(40) NOT NULL,
  `webservice` varchar(60) NOT NULL,
  `department` varchar(30) NOT NULL,
  `position` varchar(30) NOT NULL,
  `office` varchar(30) NOT NULL,
  `address` tinytext NOT NULL,
  `district` varchar(20) NOT NULL,
  `tag` varchar(15) NOT NULL,
  `ride` text NOT NULL,
  `stay` tinytext NOT NULL,
  `landmarks` tinytext NOT NULL,
  `mark` tinytext NOT NULL,
  `priority` int(10) NOT NULL DEFAULT '5',
  `updatetime` int(10) NOT NULL,
  `servicetime` int(10) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_client_staff`
--

CREATE TABLE `CLD_client_staff` (
  `csid` int(10) NOT NULL,
  `sid` int(10) NOT NULL,
  `cid` int(10) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_company`
--

CREATE TABLE `CLD_company` (
  `cid` int(10) NOT NULL,
  `stay` tinytext NOT NULL,
  `staffid` int(10) NOT NULL,
  `companyname` varchar(80) NOT NULL,
  `nature` varchar(600) NOT NULL,
  `local` varchar(60) NOT NULL,
  `fax` varchar(30) NOT NULL,
  `webservice` varchar(40) NOT NULL,
  `department` varchar(30) NOT NULL,
  `position` varchar(40) NOT NULL,
  `office` varchar(40) NOT NULL,
  `address` tinytext NOT NULL,
  `ride` tinytext NOT NULL,
  `district` varchar(35) NOT NULL,
  `landmarks` tinytext NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_C_tooltip`
--

CREATE TABLE `CLD_C_tooltip` (
  `tip` int(10) NOT NULL,
  `sid` int(10) NOT NULL,
  `cateid` int(10) NOT NULL,
  `name` varchar(60) NOT NULL,
  `cid` int(10) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_district`
--

CREATE TABLE `CLD_district` (
  `id` mediumint(8) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL DEFAULT '',
  `level` tinyint(4) UNSIGNED NOT NULL DEFAULT '0',
  `usetype` tinyint(1) UNSIGNED NOT NULL DEFAULT '0',
  `upid` mediumint(8) UNSIGNED NOT NULL DEFAULT '0',
  `displayorder` smallint(6) NOT NULL DEFAULT '0',
  `area` tinyint(4) NOT NULL COMMENT '所属区域'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_district_staff`
--

CREATE TABLE `CLD_district_staff` (
  `dsid` int(20) NOT NULL,
  `did` int(20) NOT NULL,
  `sid` int(20) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_eMailJournal`
--

CREATE TABLE `CLD_eMailJournal` (
  `ejid` int(10) NOT NULL,
  `clientId` int(10) NOT NULL,
  `etid` int(10) NOT NULL COMMENT '邮件模板',
  `status` int(2) NOT NULL COMMENT '邮件发送状态(0,1)',
  `date` date NOT NULL,
  `email` varchar(280) NOT NULL,
  `title` varchar(180) NOT NULL,
  `clientName` varchar(180) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_eMailList`
--

CREATE TABLE `CLD_eMailList` (
  `elid` int(11) NOT NULL,
  `clientEmail` longtext NOT NULL COMMENT '目标客户邮件列表',
  `clientEmail2` longtext NOT NULL,
  `clientEmail3` longtext NOT NULL,
  `clientName2` longtext NOT NULL,
  `clientName3` longtext NOT NULL,
  `examine` int(2) NOT NULL,
  `mark` varchar(70) NOT NULL,
  `clientName` longtext NOT NULL,
  `illegalEmail` longtext NOT NULL,
  `sendEmail` longtext NOT NULL,
  `etid` int(10) NOT NULL,
  `templateName` varchar(40) NOT NULL,
  `eTitle` tinytext NOT NULL,
  `html` text NOT NULL,
  `content` text NOT NULL,
  `info` text NOT NULL,
  `annex` text NOT NULL,
  `annexName` varchar(120) NOT NULL,
  `staffId` int(10) NOT NULL,
  `staffName` varchar(180) NOT NULL,
  `tag` tinytext NOT NULL,
  `status` int(2) NOT NULL DEFAULT '0',
  `send1` int(2) NOT NULL,
  `send2` int(2) NOT NULL,
  `send3` int(2) NOT NULL,
  `date` date NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_eMailTemplate`
--

CREATE TABLE `CLD_eMailTemplate` (
  `etid` int(10) NOT NULL,
  `staffId` int(10) NOT NULL,
  `staffName` varchar(180) NOT NULL,
  `title` tinytext NOT NULL,
  `content` text NOT NULL,
  `html` text NOT NULL,
  `skin` varchar(50) NOT NULL COMMENT '皮肤',
  `annex` varchar(180) NOT NULL COMMENT '附件',
  `annexName` varchar(120) NOT NULL,
  `tag` tinytext NOT NULL,
  `status` int(10) NOT NULL COMMENT '发送状态'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `cld_enclosur`
--

CREATE TABLE `cld_enclosur` (
  `eid` int(10) NOT NULL,
  `rid` int(10) NOT NULL,
  `name` varchar(60) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_execute`
--

CREATE TABLE `CLD_execute` (
  `eid` int(11) NOT NULL,
  `description` varchar(160) NOT NULL,
  `staff` mediumtext NOT NULL,
  `mold` varchar(160) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_executeCopy`
--

CREATE TABLE `CLD_executeCopy` (
  `ecid` int(10) NOT NULL,
  `staff` mediumtext NOT NULL,
  `eid` int(10) NOT NULL,
  `rid` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_itemStatistics`
--

CREATE TABLE `CLD_itemStatistics` (
  `sid` int(11) NOT NULL,
  `cid` int(11) NOT NULL,
  `staff` int(11) NOT NULL,
  `price` decimal(12,2) NOT NULL,
  `itemCategory` varchar(60) NOT NULL,
  `date` date NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_loanReceipt`
--

CREATE TABLE `CLD_loanReceipt` (
  `rid` int(11) NOT NULL,
  `accountItem` mediumtext NOT NULL,
  `loanItem` mediumtext NOT NULL,
  `staff` int(11) NOT NULL,
  `sum` decimal(12,2) NOT NULL,
  `loanSum` decimal(12,2) NOT NULL,
  `date` date NOT NULL,
  `pastDate` date NOT NULL,
  `cid` int(11) NOT NULL COMMENT '办事处',
  `status` int(11) NOT NULL COMMENT '1同意2审批中3退回4编辑',
  `Rtype` int(2) NOT NULL COMMENT '报销单类型',
  `reviseDetail` text NOT NULL,
  `revisePrice` decimal(12,2) NOT NULL,
  `receiptOrder` varchar(60) NOT NULL,
  `verify` varchar(400) NOT NULL,
  `verifyStaff` text NOT NULL COMMENT 'status ：1同意 3不同意 4等待',
  `nowStaff` varchar(20) NOT NULL,
  `verifyBreakup` text NOT NULL,
  `explanation` text NOT NULL,
  `notice` int(2) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_longle`
--

CREATE TABLE `CLD_longle` (
  `lid` int(10) NOT NULL,
  `year` int(10) NOT NULL,
  `cid` int(10) NOT NULL,
  `category` varchar(80) NOT NULL,
  `status` int(10) NOT NULL DEFAULT '1' COMMENT '1:生成 2:接收 3:借出 4:销售 5:升级 6:更换 7:收回',
  `statuslog` varchar(25) NOT NULL,
  `statusT` varchar(30) NOT NULL,
  `key_num` varchar(20) NOT NULL,
  `SerialNumber` varchar(120) NOT NULL,
  `product` varchar(40) NOT NULL,
  `alloted_time` varchar(35) NOT NULL,
  `product_id` int(11) NOT NULL,
  `make_day` varchar(60) NOT NULL,
  `responsible` varchar(40) NOT NULL,
  `version` varchar(80) NOT NULL,
  `client` varchar(40) NOT NULL,
  `clientid` int(10) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_longlelog`
--

CREATE TABLE `CLD_longlelog` (
  `logid` int(10) NOT NULL,
  `lid` int(10) NOT NULL,
  `status` int(10) NOT NULL COMMENT '8:备注',
  `statusT` varchar(30) NOT NULL,
  `sell_client` varchar(40) NOT NULL,
  `client` varchar(40) NOT NULL,
  `clientid` int(10) NOT NULL,
  `responsible` varchar(40) NOT NULL COMMENT '责任员',
  `operator` varchar(40) NOT NULL COMMENT '操作员',
  `product_id` int(10) NOT NULL,
  `product` varchar(50) NOT NULL,
  `category` varchar(40) NOT NULL COMMENT '办事处',
  `new_key_num` varchar(60) NOT NULL,
  `mark` varchar(500) NOT NULL,
  `dateline` varchar(60) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_L_category`
--

CREATE TABLE `CLD_L_category` (
  `cid` int(10) NOT NULL,
  `title` varchar(60) NOT NULL,
  `defult` int(11) NOT NULL,
  `districtid` int(10) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_office_area`
--

CREATE TABLE `CLD_office_area` (
  `oaid` int(10) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_product`
--

CREATE TABLE `CLD_product` (
  `pid` int(10) NOT NULL,
  `title` varchar(60) NOT NULL,
  `typeid` int(2) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_receipt`
--

CREATE TABLE `CLD_receipt` (
  `rid` int(11) NOT NULL,
  `accountItem` mediumtext NOT NULL,
  `loanItem` mediumtext NOT NULL,
  `staff` int(11) NOT NULL,
  `sum` decimal(12,2) NOT NULL,
  `loanSum` decimal(10,0) NOT NULL,
  `date` date NOT NULL,
  `pastDate` date NOT NULL,
  `executeDate` date NOT NULL,
  `cid` int(11) NOT NULL COMMENT '办事处',
  `status` int(11) NOT NULL COMMENT '1同意2审批中3退回4编辑',
  `Rtype` int(2) NOT NULL,
  `isBK` int(2) NOT NULL,
  `reviseDetail` text NOT NULL,
  `revisePrice` decimal(12,2) NOT NULL,
  `receiptOrder` varchar(60) NOT NULL,
  `verify` varchar(400) NOT NULL,
  `verifyStaff` text NOT NULL COMMENT 'status ：1同意 3不同意 4等待',
  `nowStaff` varchar(20) NOT NULL,
  `execute` int(11) NOT NULL,
  `executeStaff` text NOT NULL,
  `executeCopy` mediumtext NOT NULL,
  `verifyBreakup` text NOT NULL,
  `explanation` text NOT NULL,
  `implementOpinions` tinytext NOT NULL,
  `notice` int(2) NOT NULL DEFAULT '0',
  `loanRid` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_receiptDetail`
--

CREATE TABLE `CLD_receiptDetail` (
  `rdid` int(11) NOT NULL,
  `staff` int(11) NOT NULL,
  `item` varchar(160) NOT NULL,
  `itemCategory` varchar(160) NOT NULL,
  `price` decimal(12,2) NOT NULL,
  `date` date NOT NULL,
  `pastDate` date NOT NULL,
  `cid` int(11) NOT NULL COMMENT '办事处',
  `rid` int(11) NOT NULL COMMENT '报销单据ID',
  `status` int(11) NOT NULL COMMENT '1同意支付，2审批中，3退回4编辑'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_receiptLog`
--

CREATE TABLE `CLD_receiptLog` (
  `rlid` int(11) NOT NULL,
  `username` varchar(160) NOT NULL,
  `uid` int(11) NOT NULL,
  `date` varchar(60) NOT NULL,
  `opinion` varchar(260) NOT NULL,
  `rolename` varchar(160) NOT NULL,
  `img` varchar(160) NOT NULL,
  `rid` int(11) NOT NULL,
  `status` int(3) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_remind`
--

CREATE TABLE `CLD_remind` (
  `rid` int(10) NOT NULL,
  `day` int(4) NOT NULL,
  `remark` varchar(180) NOT NULL,
  `status` int(2) NOT NULL DEFAULT '0' COMMENT '1:不需要提醒',
  `time` varchar(40) NOT NULL,
  `staffID` int(10) NOT NULL,
  `clientName` varchar(80) NOT NULL,
  `clientID` int(10) NOT NULL,
  `companyName` varchar(80) NOT NULL,
  `companyID` int(10) NOT NULL,
  `class` varchar(30) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_role`
--

CREATE TABLE `CLD_role` (
  `rid` int(11) NOT NULL,
  `name` varchar(160) NOT NULL,
  `staff` mediumtext NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_service_log`
--

CREATE TABLE `CLD_service_log` (
  `slid` int(10) NOT NULL,
  `status` int(11) NOT NULL,
  `mark` text NOT NULL,
  `date` date NOT NULL,
  `category` varchar(40) NOT NULL,
  `clientid` int(11) NOT NULL,
  `staffname` varchar(60) NOT NULL,
  `staffid` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_sms`
--

CREATE TABLE `CLD_sms` (
  `sid` int(10) NOT NULL,
  `title` varchar(160) NOT NULL,
  `content` text NOT NULL,
  `signature` varchar(30) NOT NULL COMMENT '签名',
  `client` longtext NOT NULL COMMENT '目标发送者',
  `illegal` longtext NOT NULL COMMENT '非法',
  `status` int(11) NOT NULL COMMENT '1待审核2已审核3已发送',
  `kind` int(2) NOT NULL,
  `mark` varchar(160) NOT NULL,
  `tag` varchar(60) NOT NULL,
  `districtId` int(10) NOT NULL DEFAULT '0',
  `category` varchar(40) NOT NULL,
  `staffId` int(20) NOT NULL,
  `staffName` varchar(60) NOT NULL,
  `errorInfo` varchar(60) NOT NULL,
  `date` varchar(20) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_staff`
--

CREATE TABLE `CLD_staff` (
  `sid` int(10) NOT NULL,
  `isadmin` int(3) NOT NULL DEFAULT '0',
  `username` varchar(60) NOT NULL COMMENT '公司员工',
  `passwork` varchar(60) NOT NULL,
  `cid` int(11) NOT NULL COMMENT '办事处ＩＤ',
  `othercid` varchar(40) NOT NULL,
  `category` varchar(40) NOT NULL,
  `othercategory` varchar(80) NOT NULL,
  `gender` varchar(2) NOT NULL,
  `qq` varchar(15) NOT NULL,
  `phone` varchar(35) NOT NULL,
  `telephone` varchar(35) NOT NULL,
  `email` varchar(80) NOT NULL,
  `avatar` varchar(600) NOT NULL DEFAULT '/global/img/avtra',
  `birthday` varchar(60) NOT NULL,
  `position` varchar(30) NOT NULL,
  `appDate` varchar(40) NOT NULL,
  `hiredate` varchar(15) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '入职时间',
  `nature` tinyint(2) UNSIGNED NOT NULL DEFAULT '1' COMMENT '员工性质，1为正式员工，2为实习生',
  `wxid` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '微信id'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_staffDynamic`
--

CREATE TABLE `CLD_staffDynamic` (
  `sdid` int(10) NOT NULL,
  `content` varchar(250) NOT NULL,
  `time` int(16) NOT NULL,
  `category` varchar(16) NOT NULL,
  `cid` int(10) NOT NULL,
  `sid` int(10) NOT NULL,
  `staff` varchar(30) NOT NULL,
  `status` int(10) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_statistics`
--

CREATE TABLE `CLD_statistics` (
  `sid` int(11) NOT NULL,
  `date` date NOT NULL COMMENT '年月',
  `cid` int(11) NOT NULL,
  `staff` int(11) NOT NULL,
  `agPrice` decimal(12,2) NOT NULL,
  `rePrice` decimal(12,2) NOT NULL COMMENT '总金额'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_tag`
--

CREATE TABLE `CLD_tag` (
  `tid` int(11) NOT NULL,
  `name` varchar(80) NOT NULL,
  `sid` int(10) NOT NULL COMMENT '用户ID',
  `colorid` int(10) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_tagCompany`
--

CREATE TABLE `CLD_tagCompany` (
  `tid` int(11) NOT NULL,
  `name` varchar(80) NOT NULL,
  `sid` int(10) NOT NULL COMMENT '用户ID',
  `colorid` int(10) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_tagCompanyNexus`
--

CREATE TABLE `CLD_tagCompanyNexus` (
  `tcid` int(11) NOT NULL,
  `sid` int(10) NOT NULL,
  `company` int(10) NOT NULL,
  `tag` varchar(80) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_tag_client`
--

CREATE TABLE `CLD_tag_client` (
  `tcid` int(11) NOT NULL,
  `sid` int(10) NOT NULL,
  `client` int(10) NOT NULL,
  `tag` varchar(80) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `CLD_verify`
--

CREATE TABLE `CLD_verify` (
  `vid` int(11) NOT NULL,
  `description` varchar(160) NOT NULL,
  `staff` mediumtext NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `holiday_acman`
--

CREATE TABLE `holiday_acman` (
  `id` int(11) UNSIGNED NOT NULL,
  `typename` varchar(60) COLLATE utf8_unicode_ci NOT NULL COMMENT '组名字',
  `idname` varchar(500) COLLATE utf8_unicode_ci NOT NULL COMMENT '名字id，以,分隔',
  `name` varchar(500) COLLATE utf8_unicode_ci NOT NULL COMMENT '名字，以空格分隔',
  `pinyinname` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '拼音名字，多个人以|号分隔',
  `type` tinyint(1) UNSIGNED NOT NULL COMMENT '1：审批组，2：抄送组'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='假期审批组和抄送人组';

-- --------------------------------------------------------

--
-- 表的结构 `holiday_approval`
--

CREATE TABLE `holiday_approval` (
  `id` int(11) UNSIGNED NOT NULL,
  `hid` int(11) UNSIGNED NOT NULL COMMENT '请假申请表的id',
  `aid` int(11) UNSIGNED NOT NULL COMMENT '审批人id',
  `aname` varchar(30) COLLATE utf8_unicode_ci NOT NULL COMMENT '审批人名字',
  `status` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '审批结果，1：审批通过，2：审批不通过，0（默认）：未审批',
  `approvetime` varchar(15) COLLATE utf8_unicode_ci NOT NULL COMMENT '审批时间',
  `description` varchar(5000) COLLATE utf8_unicode_ci NOT NULL COMMENT '审批回复内容'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='假期审批表';

-- --------------------------------------------------------

--
-- 表的结构 `holiday_day`
--

CREATE TABLE `holiday_day` (
  `id` int(11) UNSIGNED NOT NULL,
  `hid` int(11) UNSIGNED NOT NULL COMMENT '假期id',
  `uid` int(11) UNSIGNED NOT NULL COMMENT '申请人id',
  `type` smallint(4) UNSIGNED NOT NULL COMMENT '类型',
  `daytime` varchar(15) COLLATE utf8_unicode_ci NOT NULL COMMENT '日期',
  `daymsg` decimal(10,1) UNSIGNED NOT NULL COMMENT '当天性质，1为整天，0.5为半天'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='假期日期记录表';

-- --------------------------------------------------------

--
-- 表的结构 `holiday_msg`
--

CREATE TABLE `holiday_msg` (
  `id` int(11) UNSIGNED NOT NULL,
  `uid` int(11) UNSIGNED NOT NULL COMMENT '发起人id',
  `aid` smallint(4) UNSIGNED NOT NULL COMMENT '审批组id',
  `cid` smallint(4) UNSIGNED NOT NULL COMMENT '抄送组id',
  `type` smallint(4) UNSIGNED NOT NULL COMMENT '类型',
  `starttime` varchar(30) COLLATE utf8_unicode_ci NOT NULL COMMENT '开始时间',
  `endtime` varchar(30) COLLATE utf8_unicode_ci NOT NULL COMMENT '结束时间',
  `dayjson` varchar(5000) COLLATE utf8_unicode_ci NOT NULL COMMENT '假期日期',
  `daynum` decimal(10,1) UNSIGNED NOT NULL COMMENT '假期天数',
  `status` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '审批类型，1：审批通过，2：审批不通过，0（默认）：未审批',
  `addtime` varchar(15) COLLATE utf8_unicode_ci NOT NULL COMMENT '提交时间',
  `approvetime` varchar(15) COLLATE utf8_unicode_ci NOT NULL COMMENT '审批时间',
  `description` varchar(5000) COLLATE utf8_unicode_ci NOT NULL COMMENT '申请内容'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='假期申请与审批';

-- --------------------------------------------------------

--
-- 表的结构 `holiday_staff`
--

CREATE TABLE `holiday_staff` (
  `uid` int(11) UNSIGNED NOT NULL COMMENT '员工id',
  `yearnum` decimal(10,1) UNSIGNED NOT NULL DEFAULT '0.0' COMMENT '年假数目',
  `hadyear` smallint(2) UNSIGNED NOT NULL DEFAULT '0' COMMENT '在职年份',
  `addnum` decimal(10,1) UNSIGNED NOT NULL DEFAULT '0.0' COMMENT '加值班存假数目',
  `othernum` decimal(10,1) UNSIGNED NOT NULL DEFAULT '0.0' COMMENT '其它假期数目（后台手动输入）',
  `isadmin` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否是审批人，1：是，0否'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='员工假期表';

-- --------------------------------------------------------

--
-- 表的结构 `holiday_type`
--

CREATE TABLE `holiday_type` (
  `id` int(11) UNSIGNED NOT NULL,
  `name` varchar(10) COLLATE utf8_unicode_ci NOT NULL COMMENT '名称'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='假期类型';

--
-- Indexes for dumped tables
--

--
-- Indexes for table `CLD_accountItem`
--
ALTER TABLE `CLD_accountItem`
  ADD PRIMARY KEY (`aid`),
  ADD UNIQUE KEY `aid` (`aid`),
  ADD UNIQUE KEY `aid_2` (`aid`);

--
-- Indexes for table `CLD_action_log`
--
ALTER TABLE `CLD_action_log`
  ADD PRIMARY KEY (`aid`),
  ADD UNIQUE KEY `aid` (`aid`),
  ADD KEY `sid` (`sid`),
  ADD KEY `updatetime` (`updatetime`),
  ADD KEY `status` (`status`);

--
-- Indexes for table `CLD_client`
--
ALTER TABLE `CLD_client`
  ADD PRIMARY KEY (`cid`),
  ADD UNIQUE KEY `cid` (`cid`),
  ADD KEY `cid_2` (`cid`),
  ADD KEY `servicetime` (`servicetime`),
  ADD KEY `updatetime` (`updatetime`),
  ADD KEY `cid_3` (`cid`),
  ADD KEY `cid_4` (`cid`);

--
-- Indexes for table `CLD_client_staff`
--
ALTER TABLE `CLD_client_staff`
  ADD PRIMARY KEY (`csid`),
  ADD UNIQUE KEY `csid` (`csid`),
  ADD KEY `sid` (`sid`);

--
-- Indexes for table `CLD_company`
--
ALTER TABLE `CLD_company`
  ADD PRIMARY KEY (`cid`),
  ADD UNIQUE KEY `cid` (`cid`),
  ADD KEY `cid_2` (`cid`);

--
-- Indexes for table `CLD_C_tooltip`
--
ALTER TABLE `CLD_C_tooltip`
  ADD PRIMARY KEY (`tip`),
  ADD UNIQUE KEY `tip` (`tip`),
  ADD KEY `tip_2` (`tip`),
  ADD KEY `cid` (`cid`);

--
-- Indexes for table `CLD_district`
--
ALTER TABLE `CLD_district`
  ADD PRIMARY KEY (`id`),
  ADD KEY `upid` (`upid`,`displayorder`),
  ADD KEY `level` (`level`),
  ADD KEY `level_2` (`level`);

--
-- Indexes for table `CLD_district_staff`
--
ALTER TABLE `CLD_district_staff`
  ADD PRIMARY KEY (`dsid`);

--
-- Indexes for table `CLD_eMailJournal`
--
ALTER TABLE `CLD_eMailJournal`
  ADD PRIMARY KEY (`ejid`),
  ADD UNIQUE KEY `ejid` (`ejid`),
  ADD KEY `ejid_2` (`ejid`),
  ADD KEY `ejid_3` (`ejid`);

--
-- Indexes for table `CLD_eMailList`
--
ALTER TABLE `CLD_eMailList`
  ADD PRIMARY KEY (`elid`),
  ADD UNIQUE KEY `elid` (`elid`),
  ADD KEY `elid_2` (`elid`);

--
-- Indexes for table `CLD_eMailTemplate`
--
ALTER TABLE `CLD_eMailTemplate`
  ADD PRIMARY KEY (`etid`),
  ADD UNIQUE KEY `etid` (`etid`),
  ADD KEY `etid_2` (`etid`);

--
-- Indexes for table `cld_enclosur`
--
ALTER TABLE `cld_enclosur`
  ADD PRIMARY KEY (`eid`),
  ADD UNIQUE KEY `eid` (`eid`);

--
-- Indexes for table `CLD_execute`
--
ALTER TABLE `CLD_execute`
  ADD PRIMARY KEY (`eid`);

--
-- Indexes for table `CLD_executeCopy`
--
ALTER TABLE `CLD_executeCopy`
  ADD PRIMARY KEY (`ecid`);

--
-- Indexes for table `CLD_itemStatistics`
--
ALTER TABLE `CLD_itemStatistics`
  ADD PRIMARY KEY (`sid`),
  ADD UNIQUE KEY `sid` (`sid`);

--
-- Indexes for table `CLD_loanReceipt`
--
ALTER TABLE `CLD_loanReceipt`
  ADD PRIMARY KEY (`rid`);

--
-- Indexes for table `CLD_longle`
--
ALTER TABLE `CLD_longle`
  ADD PRIMARY KEY (`lid`),
  ADD UNIQUE KEY `lid` (`lid`),
  ADD KEY `cid` (`cid`),
  ADD KEY `status` (`status`);

--
-- Indexes for table `CLD_longlelog`
--
ALTER TABLE `CLD_longlelog`
  ADD PRIMARY KEY (`logid`),
  ADD UNIQUE KEY `logid` (`logid`);

--
-- Indexes for table `CLD_L_category`
--
ALTER TABLE `CLD_L_category`
  ADD PRIMARY KEY (`cid`);

--
-- Indexes for table `CLD_office_area`
--
ALTER TABLE `CLD_office_area`
  ADD PRIMARY KEY (`oaid`);

--
-- Indexes for table `CLD_product`
--
ALTER TABLE `CLD_product`
  ADD PRIMARY KEY (`pid`);

--
-- Indexes for table `CLD_receipt`
--
ALTER TABLE `CLD_receipt`
  ADD PRIMARY KEY (`rid`);

--
-- Indexes for table `CLD_receiptDetail`
--
ALTER TABLE `CLD_receiptDetail`
  ADD PRIMARY KEY (`rdid`),
  ADD UNIQUE KEY `rdid` (`rdid`),
  ADD UNIQUE KEY `rdid_2` (`rdid`);

--
-- Indexes for table `CLD_receiptLog`
--
ALTER TABLE `CLD_receiptLog`
  ADD PRIMARY KEY (`rlid`);

--
-- Indexes for table `CLD_remind`
--
ALTER TABLE `CLD_remind`
  ADD PRIMARY KEY (`rid`);

--
-- Indexes for table `CLD_role`
--
ALTER TABLE `CLD_role`
  ADD PRIMARY KEY (`rid`),
  ADD UNIQUE KEY `rid` (`rid`),
  ADD KEY `rid_2` (`rid`);

--
-- Indexes for table `CLD_service_log`
--
ALTER TABLE `CLD_service_log`
  ADD PRIMARY KEY (`slid`);

--
-- Indexes for table `CLD_sms`
--
ALTER TABLE `CLD_sms`
  ADD PRIMARY KEY (`sid`);

--
-- Indexes for table `CLD_staff`
--
ALTER TABLE `CLD_staff`
  ADD PRIMARY KEY (`sid`),
  ADD KEY `nature` (`nature`),
  ADD KEY `wxid` (`wxid`);

--
-- Indexes for table `CLD_staffDynamic`
--
ALTER TABLE `CLD_staffDynamic`
  ADD PRIMARY KEY (`sdid`);

--
-- Indexes for table `CLD_statistics`
--
ALTER TABLE `CLD_statistics`
  ADD PRIMARY KEY (`sid`),
  ADD UNIQUE KEY `sid` (`sid`),
  ADD KEY `sid_2` (`sid`),
  ADD KEY `cid` (`cid`),
  ADD KEY `staff` (`staff`);

--
-- Indexes for table `CLD_tag`
--
ALTER TABLE `CLD_tag`
  ADD PRIMARY KEY (`tid`);

--
-- Indexes for table `CLD_tagCompany`
--
ALTER TABLE `CLD_tagCompany`
  ADD PRIMARY KEY (`tid`);

--
-- Indexes for table `CLD_tagCompanyNexus`
--
ALTER TABLE `CLD_tagCompanyNexus`
  ADD PRIMARY KEY (`tcid`),
  ADD UNIQUE KEY `tcid` (`tcid`),
  ADD KEY `company` (`company`);

--
-- Indexes for table `CLD_tag_client`
--
ALTER TABLE `CLD_tag_client`
  ADD PRIMARY KEY (`tcid`),
  ADD UNIQUE KEY `tcid` (`tcid`),
  ADD KEY `client` (`client`);

--
-- Indexes for table `CLD_verify`
--
ALTER TABLE `CLD_verify`
  ADD PRIMARY KEY (`vid`);

--
-- Indexes for table `holiday_acman`
--
ALTER TABLE `holiday_acman`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `holiday_approval`
--
ALTER TABLE `holiday_approval`
  ADD PRIMARY KEY (`id`),
  ADD KEY `hid` (`hid`);

--
-- Indexes for table `holiday_day`
--
ALTER TABLE `holiday_day`
  ADD PRIMARY KEY (`id`),
  ADD KEY `uid` (`uid`,`type`,`daytime`),
  ADD KEY `hid` (`hid`);

--
-- Indexes for table `holiday_msg`
--
ALTER TABLE `holiday_msg`
  ADD PRIMARY KEY (`id`),
  ADD KEY `uid` (`uid`,`aid`,`type`);

--
-- Indexes for table `holiday_staff`
--
ALTER TABLE `holiday_staff`
  ADD PRIMARY KEY (`uid`),
  ADD KEY `yearnum` (`yearnum`,`addnum`,`othernum`),
  ADD KEY `isadmin` (`isadmin`);

--
-- Indexes for table `holiday_type`
--
ALTER TABLE `holiday_type`
  ADD PRIMARY KEY (`id`);

--
-- 在导出的表使用AUTO_INCREMENT
--

--
-- 使用表AUTO_INCREMENT `CLD_accountItem`
--
ALTER TABLE `CLD_accountItem`
  MODIFY `aid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=32;
--
-- 使用表AUTO_INCREMENT `CLD_action_log`
--
ALTER TABLE `CLD_action_log`
  MODIFY `aid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=366440;
--
-- 使用表AUTO_INCREMENT `CLD_client`
--
ALTER TABLE `CLD_client`
  MODIFY `cid` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=77126;
--
-- 使用表AUTO_INCREMENT `CLD_client_staff`
--
ALTER TABLE `CLD_client_staff`
  MODIFY `csid` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=77970;
--
-- 使用表AUTO_INCREMENT `CLD_company`
--
ALTER TABLE `CLD_company`
  MODIFY `cid` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23273;
--
-- 使用表AUTO_INCREMENT `CLD_C_tooltip`
--
ALTER TABLE `CLD_C_tooltip`
  MODIFY `tip` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5418;
--
-- 使用表AUTO_INCREMENT `CLD_district`
--
ALTER TABLE `CLD_district`
  MODIFY `id` mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=45098;
--
-- 使用表AUTO_INCREMENT `CLD_district_staff`
--
ALTER TABLE `CLD_district_staff`
  MODIFY `dsid` int(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=77126;
--
-- 使用表AUTO_INCREMENT `CLD_eMailJournal`
--
ALTER TABLE `CLD_eMailJournal`
  MODIFY `ejid` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=225209;
--
-- 使用表AUTO_INCREMENT `CLD_eMailList`
--
ALTER TABLE `CLD_eMailList`
  MODIFY `elid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=349;
--
-- 使用表AUTO_INCREMENT `CLD_eMailTemplate`
--
ALTER TABLE `CLD_eMailTemplate`
  MODIFY `etid` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=423;
--
-- 使用表AUTO_INCREMENT `cld_enclosur`
--
ALTER TABLE `cld_enclosur`
  MODIFY `eid` int(10) NOT NULL AUTO_INCREMENT;
--
-- 使用表AUTO_INCREMENT `CLD_execute`
--
ALTER TABLE `CLD_execute`
  MODIFY `eid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- 使用表AUTO_INCREMENT `CLD_executeCopy`
--
ALTER TABLE `CLD_executeCopy`
  MODIFY `ecid` int(10) NOT NULL AUTO_INCREMENT;
--
-- 使用表AUTO_INCREMENT `CLD_itemStatistics`
--
ALTER TABLE `CLD_itemStatistics`
  MODIFY `sid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7283;
--
-- 使用表AUTO_INCREMENT `CLD_loanReceipt`
--
ALTER TABLE `CLD_loanReceipt`
  MODIFY `rid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
--
-- 使用表AUTO_INCREMENT `CLD_longle`
--
ALTER TABLE `CLD_longle`
  MODIFY `lid` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=37438;
--
-- 使用表AUTO_INCREMENT `CLD_longlelog`
--
ALTER TABLE `CLD_longlelog`
  MODIFY `logid` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=106415;
--
-- 使用表AUTO_INCREMENT `CLD_L_category`
--
ALTER TABLE `CLD_L_category`
  MODIFY `cid` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=34;
--
-- 使用表AUTO_INCREMENT `CLD_office_area`
--
ALTER TABLE `CLD_office_area`
  MODIFY `oaid` int(10) NOT NULL AUTO_INCREMENT;
--
-- 使用表AUTO_INCREMENT `CLD_product`
--
ALTER TABLE `CLD_product`
  MODIFY `pid` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=61;
--
-- 使用表AUTO_INCREMENT `CLD_receipt`
--
ALTER TABLE `CLD_receipt`
  MODIFY `rid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2343;
--
-- 使用表AUTO_INCREMENT `CLD_receiptDetail`
--
ALTER TABLE `CLD_receiptDetail`
  MODIFY `rdid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10346;
--
-- 使用表AUTO_INCREMENT `CLD_receiptLog`
--
ALTER TABLE `CLD_receiptLog`
  MODIFY `rlid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=306;
--
-- 使用表AUTO_INCREMENT `CLD_remind`
--
ALTER TABLE `CLD_remind`
  MODIFY `rid` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=547;
--
-- 使用表AUTO_INCREMENT `CLD_role`
--
ALTER TABLE `CLD_role`
  MODIFY `rid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
--
-- 使用表AUTO_INCREMENT `CLD_service_log`
--
ALTER TABLE `CLD_service_log`
  MODIFY `slid` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=194013;
--
-- 使用表AUTO_INCREMENT `CLD_sms`
--
ALTER TABLE `CLD_sms`
  MODIFY `sid` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=53;
--
-- 使用表AUTO_INCREMENT `CLD_staff`
--
ALTER TABLE `CLD_staff`
  MODIFY `sid` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=97;
--
-- 使用表AUTO_INCREMENT `CLD_staffDynamic`
--
ALTER TABLE `CLD_staffDynamic`
  MODIFY `sdid` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=400;
--
-- 使用表AUTO_INCREMENT `CLD_statistics`
--
ALTER TABLE `CLD_statistics`
  MODIFY `sid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1096;
--
-- 使用表AUTO_INCREMENT `CLD_tag`
--
ALTER TABLE `CLD_tag`
  MODIFY `tid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=666;
--
-- 使用表AUTO_INCREMENT `CLD_tagCompany`
--
ALTER TABLE `CLD_tagCompany`
  MODIFY `tid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=904;
--
-- 使用表AUTO_INCREMENT `CLD_tagCompanyNexus`
--
ALTER TABLE `CLD_tagCompanyNexus`
  MODIFY `tcid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=239;
--
-- 使用表AUTO_INCREMENT `CLD_tag_client`
--
ALTER TABLE `CLD_tag_client`
  MODIFY `tcid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=36508;
--
-- 使用表AUTO_INCREMENT `CLD_verify`
--
ALTER TABLE `CLD_verify`
  MODIFY `vid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=45;
--
-- 使用表AUTO_INCREMENT `holiday_acman`
--
ALTER TABLE `holiday_acman`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- 使用表AUTO_INCREMENT `holiday_approval`
--
ALTER TABLE `holiday_approval`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=30;
--
-- 使用表AUTO_INCREMENT `holiday_day`
--
ALTER TABLE `holiday_day`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
--
-- 使用表AUTO_INCREMENT `holiday_msg`
--
ALTER TABLE `holiday_msg`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;
--
-- 使用表AUTO_INCREMENT `holiday_type`
--
ALTER TABLE `holiday_type`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
