-- http://www.phpmyadmin.net
--




--
-- Database: `alicia_r_demo`
--

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

--
-- Table structure for table `access_list`
--

CREATE TABLE IF NOT EXISTS `access_list` (
  `access_key` char(32) NOT NULL,
  `access_name` varchar(256) NOT NULL,
  `access_detail` text NOT NULL,
  `access_status` tinyint(1) NOT NULL,
  `access_group` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `access_list`
--

INSERT INTO `access_list` (`access_key`, `access_name`, `access_detail`, `access_status`, `access_group`) VALUES
('0d0c8a1e35744ff2b82698b68907231e', 'รายงาน >> แสดงรายงานทั่วไป', 'รายงาน >> แสดงรายงานทั่วไป', 1, 1),
('0dd4ee8ead7fea4f3e212a716446f490', 'ทันตแพทย์ >> ห้องตรวจ', 'ทันตแพทย์ >> ห้องตรวจ', 1, 2),
('1a564b7440e3db290cecade17ee31a58', 'การนัดหมาย >> แสดงการนัดหมาย', 'การนัดหมาย >> แสดงการนัดหมาย', 1, 1),
('2e13c9cc43f1c2e9127e1b7d6e46689a', 'ทันตแพทย์ >> แสดงประวัติผู้รับบริการที่เคยรักษา', 'ทันตแพทย์ >> แสดงประวัติผู้รับบริการที่เคยรักษา', 1, 2),
('33ae817a098658d00b65a896151a30f2', 'รายงาน >> รายงานรายได้ (สรรพากร)', 'รายงาน >> รายงานรายได้ (สรรพากร)', 0, 1),
('3597c88b7c302d3c7d5fd103c098bdb5', 'ทันตแพทย์ >> แสดงตารางนัดหมาย', 'ทันตแพทย์ >> แสดงตารางนัดหมาย', 1, 2),
('3a2064f5824b7a97cbbbb1f61f150b12', 'การนัดหมาย >> เพิ่ม ลบ แก้ไข ข้อมูลการนัดหมาย', 'การนัดหมาย >> เพิ่ม ลบ แก้ไข ข้อมูลการนัดหมาย', 1, 1),
('3c600d8b527f684c404c70387468b48b', 'การจัดการ >> เข้าถึงการจัดการข้อมูลเงินเดือนพนักงาน', 'การจัดการ >> เข้าถึงการจัดการข้อมูลเงินเดือนพนักงาน', 1, 1),
('47c5d634e86d6bdb53d2dea5e0e53053', 'การจัดการ >> แสดงข้อมูลการจัดการ', 'การจัดการ >> แสดงข้อมูลการจัดการ', 1, 1),
('487eb2dc82ed6b4f0ba00bd7c2b43492', 'ผู้รับบริการ >> เพิ่ม ลบ แก้ไข ข้อมูลผู้รับบริการ', 'ผู้รับบริการ >> เพิ่ม ลบ แก้ไข ข้อมูลผู้รับบริการ', 1, 1),
('608e3ec86f1930164c55db6fa383c7d2', 'รายงาน >> แสดงรายงานเงินเดือนพนักงาน', 'รายงาน >> แสดงรายงานเงินเดือนพนักงาน', 1, 1),
('6251916917632a85b10ab9b3dab04e85', 'การเงิน >> แก้ไขรายการชำระเงิน', 'การเงิน >> แก้ไขรายการชำระเงิน', 1, 1),
('6345e40bb415e4be92efbab40a96a557', 'รายงาน >> แสดงรายงานค่าใช้จ่ายทั่วไป', 'รายงาน >> แสดงรายงานค่าใช้จ่ายทั่วไป', 1, 1),
('741a92e4f0ffaae070b53b7e06fec466', 'ห้องตรวจ >> บันทึกข้อมูลการรักษา', 'ห้องตรวจ >> บันทึกข้อมูลการรักษา', 1, 1),
('851f6d2f0a1623a1ade13d3477a8ddeb', 'คลังยาและเวชภัณฑ์ >> แสดงข้อมูลคลังยาและเวชภัณฑ์', 'คลังยาและเวชภัณฑ์ >> แสดงข้อมูลคลังยาและเวชภัณฑ์', 1, 1),
('851fa328f91bec3071f3e23eb9934250', 'ผู้ดูแลระบบ', 'ผู้ใช้งานสามารถจัดการข้อมูลในส่วนของผู้ดูแลระบบได้', 1, 1),
('9317a3ac6600102730aae40f4dd1d83b', 'การเงิน >> แสดงข้อมูลการชำระเงิน', 'การเงิน >> แสดงข้อมูลการชำระเงิน', 1, 1),
('a4eb01ed36d2958a1c743bd9d2b0e51c', 'ห้องตรวจ >> แสดงห้องตรวจ', 'ห้องตรวจ >> แสดงห้องตรวจ', 1, 1),
('a5ecbfcc34723661b15d2f8695116268', 'การจัดการ >> เข้าถึงการจัดการข้อมูลค่าใช้จ่ายทั่วไป', 'การจัดการ >> เข้าถึงการจัดการข้อมูลค่าใช้จ่ายทั่วไป', 1, 1),
('bf77be03ecebc28c5c9d3b2b9a9e5058', 'ทันตแพทย์ >> จัดการส่วนแบ่งเองได้', 'ทันตแพทย์ >> จัดการส่วนแบ่งเองได้', 1, 2),
('c04144ca3187a338021202164a5da3df', 'ผู้รับบริการ >> แสดงข้อมูลผู้รับบริการ', 'ผู้รับบริการ >> มองเห็นข้อมูลผู้รับบริการ', 1, 1),
('c74debdb39e470887e903f03015e63e2', 'ห้องตรวจ >> มองเห็นส่วนแบ่งทันตแพทย์', 'ห้องตรวจ >> มองเห็นส่วนแบ่งทันตแพทย์', 1, 1),
('ec41e010a9af6d61f32bdd9bb1c816dc', 'คลังยาและเวชภัณฑ์ >> จัดการเพิ่มยาหรือเวชภัณฑ์เข้าคลังได้', 'คลังยาและเวชภัณฑ์ >> จัดการเพิ่มยาหรือเวชภัณฑ์เข้าคลังได้', 1, 1),
('ef79ff4ec3486093d2634a2af888bb65', 'ทันตแพทย์ >> แสดงประวัติการรับส่วนแบ่ง', 'ทันตแพทย์ >> แสดงประวัติการรับส่วนแบ่ง', 1, 2),
('fea4b54f3eae169b8202458ff0b7641f', 'ขายสินค้าได้', 'ผู้ใช้งานสามารถขายสินค้าหน้าร้านได้', 1, 1);

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

--
-- Table structure for table `access_user`
--

CREATE TABLE IF NOT EXISTS `access_user` (
  `access_key` char(32) NOT NULL,
  `user_key` char(32) NOT NULL,
  `access_status` tinyint(1) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `access_user`
--

INSERT INTO `access_user` (`access_key`, `user_key`, `access_status`) VALUES
('3597c88b7c302d3c7d5fd103c098bdb5', 'fe5a815a987f2c93dfce034630e54ba0', 1),
('ef79ff4ec3486093d2634a2af888bb65', 'fe5a815a987f2c93dfce034630e54ba0', 1),
('2e13c9cc43f1c2e9127e1b7d6e46689a', 'fe5a815a987f2c93dfce034630e54ba0', 1),
('3597c88b7c302d3c7d5fd103c098bdb5', '7c4b65169f3c456be54aaf3e3e7c42e4', 1),
('ef79ff4ec3486093d2634a2af888bb65', '7c4b65169f3c456be54aaf3e3e7c42e4', 1),
('2e13c9cc43f1c2e9127e1b7d6e46689a', '7c4b65169f3c456be54aaf3e3e7c42e4', 1),
('3597c88b7c302d3c7d5fd103c098bdb5', 'e934a4f90e9f302b662f7395b37855d9', 1),
('ef79ff4ec3486093d2634a2af888bb65', 'e934a4f90e9f302b662f7395b37855d9', 1),
('2e13c9cc43f1c2e9127e1b7d6e46689a', 'e934a4f90e9f302b662f7395b37855d9', 1),
('a5ecbfcc34723661b15d2f8695116268', 'f2372494babff1aa4d6ec3f67fb269ed', 1),
('3c600d8b527f684c404c70387468b48b', 'f2372494babff1aa4d6ec3f67fb269ed', 1),
('47c5d634e86d6bdb53d2dea5e0e53053', 'f2372494babff1aa4d6ec3f67fb269ed', 1),
('3a2064f5824b7a97cbbbb1f61f150b12', 'f2372494babff1aa4d6ec3f67fb269ed', 1),
('1a564b7440e3db290cecade17ee31a58', 'f2372494babff1aa4d6ec3f67fb269ed', 1),
('6251916917632a85b10ab9b3dab04e85', 'f2372494babff1aa4d6ec3f67fb269ed', 1),
('9317a3ac6600102730aae40f4dd1d83b', 'f2372494babff1aa4d6ec3f67fb269ed', 1),
('fea4b54f3eae169b8202458ff0b7641f', 'f2372494babff1aa4d6ec3f67fb269ed', 1),
('ec41e010a9af6d61f32bdd9bb1c816dc', 'f2372494babff1aa4d6ec3f67fb269ed', 1),
('851f6d2f0a1623a1ade13d3477a8ddeb', 'f2372494babff1aa4d6ec3f67fb269ed', 1),
('851fa328f91bec3071f3e23eb9934250', 'f2372494babff1aa4d6ec3f67fb269ed', 1),
('487eb2dc82ed6b4f0ba00bd7c2b43492', 'f2372494babff1aa4d6ec3f67fb269ed', 1),
('c04144ca3187a338021202164a5da3df', 'f2372494babff1aa4d6ec3f67fb269ed', 1),
('33ae817a098658d00b65a896151a30f2', 'f2372494babff1aa4d6ec3f67fb269ed', 1),
('6345e40bb415e4be92efbab40a96a557', 'f2372494babff1aa4d6ec3f67fb269ed', 1),
('0d0c8a1e35744ff2b82698b68907231e', 'f2372494babff1aa4d6ec3f67fb269ed', 1),
('608e3ec86f1930164c55db6fa383c7d2', 'f2372494babff1aa4d6ec3f67fb269ed', 1),
('741a92e4f0ffaae070b53b7e06fec466', 'f2372494babff1aa4d6ec3f67fb269ed', 1),
('c74debdb39e470887e903f03015e63e2', 'f2372494babff1aa4d6ec3f67fb269ed', 1),
('a4eb01ed36d2958a1c743bd9d2b0e51c', 'f2372494babff1aa4d6ec3f67fb269ed', 1),
('a5ecbfcc34723661b15d2f8695116268', '6690cfcca425120ff7e650b0a791bc71', 1),
('3c600d8b527f684c404c70387468b48b', '6690cfcca425120ff7e650b0a791bc71', 1),
('47c5d634e86d6bdb53d2dea5e0e53053', '6690cfcca425120ff7e650b0a791bc71', 1),
('3a2064f5824b7a97cbbbb1f61f150b12', '6690cfcca425120ff7e650b0a791bc71', 1),
('1a564b7440e3db290cecade17ee31a58', '6690cfcca425120ff7e650b0a791bc71', 1),
('6251916917632a85b10ab9b3dab04e85', '6690cfcca425120ff7e650b0a791bc71', 1),
('9317a3ac6600102730aae40f4dd1d83b', '6690cfcca425120ff7e650b0a791bc71', 1),
('fea4b54f3eae169b8202458ff0b7641f', '6690cfcca425120ff7e650b0a791bc71', 1),
('ec41e010a9af6d61f32bdd9bb1c816dc', '6690cfcca425120ff7e650b0a791bc71', 1),
('851f6d2f0a1623a1ade13d3477a8ddeb', '6690cfcca425120ff7e650b0a791bc71', 1),
('851fa328f91bec3071f3e23eb9934250', '6690cfcca425120ff7e650b0a791bc71', 1),
('487eb2dc82ed6b4f0ba00bd7c2b43492', '6690cfcca425120ff7e650b0a791bc71', 1),
('c04144ca3187a338021202164a5da3df', '6690cfcca425120ff7e650b0a791bc71', 1),
('6345e40bb415e4be92efbab40a96a557', '6690cfcca425120ff7e650b0a791bc71', 1),
('0d0c8a1e35744ff2b82698b68907231e', '6690cfcca425120ff7e650b0a791bc71', 1),
('608e3ec86f1930164c55db6fa383c7d2', '6690cfcca425120ff7e650b0a791bc71', 1),
('741a92e4f0ffaae070b53b7e06fec466', '6690cfcca425120ff7e650b0a791bc71', 1),
('c74debdb39e470887e903f03015e63e2', '6690cfcca425120ff7e650b0a791bc71', 1),
('a4eb01ed36d2958a1c743bd9d2b0e51c', '6690cfcca425120ff7e650b0a791bc71', 1);

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

--
-- Table structure for table `appointment`
--

CREATE TABLE IF NOT EXISTS `appointment` (
  `apm_key` varchar(32) NOT NULL,
  `apm_code` varchar(16) NOT NULL,
  `pat_key` varchar(32) NOT NULL,
  `startdate` date NOT NULL,
  `starttime` time NOT NULL,
  `enddate` date NOT NULL,
  `endtime` time NOT NULL,
  `doctor_key` varchar(32) NOT NULL,
  `room_key` varchar(32) NOT NULL,
  `phone_number` varchar(15) NOT NULL,
  `note` text NOT NULL,
  `apm_status` tinyint(1) NOT NULL,
  `apf_key` varchar(32) NOT NULL DEFAULT '0842e671e134770b85b6bd8cd2a3edb8',
  `apm_pat_arrive` time NOT NULL,
  `fuf_key` varchar(32) NOT NULL,
  `amp_followup_note` text NOT NULL,
  `apm_cashier_note` text NOT NULL,
  `user_key` varchar(32) NOT NULL,
  `publicdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `appointment`
--

INSERT INTO `appointment` (`apm_key`, `apm_code`, `pat_key`, `startdate`, `starttime`, `enddate`, `endtime`, `doctor_key`, `room_key`, `phone_number`, `note`, `apm_status`, `apf_key`, `apm_pat_arrive`, `fuf_key`, `amp_followup_note`, `apm_cashier_note`, `user_key`, `publicdate`) VALUES
('8d4ad66367cf000e62d4be5a17604313', 'WABR081L', 'dc64f09f9774f421e25de327c9ce2e70', '2020-11-06', '17:00:00', '2020-11-06', '18:00:00', 'e934a4f90e9f302b662f7395b37855d9', '673beee118378467bbfedd1a7f12a0f2', '0810308082', 'dfsdfs', 4, '0842e671e134770b85b6bd8cd2a3edb8', '12:06:22', '', '', 'test test', 'f2372494babff1aa4d6ec3f67fb269ed', '2020-11-06 05:06:13'),
('40a05e916814e4270f6e3efafb06ce64', 'APHKITPO', 'dc64f09f9774f421e25de327c9ce2e70', '2020-11-06', '17:00:00', '2020-11-06', '18:00:00', 'e934a4f90e9f302b662f7395b37855d9', 'f32fe2e4d487b9e154c947b2adf3a5d5', '0810308082', 'sdfsdf', 4, 'dcf3dcdae127773c1136641a1864c068', '13:06:36', '', '', 'ลูกค้ามัดจำแล้ว', 'f2372494babff1aa4d6ec3f67fb269ed', '2020-11-06 05:08:27'),
('571624cd9462e6b3addfa5bd38f02829', 'AP853FJU', 'dc64f09f9774f421e25de327c9ce2e70', '2020-11-10', '12:00:00', '2020-11-10', '12:30:00', 'e934a4f90e9f302b662f7395b37855d9', '673beee118378467bbfedd1a7f12a0f2', '0810308082', 'test', 4, 'dcf3dcdae127773c1136641a1864c068', '00:00:00', '', '', '[object HTMLTextAreaElement]', 'f2372494babff1aa4d6ec3f67fb269ed', '2020-11-10 04:46:39'),
('5da9a272f39abe27445753c3b54b8430', 'AP016MLE', 'dc64f09f9774f421e25de327c9ce2e70', '2020-11-11', '10:00:00', '2020-11-11', '11:00:00', 'e934a4f90e9f302b662f7395b37855d9', '673beee118378467bbfedd1a7f12a0f2', '0810308082', 'ters', 4, 'dcf3dcdae127773c1136641a1864c068', '00:00:00', '', '', 'test', 'f2372494babff1aa4d6ec3f67fb269ed', '2020-11-10 20:53:02'),
('6f3340701601c64b6d9b39cc18d25002', 'AP6HOL9X', 'f6244ffe600b702d42839d0937641499', '2021-02-01', '12:00:00', '2021-02-01', '12:20:00', 'e934a4f90e9f302b662f7395b37855d9', '673beee118378467bbfedd1a7f12a0f2', '0810308082', 'test', 0, '0842e671e134770b85b6bd8cd2a3edb8', '00:00:00', '', '', '', 'f2372494babff1aa4d6ec3f67fb269ed', '2021-02-01 05:01:03'),
('57ee613d0944b2c23f72af1612f8c017', 'APS9KE97', 'dc64f09f9774f421e25de327c9ce2e70', '2021-05-27', '16:00:00', '2021-05-27', '17:00:00', 'e934a4f90e9f302b662f7395b37855d9', '673beee118378467bbfedd1a7f12a0f2', '0810308082', 'test', 4, '0842e671e134770b85b6bd8cd2a3edb8', '00:00:00', '', '', 'test', 'f2372494babff1aa4d6ec3f67fb269ed', '2021-05-27 08:02:05'),
('981ca0f6d6a7407717e3ecaef69e6500', 'AP6DVCQ5', 'dc64f09f9774f421e25de327c9ce2e70', '2021-05-28', '10:00:00', '2021-05-28', '11:00:00', 'e934a4f90e9f302b662f7395b37855d9', '', '0810308082', '', 0, '0842e671e134770b85b6bd8cd2a3edb8', '00:00:00', '', '', '', 'f2372494babff1aa4d6ec3f67fb269ed', '2021-05-27 08:19:05'),
('9ec557a4d64ce3774cdce273cdf6f667', 'AP41T91T', 'dc64f09f9774f421e25de327c9ce2e70', '2021-05-28', '10:00:00', '2021-05-28', '11:00:00', 'e934a4f90e9f302b662f7395b37855d9', '673beee118378467bbfedd1a7f12a0f2', '0810308082', 'ทดสอบการนัดหมายผ่าน LINE', 0, '0842e671e134770b85b6bd8cd2a3edb8', '00:00:00', '', '', '', 'f2372494babff1aa4d6ec3f67fb269ed', '2021-05-27 08:19:46'),
('d0486cab6505e3e091a2900686c710b6', 'APJB29B3', 'dc64f09f9774f421e25de327c9ce2e70', '2021-05-27', '18:00:00', '2021-05-27', '19:00:00', 'e934a4f90e9f302b662f7395b37855d9', '673beee118378467bbfedd1a7f12a0f2', '0810308082', 'test', 0, '0842e671e134770b85b6bd8cd2a3edb8', '00:00:00', '', '', '', 'f2372494babff1aa4d6ec3f67fb269ed', '2021-05-27 08:23:58'),
('befbdc598cb5846d257f63a339189f26', 'APZLJ6FD', 'dc64f09f9774f421e25de327c9ce2e70', '2021-06-08', '15:00:00', '2021-06-08', '16:00:00', 'e934a4f90e9f302b662f7395b37855d9', '673beee118378467bbfedd1a7f12a0f2', '0810308082', 'tre', 0, '0842e671e134770b85b6bd8cd2a3edb8', '00:00:00', '', '', '', 'f2372494babff1aa4d6ec3f67fb269ed', '2021-06-08 08:10:37'),
('30d95cc06450d0873f61aef903dfa03c', '', 'dc64f09f9774f421e25de327c9ce2e70', '2021-06-15', '13:00:00', '2021-06-15', '14:00:00', 'e934a4f90e9f302b662f7395b37855d9', '673beee118378467bbfedd1a7f12a0f2', '0810308082', 'test', 4, 'dcf3dcdae127773c1136641a1864c068', '00:00:00', '', '', '', '6690cfcca425120ff7e650b0a791bc71', '2021-06-15 06:01:47'),
('e52dc11035a2486abf4e9345721af3dd', 'AP3N1PRT', 'f6244ffe600b702d42839d0937641499', '2021-06-15', '16:00:00', '2021-06-15', '17:00:00', 'e934a4f90e9f302b662f7395b37855d9', '673beee118378467bbfedd1a7f12a0f2', '0810308082', 'test', 0, 'dcf3dcdae127773c1136641a1864c068', '00:00:00', '', '', '', '6690cfcca425120ff7e650b0a791bc71', '2021-06-15 06:15:01'),
('654ec203b9bd48a1a142c157fef8331c', 'WA2BFMZI', 'c46ebaa3f324e2a5fe12e4118eb53996', '2021-06-15', '18:00:00', '2021-06-15', '19:00:00', 'e934a4f90e9f302b662f7395b37855d9', '673beee118378467bbfedd1a7f12a0f2', 'test', 'eee', 0, '0842e671e134770b85b6bd8cd2a3edb8', '00:00:00', '', '', '', '6690cfcca425120ff7e650b0a791bc71', '2021-06-15 06:31:02'),
('890dab72338a48c3f8fa52234abd0ce8', 'APBACWTU', 'c46ebaa3f324e2a5fe12e4118eb53996', '2021-06-15', '19:00:00', '2021-06-15', '20:00:00', 'e934a4f90e9f302b662f7395b37855d9', '673beee118378467bbfedd1a7f12a0f2', '0810308082', 'rer', 0, 'dcf3dcdae127773c1136641a1864c068', '00:00:00', '', '', '', '6690cfcca425120ff7e650b0a791bc71', '2021-06-15 06:34:21'),
('91b482b0a38aae3027a8faabe930c7db', 'AP9UI3G1', 'dc64f09f9774f421e25de327c9ce2e70', '2021-06-17', '11:00:00', '2021-06-17', '12:00:00', 'e934a4f90e9f302b662f7395b37855d9', '673beee118378467bbfedd1a7f12a0f2', '0810308082', 'ขูดหินปูน', 0, 'dcf3dcdae127773c1136641a1864c068', '00:00:00', '', '', '', 'f2372494babff1aa4d6ec3f67fb269ed', '2021-06-17 02:57:10'),
('fb367aa2efde7d66b349de8441657211', 'APEVZ1H3', 'f6244ffe600b702d42839d0937641499', '2021-06-18', '10:00:00', '2021-06-18', '10:05:00', 'e934a4f90e9f302b662f7395b37855d9', '673beee118378467bbfedd1a7f12a0f2', '0810308082', 'test', 0, 'dcf3dcdae127773c1136641a1864c068', '00:00:00', '', '', '', 'f2372494babff1aa4d6ec3f67fb269ed', '2021-06-17 15:21:52');

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

--
-- Table structure for table `appointment_flag`
--

CREATE TABLE IF NOT EXISTS `appointment_flag` (
  `apf_key` varchar(32) NOT NULL,
  `apf_title` varchar(128) NOT NULL,
  `apf_color` varchar(32) NOT NULL,
  `apf_status` tinyint(1) NOT NULL,
  `apf_insert` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `appointment_flag`
--

INSERT INTO `appointment_flag` (`apf_key`, `apf_title`, `apf_color`, `apf_status`, `apf_insert`) VALUES
('037cdfaf4d17cc73cb0d95d8ea5b256c', 'เลื่อนนัด', '#ff9900', 1, '2019-10-18 02:02:11'),
('0842e671e134770b85b6bd8cd2a3edb8', 'ไม่ระบุสถานะ', '#b8b8b8', 1, '2018-04-17 03:48:41'),
('dcf3dcdae127773c1136641a1864c068', 'ยืนยันการนัดหมาย', '#14db64', 1, '2018-04-26 23:25:32');

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

--
-- Table structure for table `appointment_recall_alert`
--

CREATE TABLE IF NOT EXISTS `appointment_recall_alert` (
  `ara_key` char(32) NOT NULL,
  `apm_key` varchar(32) NOT NULL,
  `pat_key` varchar(32) NOT NULL,
  `item_key` varchar(32) NOT NULL,
  `ara_start_date` date NOT NULL,
  `ara_alert_date` date NOT NULL,
  `ara_status` varchar(32) NOT NULL,
  `ara_note` text NOT NULL,
  `ara_user_key` varchar(32) NOT NULL,
  `ara_insert` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `appointment_skip`
--

CREATE TABLE IF NOT EXISTS `appointment_skip` (
  `skip_key` char(32) NOT NULL,
  `apm_key` varchar(32) NOT NULL,
  `old_startdate` date NOT NULL,
  `old_starttime` time NOT NULL,
  `old_enddate` date NOT NULL,
  `old_endtime` time NOT NULL,
  `new_startdate` date NOT NULL,
  `new_starttime` time NOT NULL,
  `new_enddate` date NOT NULL,
  `new_endtime` time NOT NULL,
  `skip_user` varchar(32) NOT NULL,
  `skip_insert` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `autonumber`
--

CREATE TABLE IF NOT EXISTS `autonumber` (
  `cn_count` int(4) unsigned zerofill NOT NULL,
  `finance_number` int(4) unsigned zerofill NOT NULL,
  `member_number` int(6) unsigned zerofill NOT NULL,
  `import_number` int(4) unsigned zerofill NOT NULL,
  `cn_prefix` varchar(16) NOT NULL,
  `cn_year` varchar(8) NOT NULL,
  `cn_month` varchar(8) NOT NULL,
  `finance_prefix` varchar(8) NOT NULL,
  `finance_year` varchar(8) NOT NULL,
  `finance_month` varchar(8) NOT NULL,
  `year` int(4) unsigned zerofill NOT NULL,
  `month` int(2) unsigned zerofill NOT NULL,
  `day` int(2) unsigned zerofill NOT NULL,
  `backup_path` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `autonumber`
--

INSERT INTO `autonumber` (`cn_count`, `finance_number`, `member_number`, `import_number`, `cn_prefix`, `cn_year`, `cn_month`, `finance_prefix`, `finance_year`, `finance_month`, `year`, `month`, `day`, `backup_path`) VALUES
(0006, 0006, 000001, 0001, 'AC', 'AD', 'NO', 'RA', 'AD', 'YES', 2021, 06, 17, 'D:\\\\');

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

--
-- Table structure for table `backup_logs`
--

CREATE TABLE IF NOT EXISTS `backup_logs` (
  `backup_key` varchar(32) NOT NULL,
  `backup_file` varchar(256) NOT NULL,
  `backup_upload` tinytext NOT NULL,
  `backup_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `user_key` varchar(32) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `bank`
--

CREATE TABLE IF NOT EXISTS `bank` (
  `bank_key` char(32) NOT NULL,
  `bank_title` varchar(128) NOT NULL,
  `bank_account_name` varchar(128) NOT NULL,
  `bank_account_number` varchar(128) NOT NULL,
  `bank_logo` varchar(64) NOT NULL,
  `bank_status` tinyint(1) NOT NULL,
  `bank_insert` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `bank`
--

INSERT INTO `bank` (`bank_key`, `bank_title`, `bank_account_name`, `bank_account_number`, `bank_logo`, `bank_status`, `bank_insert`) VALUES
('1626eef5c28a479e1251cbdf8e5d1830', 'ธนาคารกรุงไทย', 'นายกัมพล เทียมพิน (KHUMPHOL TEARMPIN)', '455-0-22718-4', 'ktb.png', 1, '2019-06-06 04:37:58'),
('64afe57ad12b671988c2ae743d19fbbe', 'ธนาคารสิกรไทย', 'นายกัมพล เทียมพิน (KHUMPHOL TEARMPIN)', '471-2-42474-0', 'kbank.png', 1, '2019-06-06 04:37:58'),
('64b94b3750032e8b949a813cf1829404', 'ธนาคารออมสิน', 'นายกัมพล เทียมพิน (KHUMPHOL TEARMPIN)', '020253147423', 'gsb.png', 1, '2019-06-06 04:39:20'),
('654c4b98987c7b000579e18d57104d1c', 'True Money Wallet', 'นายกัมพล เทียมพิน (KHUMPHOL TEARMPIN)', '0810308082', 'tmw.png', 1, '2019-06-06 04:39:20'),
('ee3a4d3c054ca149a5edcbac8d131c51', 'บัตรเครดิต', 'บัตรเครดิต', 'บัตรเครดิต', 'credit.png', 1, '2020-01-04 06:29:41');

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

--
-- Table structure for table `credit_history`
--

CREATE TABLE IF NOT EXISTS `credit_history` (
  `credit_key` char(32) NOT NULL,
  `credit_amount` double NOT NULL,
  `credit_user_key` varchar(32) NOT NULL,
  `credit_bank` varchar(32) NOT NULL,
  `credit_slip` varchar(64) NOT NULL,
  `credit_note` text NOT NULL,
  `credit_type` tinyint(1) NOT NULL COMMENT '1=topup,2=gift,3=ref',
  `credit_lastupdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `credit_status` tinyint(4) NOT NULL,
  `credit_insert` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `credit_history`
--

INSERT INTO `credit_history` (`credit_key`, `credit_amount`, `credit_user_key`, `credit_bank`, `credit_slip`, `credit_note`, `credit_type`, `credit_lastupdate`, `credit_status`, `credit_insert`) VALUES
('19b64998e49f66023c9ba2eaade959f8', 1000, 'f2372494babff1aa4d6ec3f67fb269ed', '64afe57ad12b671988c2ae743d19fbbe', '30f44fa459a390090d4fda9805b11e44.png', '', 1, '2021-06-17 16:25:19', 2, '2021-06-17 23:17:58'),
('425914c0f6ebd6ffdd360afff1a0ec3d', 100, 'f2372494babff1aa4d6ec3f67fb269ed', '', '', '', 4, '2021-06-17 16:25:19', 2, '2021-06-17 23:25:19'),
('448131b44812ea4b60141794a33d87ed', 1000, 'f2372494babff1aa4d6ec3f67fb269ed', '64afe57ad12b671988c2ae743d19fbbe', 'a1c0231c4df5a2b63ba43e5af8019ae3.png', '', 1, '2021-06-17 16:26:03', 2, '2021-06-17 23:25:37');

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

--
-- Table structure for table `credit_used`
--

CREATE TABLE IF NOT EXISTS `credit_used` (
  `cu_key` char(32) NOT NULL,
  `cu_type` varchar(32) NOT NULL,
  `cu_description` varchar(128) NOT NULL,
  `cu_amount` double NOT NULL,
  `cu_user_key` varchar(32) NOT NULL,
  `cu_insert` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `credit_used`
--

INSERT INTO `credit_used` (`cu_key`, `cu_type`, `cu_description`, `cu_amount`, `cu_user_key`, `cu_insert`) VALUES
('281375a9a37338a51e51c81286c87d97', 'patient', 'AC210004', 5, '6690cfcca425120ff7e650b0a791bc71', '2021-06-15 05:26:53'),
('545e9244f2eb52e7e88add2752b41309', 'appointment', 'AP3N1PRT', 3, '6690cfcca425120ff7e650b0a791bc71', '2021-06-15 06:15:01'),
('5ea9511fb7424a1fc3cbb2479e03c212', 'appointment', 'AP9UI3G1', 3, 'f2372494babff1aa4d6ec3f67fb269ed', '2021-06-17 02:57:10'),
('7c752754880ffcdd38fa756f3887112e', 'appointment', 'AP9HCMND', 3, '6690cfcca425120ff7e650b0a791bc71', '2021-06-15 06:01:47'),
('8e1e4a24b44e418c7a90884cefeebcaf', 'appointment', 'APO5IMCW', 3, '6690cfcca425120ff7e650b0a791bc71', '2021-06-15 06:31:02'),
('b48c1f79f952b940110993ea279c10f5', 'appointment', 'APBACWTU', 3, '6690cfcca425120ff7e650b0a791bc71', '2021-06-15 06:34:21'),
('c9bf52da9962fa60702cecfca96b5389', 'patient', 'AC210006', 5, '6690cfcca425120ff7e650b0a791bc71', '2021-06-15 05:44:06'),
('e4dec7dbd1995b9d2061b47197fbe8be', 'appointment', 'APEVZ1H3', 3, 'f2372494babff1aa4d6ec3f67fb269ed', '2021-06-17 15:21:52'),
('e98c479ee1006a8d0b194dce70ec1693', 'patient', 'AC210005', 5, '6690cfcca425120ff7e650b0a791bc71', '2021-06-15 05:28:19'),
('eefcff41636e0be58d8f3a43ae0f11c9', 'sell', 'RA21060002', 2, '6690cfcca425120ff7e650b0a791bc71', '2021-06-15 05:05:23'),
('fd8592ff432910879fedd4053b880254', 'patient', 'WI189980', 5, '6690cfcca425120ff7e650b0a791bc71', '2021-06-15 06:31:02');

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

--
-- Table structure for table `doctor`
--

CREATE TABLE IF NOT EXISTS `doctor` (
  `doctor_key` varchar(32) NOT NULL,
  `doctor_name` varchar(64) NOT NULL,
  `doctor_lastname` varchar(64) NOT NULL,
  `doctor_email` varchar(128) NOT NULL,
  `doctor_phone` varchar(32) NOT NULL,
  `doctor_bank` varchar(128) NOT NULL,
  `doctor_bank_account` varchar(128) NOT NULL,
  `doctor_bank_no` varchar(128) NOT NULL,
  `doctor_cert` varchar(64) NOT NULL,
  `doctor_position` varchar(64) NOT NULL,
  `doctor_color` varchar(16) NOT NULL,
  `doctor_photo` varchar(128) NOT NULL,
  `doctor_line_user` varchar(64) NOT NULL,
  `doctor_status` tinyint(1) NOT NULL,
  `public_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `doctor`
--

INSERT INTO `doctor` (`doctor_key`, `doctor_name`, `doctor_lastname`, `doctor_email`, `doctor_phone`, `doctor_bank`, `doctor_bank_account`, `doctor_bank_no`, `doctor_cert`, `doctor_position`, `doctor_color`, `doctor_photo`, `doctor_line_user`, `doctor_status`, `public_date`) VALUES
('e934a4f90e9f302b662f7395b37855d9', 'test', 'test', 'test', 'tse', '', '', '', 'test', '', '#4d30ff', 'fedb6639f6de992ca2b9435aa554abb8.jpg', '', 1, '2020-11-01 02:53:51');

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

--
-- Table structure for table `doctor_calendar`
--

CREATE TABLE IF NOT EXISTS `doctor_calendar` (
  `dc_key` char(32) NOT NULL,
  `doctor_key` varchar(32) NOT NULL,
  `bra_key` varchar(32) NOT NULL,
  `room_key` varchar(32) NOT NULL,
  `startdate` date NOT NULL,
  `starttime` time NOT NULL,
  `endtime` time NOT NULL,
  `user_key` varchar(32) NOT NULL,
  `dc_insert` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `doctor_calendar_header`
--

CREATE TABLE IF NOT EXISTS `doctor_calendar_header` (
  `dcap_key` varchar(32) NOT NULL,
  `dcap_title` varchar(128) NOT NULL,
  `dcap_start` date NOT NULL,
  `dcap_end` date NOT NULL,
  `dcap_status` tinyint(1) NOT NULL,
  `dcap_insert` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `doctor_private_fund`
--

CREATE TABLE IF NOT EXISTS `doctor_private_fund` (
  `dpf_key` char(32) NOT NULL,
  `doctor_key` varchar(32) NOT NULL,
  `item_key` varchar(32) NOT NULL,
  `item_private_fee` double NOT NULL,
  `item_private_fee_type` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `drugs_export`
--

CREATE TABLE IF NOT EXISTS `drugs_export` (
  `exp_key` varchar(32) NOT NULL,
  `drug_key` varchar(32) NOT NULL,
  `drug_export` double NOT NULL,
  `finh_key` varchar(32) NOT NULL,
  `user_key` varchar(32) NOT NULL,
  `export_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `drugs_export`
--

INSERT INTO `drugs_export` (`exp_key`, `drug_key`, `drug_export`, `finh_key`, `user_key`, `export_time`) VALUES
('eb8317b30ad1e35cef040ad97d536668', '802411d5299e367501f38ce8b1d554ab', 1, '5373766967aa09640a2d17ce0179c15e', 'f2372494babff1aa4d6ec3f67fb269ed', '2020-11-06 05:23:02'),
('5fd5f2d7f352dc5a62ba2efcf86ac88b', '802411d5299e367501f38ce8b1d554ab', 1, '6456cd8b3ea637fe6686763bbe3c2e78', '6690cfcca425120ff7e650b0a791bc71', '2021-06-15 04:10:47'),
('e1a9eb06c3c48c51321f0995fb7da73b', '802411d5299e367501f38ce8b1d554ab', 1, 'ad1e882ffe89ab81accd77c39aa46b06', '6690cfcca425120ff7e650b0a791bc71', '2021-06-15 05:05:23'),
('8b0786e13822049d6da0f7a010199654', '802411d5299e367501f38ce8b1d554ab', 1, '361e6d9837ed9dc630cef382551c1242', '6690cfcca425120ff7e650b0a791bc71', '2021-06-15 07:10:46');

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

--
-- Table structure for table `drugs_import`
--

CREATE TABLE IF NOT EXISTS `drugs_import` (
  `imp_key` varchar(32) NOT NULL,
  `drug_key` varchar(32) NOT NULL,
  `drug_import` double NOT NULL,
  `user_key` varchar(32) NOT NULL,
  `import_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `drugs_import`
--

INSERT INTO `drugs_import` (`imp_key`, `drug_key`, `drug_import`, `user_key`, `import_time`) VALUES
('8a720973a92023bf36b7596d7160dd45', '802411d5299e367501f38ce8b1d554ab', 10, 'f2372494babff1aa4d6ec3f67fb269ed', '2020-11-06 05:17:59');

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

--
-- Table structure for table `drugs_store`
--

CREATE TABLE IF NOT EXISTS `drugs_store` (
  `drug_key` varchar(32) NOT NULL,
  `item_key` varchar(32) NOT NULL,
  `drug_howto` text NOT NULL,
  `drug_warning` text NOT NULL,
  `drug_minimum` double NOT NULL,
  `drug_instore` double NOT NULL,
  `drug_alert` double NOT NULL,
  `drug_sub_stock` char(1) NOT NULL DEFAULT 'Y',
  `pay_with_out_drugs` char(1) NOT NULL DEFAULT 'N',
  `insert_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `drugs_store`
--

INSERT INTO `drugs_store` (`drug_key`, `item_key`, `drug_howto`, `drug_warning`, `drug_minimum`, `drug_instore`, `drug_alert`, `drug_sub_stock`, `pay_with_out_drugs`, `insert_time`) VALUES
('802411d5299e367501f38ce8b1d554ab', '7d4498bca493ed5dc5aa048e11194974', '', '', 0, 6, 0, '', '', '2020-11-06 05:17:42');

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

--
-- Table structure for table `employees`
--

CREATE TABLE IF NOT EXISTS `employees` (
  `emp_key` varchar(32) NOT NULL,
  `emp_code` varchar(64) NOT NULL,
  `emp_pid` varchar(32) NOT NULL,
  `emp_name` varchar(64) NOT NULL,
  `emp_lastname` varchar(64) NOT NULL,
  `emp_address` text NOT NULL,
  `emp_position` varchar(256) NOT NULL,
  `emp_salary` double NOT NULL,
  `emp_photo` varchar(64) NOT NULL,
  `emp_bank_name` varchar(128) NOT NULL,
  `emp_bank_acc_number` varchar(128) NOT NULL,
  `emp_status` tinyint(1) NOT NULL,
  `emp_insert` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `employees`
--

INSERT INTO `employees` (`emp_key`, `emp_code`, `emp_pid`, `emp_name`, `emp_lastname`, `emp_address`, `emp_position`, `emp_salary`, `emp_photo`, `emp_bank_name`, `emp_bank_acc_number`, `emp_status`, `emp_insert`) VALUES
('af7dc6b3a9cf19bc19213d352cf6a602', 'tesr', 'werw', 'werw', 'rwerw', '', '', 0, 'noimg.jpg', '', '', 1, '2020-11-01 15:01:00');

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

--
-- Table structure for table `employee_document`
--

CREATE TABLE IF NOT EXISTS `employee_document` (
  `doc_key` char(32) NOT NULL,
  `emp_key` varchar(32) NOT NULL,
  `doc_title` varchar(128) NOT NULL,
  `doc_file` varchar(128) NOT NULL,
  `user_key` varchar(32) NOT NULL,
  `doc_insert` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `expenses`
--

CREATE TABLE IF NOT EXISTS `expenses` (
  `exp_key` char(32) NOT NULL,
  `exp_title` varchar(128) NOT NULL,
  `exp_detail` text NOT NULL,
  `exp_type` tinyint(1) NOT NULL COMMENT '1=กำหนดค่าเอง,2=ดึงมาจากตารางรายการค่าใช้จ่าย',
  `exp_vat` tinyint(1) NOT NULL COMMENT '0=No Vat,1=Vat',
  `exp_amount` double NOT NULL,
  `exp_amount_vat` double NOT NULL,
  `exp_date` date NOT NULL,
  `exp_user_insert` varchar(32) NOT NULL,
  `exp_user_edit` varchar(32) NOT NULL,
  `exp_insert` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `expenses_header`
--

CREATE TABLE IF NOT EXISTS `expenses_header` (
  `expenses_key` char(32) NOT NULL,
  `expenses_title` varchar(128) NOT NULL,
  `expenses_start` date NOT NULL,
  `expenses_end` date NOT NULL,
  `expenses_status` tinyint(1) NOT NULL,
  `expenses_insert` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `expenses_header`
--

INSERT INTO `expenses_header` (`expenses_key`, `expenses_title`, `expenses_start`, `expenses_end`, `expenses_status`, `expenses_insert`) VALUES
('76006cad8926b2e5046e8ad770c8ceb5', 'test', '2021-06-01', '2021-06-30', 1, '2021-06-15 14:54:02');

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

--
-- Table structure for table `finance_debtor`
--

CREATE TABLE IF NOT EXISTS `finance_debtor` (
  `deb_key` char(32) NOT NULL,
  `finh_key` varchar(32) NOT NULL,
  `deb_amount` double NOT NULL,
  `user_key` varchar(32) NOT NULL,
  `deb_insert` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `finance_header`
--

CREATE TABLE IF NOT EXISTS `finance_header` (
  `finh_key` char(32) NOT NULL,
  `finh_number` varchar(32) NOT NULL,
  `finh_tax_number` varchar(32) NOT NULL,
  `finh_tax_active` tinyint(1) NOT NULL,
  `apm_key` varchar(32) NOT NULL,
  `finance_discount` double NOT NULL,
  `finance_discount_type` tinyint(1) NOT NULL,
  `finance_discount_value` double NOT NULL,
  `finance_discount_real` double NOT NULL,
  `finance_discount_real_type` tinyint(1) NOT NULL,
  `finance_discount_real_value` double NOT NULL,
  `op_key` varchar(32) NOT NULL DEFAULT 'f47944b0e798f93fbf4e95d14d1ddd32',
  `oc_key` varchar(32) NOT NULL,
  `finance_fee` double NOT NULL,
  `finance_fee_type` tinyint(1) NOT NULL,
  `finance_fee_value` double NOT NULL,
  `price_all` double NOT NULL,
  `price_all_total` double NOT NULL,
  `finh_pay_type` tinyint(1) NOT NULL COMMENT '1=เงินสด,2=บัตรเครดิต,3=โอนผ่านบัญชีธนาคาร,4=ค้างชำระ',
  `finh_create_card_type` tinyint(1) NOT NULL COMMENT '0=No Credit card,1=Visa,2=Master Card,3=american Express,5=Other',
  `finh_create_card_number` varchar(32) NOT NULL,
  `finh_type` tinyint(1) NOT NULL DEFAULT '1',
  `user_key` varchar(32) NOT NULL,
  `finh_insert` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `finance_header`
--

INSERT INTO `finance_header` (`finh_key`, `finh_number`, `finh_tax_number`, `finh_tax_active`, `apm_key`, `finance_discount`, `finance_discount_type`, `finance_discount_value`, `finance_discount_real`, `finance_discount_real_type`, `finance_discount_real_value`, `op_key`, `oc_key`, `finance_fee`, `finance_fee_type`, `finance_fee_value`, `price_all`, `price_all_total`, `finh_pay_type`, `finh_create_card_type`, `finh_create_card_number`, `finh_type`, `user_key`, `finh_insert`) VALUES
('073a8b517da872f56b1d1e77ed05e130', 'RA20110003', '', 0, '571624cd9462e6b3addfa5bd38f02829', 0, 0, 0, 0, 0, 0, 'f47944b0e798f93fbf4e95d14d1ddd32', '37a6259cc0c1dae299a7866489dff0bd', 0, 0, 0, 123, 123, 1, 0, '', 1, 'f2372494babff1aa4d6ec3f67fb269ed', '2020-11-10 21:03:58'),
('361e6d9837ed9dc630cef382551c1242', 'RA21060004', '', 0, '30d95cc06450d0873f61aef903dfa03c', 0, 0, 0, 0, 0, 0, 'f47944b0e798f93fbf4e95d14d1ddd32', '37a6259cc0c1dae299a7866489dff0bd', 0, 0, 0, 133, 133, 1, 0, '', 1, '6690cfcca425120ff7e650b0a791bc71', '2021-06-15 07:10:46'),
('4d694fba6c7363eb7e20fcb459ae4216', 'RA21060003', '', 0, '57ee613d0944b2c23f72af1612f8c017', 0, 0, 0, 0, 0, 0, 'f47944b0e798f93fbf4e95d14d1ddd32', '37a6259cc0c1dae299a7866489dff0bd', 0, 0, 0, 0, 0, 1, 0, '', 1, '6690cfcca425120ff7e650b0a791bc71', '2021-06-15 06:34:56'),
('526f742eb32e6fe06b6154b4b2404164', 'RA21060005', '', 0, '40a05e916814e4270f6e3efafb06ce64', 0, 0, 0, 0, 0, 0, 'f47944b0e798f93fbf4e95d14d1ddd32', '37a6259cc0c1dae299a7866489dff0bd', 0, 0, 0, 123, 123, 6, 0, '', 1, 'f2372494babff1aa4d6ec3f67fb269ed', '2021-06-17 02:58:36'),
('5745862771a9311fd245c8270503c8d1', 'RA20110002', '', 0, '8d4ad66367cf000e62d4be5a17604313', 0, 0, 0, 0, 0, 0, 'f47944b0e798f93fbf4e95d14d1ddd32', '37a6259cc0c1dae299a7866489dff0bd', 0, 0, 0, 123, 123, 1, 0, '', 1, 'f2372494babff1aa4d6ec3f67fb269ed', '2020-11-10 20:48:14'),
('d107f4268752cad85f56fd85460fe7be', 'RA20110004', '', 0, '5da9a272f39abe27445753c3b54b8430', 0, 0, 0, 0, 0, 0, 'f47944b0e798f93fbf4e95d14d1ddd32', '37a6259cc0c1dae299a7866489dff0bd', 0, 0, 0, 123, 123, 1, 0, '', 1, 'f2372494babff1aa4d6ec3f67fb269ed', '2020-11-25 02:38:01');

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

--
-- Table structure for table `finance_payment_method`
--

CREATE TABLE IF NOT EXISTS `finance_payment_method` (
  `fpm_key` char(32) NOT NULL,
  `finh_key` varchar(32) NOT NULL,
  `pay_by_cash` double NOT NULL,
  `pay_by_card` double NOT NULL,
  `pay_by_transfer` double NOT NULL,
  `fpm_user_key` varchar(32) NOT NULL,
  `fpm_insert` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `finance_payment_method`
--

INSERT INTO `finance_payment_method` (`fpm_key`, `finh_key`, `pay_by_cash`, `pay_by_card`, `pay_by_transfer`, `fpm_user_key`, `fpm_insert`) VALUES
('271c3e8564129a3712111a17935d22b9', '526f742eb32e6fe06b6154b4b2404164', 100, 20, 3, 'f2372494babff1aa4d6ec3f67fb269ed', '2021-06-17 02:58:36');

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

--
-- Table structure for table `followup_flag`
--

CREATE TABLE IF NOT EXISTS `followup_flag` (
  `fuf_key` varchar(32) NOT NULL,
  `fuf_title` varchar(128) NOT NULL,
  `fuf_color` varchar(32) NOT NULL,
  `fuf_status` tinyint(1) NOT NULL,
  `fuf_insert` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `followup_flag`
--

INSERT INTO `followup_flag` (`fuf_key`, `fuf_title`, `fuf_color`, `fuf_status`, `fuf_insert`) VALUES
('2b1616ecfa9fe1510d079cb1dad1e4eb', 'ยังไม่ได้ติดตามนัดหมาย', '#ffd800', 2, '2019-11-21 10:14:51'),
('391f465db643417281118588c3ec3464', 'ติดตามนัดหมายแล้วไม่มีนัดหมายเพิ่ม', '#1ed400', 1, '2019-11-21 10:15:09'),
('a08c0e12d37a34cd71f7b9a4e1269d17', 'ติดตามนัดหมายแล้วมีนัดหมายเพิ่ม', '#007ae2', 2, '2020-01-24 15:19:43'),
('cd79946d41e6f35d906f4e80f0a9e491', 'ยกเลิกการติดตามนัดหมาย', '#d74747', 1, '2020-01-24 15:19:43');

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

--
-- Table structure for table `items_categories`
--

CREATE TABLE IF NOT EXISTS `items_categories` (
  `categories_key` varchar(32) NOT NULL,
  `categories_code` varchar(16) NOT NULL,
  `categories_name` varchar(256) NOT NULL,
  `categories_status` tinyint(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `items_categories`
--

INSERT INTO `items_categories` (`categories_key`, `categories_code`, `categories_name`, `categories_status`) VALUES
('4181a35429da423d4df98640d2dc5b86', 'A001', 'รายได้ค่าบริการทางการแพทย์-เดือยฟัน', 1),
('eb747e77deca778a2e0276b0a0ea0c00', 'A002', 'รายได้ค่าบริการทางการแพทย์-ครอบฟัน', 1),
('f4e543726ae9554472b33a60aa7820a1', 'A003', 'รายได้ค่าบริการทางการแพทย์-ฟันปลอม', 1),
('a1fafae65b2aca646669a613dca81edb', 'A004', 'รายได้ค่าบริการทางการแพทย์-อุดฟัน', 1),
('51656a0816a3e9d084f129629017c7c7', 'A005', 'รายได้ค่าบริการทางการแพทย์-Onlay', 1),
('8a3509dddd34bca05642f35f2d9b94ba', 'A006', 'รายได้ค่าบริการทางการแพทย์-Inlay', 1),
('c0306a00ea9316a444510a37a8ee739d', 'A007', 'รายได้ค่าบริการทางการแพทย์-งานเด็ก', 1),
('734c22a5f241867317ee64b5debcdd76', 'A008', 'รายได้ค่าบริการทางการแพทย์-ศัลยกรรม', 1),
('48140bfc890dc37c7d3c88c142d296c9', 'A009', 'รายได้ค่าบริการทางการแพทย์-รากเทียม', 1),
('233586b267d52a4743838290e0a0f2cb', 'A010', 'รายได้ค่าบริการทางการแพทย์-จัดฟัน', 1),
('451afc65a8f3c8a3c751315fe89b6fa8', 'A011', 'รายได้ค่าบริการทางการแพทย์-รักษารากฟัน', 1),
('26ce65b2ed7475af6f328f9c6d7f36bb', 'A012', 'รายได้ค่าบริการทางการแพทย์-ฟอกสีฟัน', 1),
('ef2387a2bb53a81fad58dd409b04bf76', 'A013', 'รายได้ค่าบริการทางการแพทย์-โรคเหงือก', 1),
('b8bd2f77374a82feacf37e491181b22f', 'A014', 'รายได้ค่าบริการทางการแพทย์-อื่น ๆ', 1),
('d59d44be6a7b72bc9f2a6bd3741e6c2a', 'S001', 'รายได้จากการขายสินค้าและยา', 1),
('36c5420a68681b0873664baae9a3dd9c', 'X001', 'รายได้ค่า X-Ray', 1);

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

--
-- Table structure for table `items_list`
--

CREATE TABLE IF NOT EXISTS `items_list` (
  `categories_key` varchar(32) NOT NULL,
  `item_key` varchar(32) NOT NULL,
  `item_code` varchar(16) NOT NULL,
  `item_name` varchar(256) NOT NULL,
  `item_price` double NOT NULL,
  `item_unit` varchar(32) NOT NULL DEFAULT 'a59e18c9eb4692403e8206628d121328',
  `item_is_drugs` char(1) NOT NULL DEFAULT 'N',
  `item_doctor_fee` double NOT NULL,
  `item_doctor_type` tinyint(1) NOT NULL COMMENT '0=No,1=Fixed,2=Percent',
  `item_commission_fee` double NOT NULL,
  `item_commission_type` tinyint(1) NOT NULL COMMENT '0=no,1=Fixed,2=Percent',
  `item_alert_amount` int(11) NOT NULL,
  `item_alert_type` varchar(16) NOT NULL,
  `item_status` tinyint(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `items_list`
--

INSERT INTO `items_list` (`categories_key`, `item_key`, `item_code`, `item_name`, `item_price`, `item_unit`, `item_is_drugs`, `item_doctor_fee`, `item_doctor_type`, `item_commission_fee`, `item_commission_type`, `item_alert_amount`, `item_alert_type`, `item_status`) VALUES
('4181a35429da423d4df98640d2dc5b86', '7688fd920ad66e3ec055c9da614f2487', 'test', 'test', 123, 'acf212c78cafdd55bfaf2c76e8093965', 'N', 0, 0, 0, 0, 0, '', 1),
('d59d44be6a7b72bc9f2a6bd3741e6c2a', '7d4498bca493ed5dc5aa048e11194974', 'TY001', 'test ยา', 10, 'acf212c78cafdd55bfaf2c76e8093965', 'Y', 0, 0, 0, 0, 0, '', 1);

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

--
-- Table structure for table `language`
--

CREATE TABLE IF NOT EXISTS `language` (
  `language_code` varchar(16) NOT NULL,
  `language_name` varchar(32) NOT NULL,
  `language_status` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `language`
--

INSERT INTO `language` (`language_code`, `language_name`, `language_status`) VALUES
('en', 'English', 0),
('th', 'ภาษาไทย', 1);

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

--
-- Table structure for table `line_connect`
--

CREATE TABLE IF NOT EXISTS `line_connect` (
  `lc_key` varchar(64) NOT NULL,
  `lc_id_number` varchar(32) NOT NULL,
  `lc_pat_cn` varchar(32) NOT NULL,
  `lc_pat_key` varchar(32) NOT NULL,
  `lc_status` tinyint(1) NOT NULL,
  `lc_insert` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `line_connect`
--

INSERT INTO `line_connect` (`lc_key`, `lc_id_number`, `lc_pat_cn`, `lc_pat_key`, `lc_status`, `lc_insert`) VALUES
('U685e495d4c5d67c2a7eb43fcff3981a1', '123412341234', 'ac2105028', 'f6244ffe600b702d42839d0937641499', 1, '2021-05-28 00:03:30'),
('Uc3c80689b1fb71dbe00566f8cbacbe21', '1560300121206', 'Ac2105027', 'dc64f09f9774f421e25de327c9ce2e70', 1, '2021-05-28 00:01:44');

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

--
-- Table structure for table `list`
--

CREATE TABLE IF NOT EXISTS `list` (
  `cases` varchar(64) NOT NULL,
  `menu` varchar(64) NOT NULL,
  `pages` varchar(128) NOT NULL,
  `status` tinyint(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `list`
--

INSERT INTO `list` (`cases`, `menu`, `pages`, `status`) VALUES
('today', 'today', 'today/main.php', 1),
('patients', 'patients', 'patients/main.php', 1),
('appointments', 'appointments', 'appointments/main.php', 1),
('rooms', 'rooms', 'rooms/main.php', 1),
('cashier', 'cashier', 'cashier/main.php', 1),
('store', 'store', 'store/main.php', 1),
('report', 'report', 'report/main.php', 1),
('settings', 'settings', 'settings/main.php', 1),
('patient_insert', 'patients', 'patients/insert.php', 1),
('report_income', 'report', 'report/report_income.php', 1),
('report_saving', 'report', 'report/report_saving.php', 1),
('report_income_group', 'report', 'report/report_income_group.php', 1),
('report_doctor_fund', 'report', 'report/report_doctor_fund.php', 1),
('report_stock', 'report', 'report/report_stock.php', 1),
('report_stock_import', 'report', 'report/report_stock_import.php', 1),
('report_stock_export', 'report', 'report/report_stock_export.php', 1),
('report_data_patients', 'report', 'report/report_data_patients.php', 1),
('report_appointments', 'report', 'report/report_appointments.php', 1),
('report_billing', 'report', 'report/report_billing.php', 1),
('report_data_doctor', 'report', 'report/report_data_doctor.php', 1),
('report_data_users', 'report', 'report/report_data_users.php', 1),
('report_history', 'report', 'report/report_history.php', 1),
('settings_users', 'settings', 'settings/settings_users.php', 1),
('settings_doctor', 'settings', 'settings/settings_doctor.php', 1),
('settings_bill_format', 'settings', 'settings/settings_bill_format.php', 1),
('about_software', 'settings', 'settings/about_software.php', 1),
('settings_clinic', 'settings', 'settings/settings_clinic.php', 1),
('settings_rooms', 'settings', 'settings/settings_rooms.php', 1),
('settings_system_report', 'settings', 'settings/settings_system_report.php', 1),
('settings_number_format', 'settings', 'settings/settings_number_format.php', 1),
('settings_data_center', 'settings', 'settings/settings_data_center.php', 1),
('settings_income_group', 'settings', 'settings/settings_income_group.php', 1),
('settings_income_list', 'settings', 'settings/settings_income_list.php', 1),
('settings_promotion', 'settings', 'settings/settings_promotion.php', 1),
('settings_user_info', 'settings', 'settings/settings_user_info.php', 1),
('settings_zibb', 'settings', 'settings/settings_zibb.php', 1),
('settings_help', 'settings', 'settings/settings_help.php', 1),
('patient_detail', 'patients', 'patients/patient_detail.php', 1),
('patient_appointment', 'patients', 'patients/patient_appointment.php', 1),
('search', '', 'main/search.php', 1),
('treatments', 'rooms', 'treatments/main.php', 1),
('payment', 'cashier', 'cashier/payment.php', 1),
('drugs_detail', 'store', 'store/drugs_detail.php', 1),
('appointments_edit', 'appointments', 'appointments/appointments_edit.php', 1),
('settings_users_access', 'settings', 'settings/settings_user_access.php', 1),
('edit_settings_doctor', 'settings', 'settings/edit_settings_doctor.php', 1),
('edit_settings_rooms', 'settings', 'settings/edit_settings_rooms.php', 1),
('edit_settings_income_group', 'settings', 'settings/edit_settings_income_group.php', 1),
('edit_settings_income_list', 'settings', 'settings/edit_settings_income_list.php', 1),
('edit_settings_promotion', 'settings', 'settings/edit_settings_promotion.php', 1),
('appointments_detail', 'appointments', 'appointments/appointments_detail.php', 1),
('report_payment', 'report', 'report/report_payment.php', 1),
('master_clinics', 'master_clinics', 'pages/clinics.php', 1),
('master_payments', 'master_payments', 'pages/payments.php', 1),
('master_settings', 'master_settings', 'pages/settings.php', 1),
('master_news', 'master_news', 'pages/news.php', 1),
('master_questions', 'master_questions', 'pages/questions.php', 1),
('master_clinics_detail', 'master_clinics', 'pages/clinics_detail.php', 1),
('payment_debt', 'cashier', 'cashier/payment_debt.php', 1),
('settings_version', 'settings', 'settings/settings_version.php', 1),
('master_sql', 'master_sql', 'pages/master_sql.php', 1),
('settings_mail_show_detail', 'settings', 'settings/settings_mail_show_detail.php', 1),
('master_mail_alert', 'master_clinics', 'pages/mail_alert.php', 1),
('settings_package_payment', 'settings', 'settings/settings_package_payment.php', 1),
('administrator_cases', 'setting', 'administrator/administrator_cases.php', 1),
('administrator_menus', 'setting', 'administrator/administrator_menus.php', 1),
('management', 'management', 'management/main.php', 1),
('treatment_detail', 'rooms', 'treatments/treatment_detail.php', 1),
('patient_history', 'patients', 'patients/patient_history.php', 1),
('doctor_detail', 'settings', 'settings/doctor_detail.php', 1),
('settings_income_private_list', 'settings', 'settings/settings_income_private_list.php', 1),
('settings_backup', 'settings', 'settings/settings_backup.php', 1),
('view_appointment_all_day', 'appointments', 'appointments/view_appointment_all_day.php', 1),
('edit_appointment', 'appointments', 'appointments/edit_appointment.php', 1),
('settings_dental_treatments', 'settings', 'settings/settings_dental_treatments.php', 1),
('expenses', 'management', 'management/expenses.php', 1),
('settings_system', 'settings', 'settings/settings_system.php', 1),
('settings_employee', 'settings', 'settings/settings_employee.php', 1),
('treatment', 'rooms', 'rooms/treatment.php', 1),
('salary', 'management', 'management/salary.php', 1),
('drug_detail', 'store', 'store/drug_detail.php', 1),
('sell', '', 'sell/main.php', 1),
('cashier_detail', 'cashier', 'cashier/cashier_detail.php', 1),
('administrator_access_list', 'setting', 'administrator/administrator_access_list.php', 1),
('doctor_appointment', 'doctor_appointment', 'doctors/doctor_appointment.php', 1),
('doctor_fund', 'doctor_fund', 'doctors/doctor_fund.php', 1),
('doctor_patient', 'doctor_patient', 'doctors/doctor_patient.php', 1),
('getappointment', '', 'main/getappointment.php', 1),
('cashier_debtor', 'cashier', 'cashier/cashier_debtor.php', 1),
('report_income_summary', 'report', 'report/report_income_summary.php', 1),
('report_reciept', 'report', 'report/report_reciept.php', 1),
('report_summary_day', 'report', 'report/report_summary_day.php', 1),
('edit_cashier_detail', 'cashier', 'cashier/edit_cashier_detail.php', 1),
('settings_appointment_flag', 'settings', 'settings/settings_appointment_flag.php', 1),
('settings_patient_source', 'settings', 'settingssettings_patient_source.php', 1),
('branch', 'settings', 'settings/setting_branch.php', 1),
('appointment_list', 'appointments', 'appointments/appointment_list.php', 1),
('calendar', 'appointments', 'appointments/calendar.php', 1),
('doctor_rooms', 'doctor_rooms', 'rooms/doctor_rooms.php', 1),
('treatment_doctor', 'rooms', 'rooms/treatment_doctor.php', 1),
('view_appointment_doctor_day', 'appointments', 'appointments/view_appointment_doctor_day.php', 1),
('report_appointment', 'report', 'report/report_appointment.php', 1),
('report_patient_active', 'report', 'report/report_patient_active.php', 1),
('report_item_use', 'report', 'report/report_item_use.php', 1),
('report_income_group_detail', 'report', 'report/report_income_group_detail.php', 1),
('report_expenses', 'report', 'report/report_expenses.php', 1),
('report_expenses_detail', 'report', 'report/report_expenses_detail.php', 1),
('report_salary', 'report', 'report/report_salary.php', 1),
('setting_employees_detail', 'setting', 'settings/setting_employees_detail.php', 1),
('salary_detail', 'management', 'management/salary_detail.php', 1),
('salary_employee_detail', 'management', 'management/salary_employee_detail.php', 1),
('report_salary_detail', 'report', 'report/report_salary_detail.php', 1),
('report_salary_employee_detail', 'report', 'report/report_salary_employee_detail.php', 1),
('settings_followup_flag', 'settings', 'settings/settings_followup_flag.php', 1),
('followup', 'followup', 'management/followup.php', 1),
('management_doctor_fund', 'management', 'management/management_doctor_fund.php', 1),
('doctor_fund_detail', 'management', 'management/doctor_fund_detail.php', 1),
('doctor_fund_other_add', 'management', 'management/doctor_fund_other_add.php', 1),
('settings_pay', 'settings', 'settings/settings_pay.php', 1),
('settings_more_storage', 'settings', 'settings/settings_more_storage.php', 1),
('settings_credit', 'settings', 'settings/settings_credit.php', 1),
('treatment_add_history', 'management', 'management/treatment_add_history.php', 1),
('treatment_history', 'management', 'management/treatment_history.php', 1),
('report_summary_day_tax', 'report', 'report/report_summary_day_tax.php', 1),
('report_income_group_tax', 'report', 'report/report_income_group_tax.php', 1),
('report_doctor_fund_tax', 'report', 'report/report_doctor_fund_tax.php', 1),
('report_reciept_check_tax', 'report', 'report/report_reciept_check_tax.php', 1),
('report_autonumber_tax', 'report', 'report/report_autonumber_tax.php', 1),
('report_income_group_detail_tax', 'report', 'report/report_income_group_detail_tax.php', 1),
('settings_unit', 'setting', 'settings/settings_unit.php', 1),
('settings_patient_flag', 'setting', 'settings/settings_patient_flag.php', 1),
('add_appointment', 'main', 'main/add_appointment.php', 1),
('new_appointment', 'main', 'main/new_appointment.php', 1),
('management_doctor_calendar', 'management', 'management/management_doctor_calendar.php', 1),
('management_doctor_calendar_detail', 'management', 'management/management_doctor_calendar_detail.php', 1),
('settings_default_item', 'settings', 'settings/settings_default_item.php', 1);

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

--
-- Table structure for table `logs`
--

CREATE TABLE IF NOT EXISTS `logs` (
  `log_key` varchar(16) NOT NULL,
  `log_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `log_ipaddress` varchar(32) NOT NULL,
  `log_text` varchar(256) NOT NULL,
  `log_user` varchar(32) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `logs`
--

INSERT INTO `logs` (`log_key`, `log_date`, `log_ipaddress`, `log_text`, `log_user`) VALUES
('bee3fa7e9b033d4a', '2020-03-19 09:01:06', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('f98cf66ad6910489', '2020-03-19 09:06:00', '172.68.242.105', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('092a18fe55d1246f', '2020-03-19 09:06:08', '172.68.242.105', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('dcfaf9a0eb2d2424', '2020-03-19 09:06:10', '172.68.242.105', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('f9da32795f668b98', '2020-05-23 05:15:43', '162.158.165.61', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('cbe3ccf4b64a4b56', '2020-05-23 05:16:25', '162.158.165.61', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('0d1192208a9984f4', '2020-06-05 07:13:09', '172.68.6.105', 'admin เข้าสู่ระบบ.', '6690cfcca425120ff7e650b0a791bc71'),
('7b4941ea31e16765', '2020-06-06 08:56:06', '172.68.234.125', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('0584967a0ae2eb0f', '2020-06-06 08:56:21', '172.68.234.125', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('e82356f3b79ecbef', '2020-11-01 02:04:28', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('15a79f9ff6b522dc', '2020-11-01 02:18:01', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('8bcc4b15d2f7b3f9', '2020-11-01 02:38:21', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('d90e7deda9a96d5e', '2020-11-01 02:38:57', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('e19fe98b8f75b737', '2020-11-01 02:46:53', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('d3834d061c6739af', '2020-11-01 14:41:36', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('8506c53ab029acf6', '2020-11-01 15:31:35', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('65205290582f3d9c', '2020-11-01 15:31:37', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('83783ea7e1aedda6', '2020-11-01 15:31:42', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('79027b3331742c01', '2020-11-01 15:31:59', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('4012ec6e44125f9b', '2020-11-01 15:34:36', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('3278c2a96aaf34c5', '2020-11-01 15:34:37', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('6fee1b14e1ba6842', '2020-11-01 15:34:39', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('2ccd9ada95bf2111', '2020-11-01 15:34:45', '::1', 'test เข้าสู่ระบบ.', 'e934a4f90e9f302b662f7395b37855d9'),
('07f7061cd1228eae', '2020-11-01 15:42:20', '::1', 'test ออกจากระบบ.', 'e934a4f90e9f302b662f7395b37855d9'),
('18b1f7b579cf6fbf', '2020-11-01 15:42:22', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('a2456710dd0391b4', '2020-11-01 15:44:05', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('04931bfd1805c880', '2020-11-01 15:44:12', '::1', 'test เข้าสู่ระบบ.', 'e934a4f90e9f302b662f7395b37855d9'),
('1245f03e25d39b02', '2020-11-01 15:51:29', '::1', 'test ออกจากระบบ.', 'e934a4f90e9f302b662f7395b37855d9'),
('05157f41a48d39e7', '2020-11-06 04:47:21', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('9b93a7adfa9fe30a', '2020-11-10 04:40:33', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('0337369744cbd9f4', '2020-11-10 04:45:36', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('4fb78dbfc82d825b', '2020-11-10 04:45:43', '::1', 'ADBE4G97 เข้าสู่ระบบ.', 'd8844fd909bc0ab5f0eaf5358fa73f82'),
('6542ac0b6cd9a308', '2020-11-10 04:46:10', '::1', 'ADBE4G97 ออกจากระบบ.', 'd8844fd909bc0ab5f0eaf5358fa73f82'),
('1247b7d996c9375f', '2020-11-10 04:46:11', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('56f83035dd75f23b', '2020-11-10 20:20:11', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('0f3bd22e78918204', '2020-11-10 22:13:49', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('2432b5b5c296497b', '2020-11-10 22:13:55', '::1', 'admin เข้าสู่ระบบ.', '6690cfcca425120ff7e650b0a791bc71'),
('4a74a1feb1c6daf5', '2020-11-10 22:48:48', '::1', 'admin ออกจากระบบ.', '6690cfcca425120ff7e650b0a791bc71'),
('09f49dc7f37599d4', '2020-11-24 05:15:14', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('335ac02b5d3670e1', '2020-11-24 05:18:36', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('cbcdb80b6277a8ba', '2020-11-24 05:18:41', '::1', 'admin เข้าสู่ระบบ.', '6690cfcca425120ff7e650b0a791bc71'),
('7e1e3e02791106f8', '2020-11-24 05:18:45', '::1', 'admin ออกจากระบบ.', '6690cfcca425120ff7e650b0a791bc71'),
('a4686c7c8e780534', '2020-11-24 05:18:54', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('c5cd225274c70def', '2020-11-25 01:43:31', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('e0521f03930c8e6d', '2020-11-25 19:33:58', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('f00e63cc2d37d4ef', '2020-12-07 08:52:03', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('e97a73c1b0ba04a8', '2021-01-24 13:02:44', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('5e1cc4f6925b553e', '2021-01-24 13:51:41', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('459a6de16f244dfd', '2021-01-24 13:51:46', '::1', 'admin เข้าสู่ระบบ.', '6690cfcca425120ff7e650b0a791bc71'),
('43d1a2f7f6ea53db', '2021-01-24 13:51:49', '::1', 'admin ออกจากระบบ.', '6690cfcca425120ff7e650b0a791bc71'),
('367ddffc255a9dc7', '2021-01-24 13:51:52', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('9913ed1862508c10', '2021-01-24 13:52:22', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('78723356cfc377e7', '2021-01-24 13:52:24', '::1', 'admin เข้าสู่ระบบ.', '6690cfcca425120ff7e650b0a791bc71'),
('c985406af1c47826', '2021-01-24 13:52:29', '::1', 'admin ออกจากระบบ.', '6690cfcca425120ff7e650b0a791bc71'),
('76528ab79fe96da8', '2021-01-24 13:52:32', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('41020377e13a40d9', '2021-01-25 08:00:32', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('49f258e572c5cae8', '2021-01-25 08:52:29', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('916c7c1f791abd14', '2021-01-25 08:52:33', '::1', 'admin เข้าสู่ระบบ.', '6690cfcca425120ff7e650b0a791bc71'),
('09b6512e9ee24478', '2021-01-25 08:53:05', '::1', 'admin ออกจากระบบ.', '6690cfcca425120ff7e650b0a791bc71'),
('621b774a05e91b3f', '2021-01-25 08:53:07', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('82e395d59049637f', '2021-01-25 08:54:34', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('9a388b6634a72d5a', '2021-01-25 09:02:33', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('c64277b157cad8e9', '2021-01-25 09:02:35', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('b203d74cf6db849e', '2021-01-25 09:04:37', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('313a070f995a0e47', '2021-01-25 09:06:56', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('c7160c04b9146be5', '2021-01-25 09:07:56', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('b555f79a7dc94ce8', '2021-01-26 00:56:59', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('f1dbde73c7018555', '2021-01-26 01:00:55', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('70d01c676a90c324', '2021-02-01 05:00:21', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('01aec3500700ebd5', '2021-02-01 05:51:45', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('3240a1409a776ab5', '2021-02-01 05:55:56', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('cd78569a06c53be3', '2021-02-01 06:09:15', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('4876db91090d5dc4', '2021-03-08 08:26:50', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('cbff160929144fef', '2021-03-08 08:26:57', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('b87d06de080e2704', '2021-03-08 08:27:45', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('ca2829eee311dc24', '2021-03-08 08:27:46', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('4db5d1ee10d153e1', '2021-04-16 05:39:53', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('a2de48bb2b76512e', '2021-04-16 05:40:07', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('bb672aa0f00d310b', '2021-04-30 02:43:55', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('684accd63777ca5d', '2021-04-30 02:44:02', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('7d3c5d47bb4137a9', '2021-04-30 02:44:06', '::1', 'admin เข้าสู่ระบบ.', '6690cfcca425120ff7e650b0a791bc71'),
('d59cc37bc0e22c3a', '2021-04-30 02:44:14', '::1', 'admin ออกจากระบบ.', '6690cfcca425120ff7e650b0a791bc71'),
('0a886a3f8c705df3', '2021-05-12 04:11:26', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('1e6a250ccf0ebb92', '2021-05-27 07:00:25', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('d564b68c581b3d82', '2021-05-27 08:30:45', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('24d19f65dbd604e4', '2021-05-27 10:21:52', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('415fa72cba73864e', '2021-05-27 10:22:20', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('8d50957c4af139af', '2021-05-27 10:22:24', '::1', 'test เข้าสู่ระบบ.', 'e934a4f90e9f302b662f7395b37855d9'),
('f08813614b97d899', '2021-05-27 10:30:13', '::1', 'test ออกจากระบบ.', 'e934a4f90e9f302b662f7395b37855d9'),
('6668d1783f49332b', '2021-05-27 10:30:15', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('fb796c9a29fe9233', '2021-05-27 10:30:56', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('0b37ee7020c39d88', '2021-05-27 10:31:05', '::1', 'test เข้าสู่ระบบ.', 'e934a4f90e9f302b662f7395b37855d9'),
('f4edd3373065181a', '2021-05-27 10:31:18', '::1', 'test ออกจากระบบ.', 'e934a4f90e9f302b662f7395b37855d9'),
('2a84e28f308c4ce1', '2021-05-27 10:31:28', '::1', 'test เข้าสู่ระบบ.', 'e934a4f90e9f302b662f7395b37855d9'),
('91892274e3f43c55', '2021-05-27 10:31:43', '::1', 'test ออกจากระบบ.', 'e934a4f90e9f302b662f7395b37855d9'),
('b7ace554f82fc634', '2021-05-27 10:31:45', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('d6892347899c15bf', '2021-05-27 10:32:39', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('c8c582fc6f5d276f', '2021-05-27 10:32:45', '::1', 'test เข้าสู่ระบบ.', 'e934a4f90e9f302b662f7395b37855d9'),
('93876189c5ffa68d', '2021-05-27 10:33:14', '::1', 'test ออกจากระบบ.', 'e934a4f90e9f302b662f7395b37855d9'),
('982d8713c394c720', '2021-05-27 10:33:17', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('50dc990353b22ff7', '2021-05-27 17:27:49', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('4bd6c9ab64f81ced', '2021-06-02 11:36:57', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('8f92fb7a0a6b5497', '2021-06-08 05:05:33', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('1a140323fa7d8651', '2021-06-08 08:07:40', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('f43eb6fa473e19bd', '2021-06-15 01:50:48', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('08a96cfa929d06f6', '2021-06-15 01:57:54', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('c56068c161247928', '2021-06-15 02:09:55', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('87bc7157ed6f9cd6', '2021-06-15 02:11:06', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('8203478a36e231d4', '2021-06-15 02:35:39', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('cb5d07a129584e11', '2021-06-15 02:39:28', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('4e5b414e22d55c67', '2021-06-15 02:40:09', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('f5651f61630eb1bb', '2021-06-15 03:07:33', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('4c1978cd89d9bdec', '2021-06-15 03:07:36', '::1', 'admin เข้าสู่ระบบ.', '6690cfcca425120ff7e650b0a791bc71'),
('5185d3bafdc9ecb4', '2021-06-15 04:48:09', '::1', 'admin ออกจากระบบ.', '6690cfcca425120ff7e650b0a791bc71'),
('4f4c0ecd25a6ab98', '2021-06-15 04:48:21', '::1', 'admin เข้าสู่ระบบ.', '6690cfcca425120ff7e650b0a791bc71'),
('a7c7676211db153e', '2021-06-15 05:19:13', '::1', 'admin ออกจากระบบ.', '6690cfcca425120ff7e650b0a791bc71'),
('1e99fc41b3d552b8', '2021-06-15 05:19:16', '::1', 'test เข้าสู่ระบบ.', 'e934a4f90e9f302b662f7395b37855d9'),
('9c1cfa6f92ec06a8', '2021-06-15 05:19:41', '::1', 'test ออกจากระบบ.', 'e934a4f90e9f302b662f7395b37855d9'),
('825a1b3d9dd2c483', '2021-06-15 05:19:43', '::1', 'admin เข้าสู่ระบบ.', '6690cfcca425120ff7e650b0a791bc71'),
('475f23be9f7e0352', '2021-06-15 08:02:08', '::1', 'admin ออกจากระบบ.', '6690cfcca425120ff7e650b0a791bc71'),
('9b0f1e71dba74385', '2021-06-15 08:02:28', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('108863466c6a159b', '2021-06-15 12:46:15', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('de32d3dedcd8b6be', '2021-06-15 12:46:20', '::1', 'admin เข้าสู่ระบบ.', '6690cfcca425120ff7e650b0a791bc71'),
('92bf213ed4ba734a', '2021-06-15 12:46:28', '::1', 'admin ออกจากระบบ.', '6690cfcca425120ff7e650b0a791bc71'),
('cbecbb03e2f24b27', '2021-06-15 12:46:32', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('06e9eb4f28296358', '2021-06-15 13:00:44', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('bd5baafa65348d66', '2021-06-15 13:00:53', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('a1f8776e91ebd317', '2021-06-15 13:02:28', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('926adb8b57b5c5eb', '2021-06-15 13:52:29', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('50a1131f24798f71', '2021-06-15 13:54:44', '::1', 'dump ออกจากระบบ.', 'c37d695c6f1144abdefa8890a921b8fb'),
('2144a194d4f4a2a6', '2021-06-15 13:54:46', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('b662084b13d36583', '2021-06-15 14:21:19', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('620e66dc6e485962', '2021-06-15 14:21:23', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('ec2b2a2790d94122', '2021-06-15 14:21:42', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('e2edbc0b8057011d', '2021-06-15 14:25:55', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('76252f83b062d404', '2021-06-15 14:29:05', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('38909d505b36e811', '2021-06-15 14:35:02', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('6f000b66385a2afa', '2021-06-15 14:43:06', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('c43c52425bc36507', '2021-06-15 14:43:13', '::1', 'test เข้าสู่ระบบ.', 'e934a4f90e9f302b662f7395b37855d9'),
('dd371ae7864db228', '2021-06-15 14:50:13', '::1', 'test ออกจากระบบ.', 'e934a4f90e9f302b662f7395b37855d9'),
('4e9406839670653c', '2021-06-15 14:50:16', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('705cf1c0ff98b6d3', '2021-06-15 15:53:16', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('35fe0ae505f2b408', '2021-06-16 01:07:18', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('39d28ba4a2f0ad86', '2021-06-16 13:59:36', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('522f2fed1c6821ba', '2021-06-16 14:00:13', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('a260b1182fbccf8e', '2021-06-17 02:24:16', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('8c2a51c54527ba56', '2021-06-17 02:56:41', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('c298bf7b08a79145', '2021-06-17 03:00:01', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('ee581c358700e41c', '2021-06-17 03:02:49', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('1f5b02e70e2075a5', '2021-06-17 03:02:52', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('7d6b0eb3373cc924', '2021-06-17 03:02:58', '::1', 'test เข้าสู่ระบบ.', 'e934a4f90e9f302b662f7395b37855d9'),
('23a903c84ab918f8', '2021-06-17 03:03:37', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('aa65d78864efc565', '2021-06-17 06:02:45', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('2c3534d036df27e0', '2021-06-17 08:19:26', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('ada89383edd84751', '2021-06-17 08:19:34', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('51f7230b2d7fe7f7', '2021-06-17 08:28:44', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('c76568f3a66f6dc4', '2021-06-17 08:29:02', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('d52068b700b93b5b', '2021-06-17 08:35:11', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('11267d423292eeff', '2021-06-17 08:44:50', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('9f09e96312eab49e', '2021-06-17 09:08:13', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('3d875b0cfaf3de60', '2021-06-17 10:12:37', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('d7ae509933d0b156', '2021-06-17 10:58:48', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('ac1f6ecad5b5df44', '2021-06-17 10:59:39', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('d8ce5104afa99ac6', '2021-06-17 13:52:53', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('41de551887af3bfd', '2021-06-17 15:21:13', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('4af98e2d3f4e33c9', '2021-06-17 15:30:48', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('fa1e43e207811905', '2021-06-17 15:39:25', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('83c9da529960644f', '2021-06-17 15:39:37', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('0efac2a8e42f4f0f', '2021-06-17 15:39:50', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('5e24bd94c4124a9a', '2021-06-17 16:14:38', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('d47c3cf946e91eca', '2021-06-17 16:17:23', '::1', 'dump เข้าสู่ระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed'),
('8b956f9abdfd5204', '2021-06-17 16:27:31', '::1', 'dump ออกจากระบบ.', 'f2372494babff1aa4d6ec3f67fb269ed');

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

--
-- Table structure for table `menus`
--

CREATE TABLE IF NOT EXISTS `menus` (
  `menu_key` char(32) NOT NULL,
  `menu_upkey` char(32) NOT NULL,
  `menu_icon` varchar(256) NOT NULL,
  `menu_name` varchar(128) NOT NULL,
  `menu_case` varchar(128) NOT NULL,
  `menu_link` varchar(256) NOT NULL,
  `menu_status` tinyint(1) NOT NULL,
  `menu_sorting` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `menus`
--

INSERT INTO `menus` (`menu_key`, `menu_upkey`, `menu_icon`, `menu_name`, `menu_case`, `menu_link`, `menu_status`, `menu_sorting`) VALUES
('0d0c8a1e35744ff2b82698b68907231e', '0d0c8a1e35744ff2b82698b68907231e', '<i class="LA_SYSTEM_ICON_PREFIX \n fa-chart-pie fa-fw"></i>', 'LA_NV_REPORTS', 'report', '?p=report', 1, 8),
('0dd4ee8ead7fea4f3e212a716446f490', '0dd4ee8ead7fea4f3e212a716446f490', '<i class="LA_SYSTEM_ICON_PREFIX fa-stretcher fa-fw"></i>', 'ห้องตรวจ', 'doctor_rooms', '?p=doctor_rooms', 1, 3),
('1a564b7440e3db290cecade17ee31a58', '1a564b7440e3db290cecade17ee31a58', '<i class="LA_SYSTEM_ICON_PREFIX fa-calendar-check fa-fw"></i>', 'LA_NV_APPOINTMENTS', 'appointments', '?p=appointments', 1, 4),
('2e13c9cc43f1c2e9127e1b7d6e46689a', '2e13c9cc43f1c2e9127e1b7d6e46689a', '<i class="LA_SYSTEM_ICON_PREFIX fa-id-badge fa-fw"></i>', 'ข้อมูลผู้รับบริการที่เคยรักษา', 'doctor_patient', '?p=doctor_patient', 1, 17),
('3597c88b7c302d3c7d5fd103c098bdb5', '3597c88b7c302d3c7d5fd103c098bdb5', '<i class="LA_SYSTEM_ICON_PREFIX fa-calendar-check fa-fw"></i>', 'ตารางนัดหมาย', 'doctor_appointment', '?p=doctor_appointment', 1, 15),
('46b6423f9e3043960266b283f27b47fc', '46b6423f9e3043960266b283f27b47fc', '<i class="LA_SYSTEM_ICON_PREFIX fa-sign-out fa-fw"></i>', 'LA_NV_LOGOUT', 'logout', '../core/logout.core.php', 1, 20),
('47c5d634e86d6bdb53d2dea5e0e53053', '47c5d634e86d6bdb53d2dea5e0e53053', '<i class="LA_SYSTEM_ICON_PREFIX \n fa-briefcase fa-fw"></i>', 'LA_NV_MANAGEMENT', 'management', '?p=management', 1, 7),
('5ae242ff82f3b6edc89b6e80d02318a4', '5ae242ff82f3b6edc89b6e80d02318a4', '<i class="LA_SYSTEM_ICON_PREFIX fa-cogs fa-fw"></i>', 'LA_NV_SETTINGS', 'settings', '?p=settings', 1, 18),
('851f6d2f0a1623a1ade13d3477a8ddeb', '851f6d2f0a1623a1ade13d3477a8ddeb', '<i class="LA_SYSTEM_ICON_PREFIX  fa-warehouse-alt fa-fw"></i>', 'LA_NV_STORE', 'store', '?p=store', 1, 6),
('8cd2bf0adaa2beb2ad078368ec875664', '8cd2bf0adaa2beb2ad078368ec875664', '<i class="LA_SYSTEM_ICON_PREFIX fa-clinic-medical fa-fw"></i>', 'หน้าแรก <span class="pull-right"><span class="badge" id="today_wait"></span>', '', 'index.php', 1, 0),
('9317a3ac6600102730aae40f4dd1d83b', '9317a3ac6600102730aae40f4dd1d83b', '<i class="LA_SYSTEM_ICON_PREFIX fa-cash-register fa-fw"></i>', 'การเงิน <span class="pull-right"><span class="badge" id="finance_wait"></span></span>', 'cashier', '?p=cashier', 1, 5),
('a4eb01ed36d2958a1c743bd9d2b0e51c', 'a4eb01ed36d2958a1c743bd9d2b0e51c', '<i class="LA_SYSTEM_ICON_PREFIX fa-stretcher fa-fw"></i>', 'LA_NV_ROOMS', 'rooms', '?p=rooms', 1, 3),
('c04144ca3187a338021202164a5da3df', 'c04144ca3187a338021202164a5da3df', '<i class="LA_SYSTEM_ICON_PREFIX fa-hospital-user fa-fw"></i>', 'LA_NV_PATIENTS', 'patients', '?p=patients', 1, 2),
('df8827fb98d409590f0996c76cd34196', 'df8827fb98d409590f0996c76cd34196', '<i class="fa flaticon-vertical4 fa-fw"></i>', 'LA_NV_TODAY', 'today', '?p=today', 0, 1),
('ef79ff4ec3486093d2634a2af888bb65', 'ef79ff4ec3486093d2634a2af888bb65', '<i class="LA_SYSTEM_ICON_PREFIX fa-chart-pie fa-fw"></i>', 'ประวัติการรับส่วนแบ่ง', 'doctor_fund', '?p=doctor_fund', 1, 16);

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

--
-- Table structure for table `modules`
--

CREATE TABLE IF NOT EXISTS `modules` (
  `mod_key` char(32) NOT NULL,
  `mod_title` varchar(128) NOT NULL,
  `mod_detail` text NOT NULL,
  `mod_type` varchar(128) NOT NULL,
  `mod_expire` datetime NOT NULL,
  `mod_status` tinyint(1) NOT NULL,
  `mod_user_key` varchar(32) NOT NULL,
  `mod_insert` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `month`
--

CREATE TABLE IF NOT EXISTS `month` (
  `id` int(11) NOT NULL,
  `month_th` varchar(32) NOT NULL,
  `month_en` varchar(32) NOT NULL
) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `month`
--

INSERT INTO `month` (`id`, `month_th`, `month_en`) VALUES
(1, 'มกราคม', 'January'),
(2, 'กุมภาพันธ์', 'February'),
(3, 'มีนาคม', 'March'),
(4, 'เมษายน', 'April'),
(5, 'พฤษภาคม', 'May'),
(6, 'มิถุนายน', 'June'),
(7, 'กรกฎาคม', 'July'),
(8, 'สิงหาคม', 'August'),
(9, 'กันยายน', 'September'),
(10, 'ตุลาคม', 'October'),
(11, 'พฤศจิกายน', 'November'),
(12, 'ธันวาคม', 'December');

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

--
-- Table structure for table `mstatus`
--

CREATE TABLE IF NOT EXISTS `mstatus` (
  `id` int(11) NOT NULL,
  `mstatus_th` varchar(32) NOT NULL,
  `mstatus_en` varchar(32) NOT NULL
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `mstatus`
--

INSERT INTO `mstatus` (`id`, `mstatus_th`, `mstatus_en`) VALUES
(1, 'โสด', 'Single'),
(2, 'สมรส', 'Marriage'),
(3, 'หย่า', 'Divorce'),
(4, 'หม้าย', 'Widow'),
(5, 'สมณะ', 'Cleric');

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

--
-- Table structure for table `other_charge`
--

CREATE TABLE IF NOT EXISTS `other_charge` (
  `oc_key` char(32) NOT NULL,
  `oc_title` varchar(128) NOT NULL,
  `oc_type` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `other_charge`
--

INSERT INTO `other_charge` (`oc_key`, `oc_title`, `oc_type`) VALUES
('2ff0740abe7cefd1c38e166c5ca56c8b', 'ค่าทำเนียมบัตรเครดิต', 0),
('37a6259cc0c1dae299a7866489dff0bd', '', 2),
('a7b36a6dcb03c729f5161d0de1e91aee', 'ภาษีมูลค่าเพิ่ม', 0),
('bd0e8fef0805793115cdf316c47cc513', 'ค่าบริการอื่น ๆ', 0);

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

--
-- Table structure for table `other_pay`
--

CREATE TABLE IF NOT EXISTS `other_pay` (
  `op_key` char(32) NOT NULL,
  `op_title` varchar(128) NOT NULL,
  `op_type` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `other_pay`
--

INSERT INTO `other_pay` (`op_key`, `op_title`, `op_type`) VALUES
('38b7759ae80d28ac809c58f37ffbb9ba', 'ส่วนลด', 1),
('c76d8ce077e68787cf11b630e568332b', 'หักประกันสังคม', 1),
('f47944b0e798f93fbf4e95d14d1ddd32', '', 2);

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

--
-- Table structure for table `patient`
--

CREATE TABLE IF NOT EXISTS `patient` (
  `pat_key` varchar(32) NOT NULL,
  `pat_cn` varchar(16) NOT NULL,
  `pat_no` varchar(32) NOT NULL,
  `pat_cid` char(13) NOT NULL,
  `pat_prefix` varchar(16) NOT NULL,
  `pat_name` varchar(64) NOT NULL,
  `pat_midname` varchar(64) NOT NULL,
  `pat_lastname` varchar(64) NOT NULL,
  `pat_nickname` varchar(32) NOT NULL,
  `pat_photo` varchar(128) NOT NULL DEFAULT 'noimg.jpg',
  `pat_sex` varchar(8) NOT NULL,
  `pat_born` date NOT NULL,
  `pat_address` varchar(128) NOT NULL,
  `pat_subdistrict` varchar(64) NOT NULL,
  `pat_district` varchar(64) NOT NULL,
  `pat_province` varchar(64) NOT NULL,
  `pat_zipcode` varchar(10) NOT NULL,
  `pat_phone` varchar(16) NOT NULL,
  `pat_email` varchar(64) NOT NULL,
  `pat_diseases` varchar(64) NOT NULL,
  `pat_allergic` varchar(64) NOT NULL,
  `pat_doctor` varchar(32) NOT NULL,
  `pat_plan` text NOT NULL,
  `pat_line_user` varchar(64) NOT NULL,
  `pat_ptf_key` varchar(32) NOT NULL,
  `pat_note` text NOT NULL,
  `pat_last_visit` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `pat_active_status` tinyint(1) NOT NULL DEFAULT '1',
  `pat_create` datetime NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `patient`
--

INSERT INTO `patient` (`pat_key`, `pat_cn`, `pat_no`, `pat_cid`, `pat_prefix`, `pat_name`, `pat_midname`, `pat_lastname`, `pat_nickname`, `pat_photo`, `pat_sex`, `pat_born`, `pat_address`, `pat_subdistrict`, `pat_district`, `pat_province`, `pat_zipcode`, `pat_phone`, `pat_email`, `pat_diseases`, `pat_allergic`, `pat_doctor`, `pat_plan`, `pat_line_user`, `pat_ptf_key`, `pat_note`, `pat_last_visit`, `pat_active_status`, `pat_create`) VALUES
('f6244ffe600b702d42839d0937641499', 'AC200001', '', '', '1', 'test', '', 'test', '', 'noimg.jpg', '0', '0000-00-00', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '2020-11-06 04:48:11', 1, '2020-11-06 11:48:11'),
('dc64f09f9774f421e25de327c9ce2e70', 'WI189166', '', 'zzzzz', '6', 'กัมพล', '', 'เทียมพิน', '', 'noimg.jpg', '0', '2020-01-01', '', '', '', '', '', '0810308082', '', '', '', '', '<p>ทดสอบแผนการรักษา</p><p>ทดสอบแผนการรักษา</p><p>ทดสอบแผนการรักษา</p><p>ทดสอบแผนการรักษา</p>', '', 'e5eb77c4d63097e39f6755f613ecd68f', '', '2021-06-17 02:58:36', 1, '2020-11-06 12:06:13'),
('3023d0a4a524b7a1629092d06ff5b32b', 'AC200002', '', '', '1', 'ttt', '', 'tttt', '', 'noimg.jpg', '0', '0000-00-00', '', '', '', '', '', '', '', '', '', '', '', '', 'f4f1d329857a1b3a9e4a019e77dc9f15', '', '2020-11-25 13:43:34', 1, '2020-11-25 20:43:34'),
('edc26205e7467b1c96e452d21109b855', 'AC210003', '', '', '1', 'test', '', 'test', 'test', 'noimg.jpg', '0', '0000-00-00', '', '', '', '', '', '', '', '', '', '', '', '', 'e5eb77c4d63097e39f6755f613ecd68f', '', '2021-06-15 05:26:53', 1, '2021-06-15 12:26:53'),
('9ff1b5f06648bbc94b60a6f5f1514042', 'AC210004', '111', '', '1', 'natt', '', 'natt', '', 'noimg.jpg', '0', '0000-00-00', '', '', '', '', '', '', '', '', '', '', '', '', 'f4f1d329857a1b3a9e4a019e77dc9f15', '', '2021-06-15 05:28:19', 1, '2021-06-15 12:28:19'),
('141d0ec8c555afa66da89f4aea1fe96e', 'AC210005', '', '', '1', 'zz', '', 'zz', '', 'noimg.jpg', '0', '0000-00-00', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '2021-06-15 05:44:06', 1, '2021-06-15 12:44:06'),
('c46ebaa3f324e2a5fe12e4118eb53996', 'WI189980', '', '', '6', 'aaa', '', 'aaa', '', 'noimg.jpg', '0', '0000-00-00', '', '', '', '', '', 'test', '', '', '', '', '', '', '', '', '2021-06-15 06:31:02', 1, '2021-06-15 13:31:02');

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

--
-- Table structure for table `patient_flag`
--

CREATE TABLE IF NOT EXISTS `patient_flag` (
  `ptf_key` varchar(32) NOT NULL,
  `ptf_title` varchar(128) NOT NULL,
  `ptf_color` varchar(32) NOT NULL,
  `ptf_status` tinyint(1) NOT NULL,
  `ptf_insert` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `patient_flag`
--

INSERT INTO `patient_flag` (`ptf_key`, `ptf_title`, `ptf_color`, `ptf_status`, `ptf_insert`) VALUES
('c179aebe5f6a8d4de72cb871836190e1', 'ประกันสังคม', '#c726f0', 1, '2020-11-25 03:06:01'),
('e5eb77c4d63097e39f6755f613ecd68f', 'จ่ายเอง', '#3864ff', 1, '2020-11-25 03:05:50'),
('f4f1d329857a1b3a9e4a019e77dc9f15', 'ประกันบริษัท', '#17ff3c', 1, '2020-11-25 03:06:47');

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

--
-- Table structure for table `plugins`
--

CREATE TABLE IF NOT EXISTS `plugins` (
  `plug_key` char(32) NOT NULL,
  `plug_title` varchar(128) NOT NULL,
  `plug_description` text NOT NULL,
  `plug_type` tinyint(4) NOT NULL,
  `plug_price` double NOT NULL,
  `plug_active_date` datetime NOT NULL,
  `plug_status` tinyint(1) NOT NULL,
  `plug_insert` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `prefix`
--

CREATE TABLE IF NOT EXISTS `prefix` (
  `id` int(11) NOT NULL,
  `prefix_th` varchar(32) NOT NULL,
  `prefix_en` varchar(32) NOT NULL
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `prefix`
--

INSERT INTO `prefix` (`id`, `prefix_th`, `prefix_en`) VALUES
(2, 'นาย', 'นาย'),
(3, 'นาง', 'นาง'),
(4, 'นางสาว', 'นางสาว'),
(1, 'คุณ', 'คุณ'),
(6, 'ด.ช.', 'ด.ช.'),
(7, 'ด.ญ.', 'ด.ญ.'),
(8, 'Mr.', 'Mr.'),
(9, 'Mrs.', 'Mrs.'),
(10, 'Miss', 'Miss');

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

--
-- Table structure for table `report_income_group`
--

CREATE TABLE IF NOT EXISTS `report_income_group` (
  `incg_key` varchar(32) NOT NULL,
  `incg_title` varchar(128) NOT NULL,
  `incg_start` date NOT NULL,
  `incg_end` date NOT NULL,
  `incg_status` tinyint(1) NOT NULL,
  `incg_insert` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `report_income_group`
--

INSERT INTO `report_income_group` (`incg_key`, `incg_title`, `incg_start`, `incg_end`, `incg_status`, `incg_insert`) VALUES
('67f405eaf26bfa49b55af32bb7514853', 'test', '2020-11-01', '2020-11-30', 1, '2020-11-24 06:17:50');

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

--
-- Table structure for table `report_income_summary_header`
--

CREATE TABLE IF NOT EXISTS `report_income_summary_header` (
  `rish_key` char(32) NOT NULL,
  `rish_title` varchar(128) NOT NULL,
  `rish_start` date NOT NULL,
  `rish_end` date NOT NULL,
  `user_key` varchar(32) NOT NULL,
  `rish_insert` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `room`
--

CREATE TABLE IF NOT EXISTS `room` (
  `room_key` varchar(32) NOT NULL,
  `room_name` varchar(32) NOT NULL,
  `room_des` text NOT NULL,
  `room_status` tinyint(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `room`
--

INSERT INTO `room` (`room_key`, `room_name`, `room_des`, `room_status`) VALUES
('673beee118378467bbfedd1a7f12a0f2', 'ห้องตรวจ 1', 'ห้องตรวจ 1', 1),
('f32fe2e4d487b9e154c947b2adf3a5d5', 'ห้องตรวจ 2', 'ห้องตรวจ 2', 1);

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

--
-- Table structure for table `salary_employees`
--

CREATE TABLE IF NOT EXISTS `salary_employees` (
  `semp_key` char(32) NOT NULL,
  `emp_key` varchar(32) NOT NULL,
  `salary_key` varchar(32) NOT NULL,
  `semp_salary` double NOT NULL,
  `semp_status` tinyint(1) NOT NULL,
  `semp_insert` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `salary_header`
--

CREATE TABLE IF NOT EXISTS `salary_header` (
  `salary_key` char(32) NOT NULL,
  `salary_title` varchar(128) NOT NULL,
  `salary_start` date NOT NULL,
  `salary_end` date NOT NULL,
  `salary_status` tinyint(1) NOT NULL,
  `salary_insert` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `salary_other_income`
--

CREATE TABLE IF NOT EXISTS `salary_other_income` (
  `soin_key` char(32) NOT NULL,
  `emp_key` varchar(32) NOT NULL,
  `salary_key` varchar(32) NOT NULL,
  `soin_title` varchar(128) NOT NULL,
  `soin_date` date NOT NULL,
  `soin_amount` double NOT NULL,
  `user_key` varchar(32) NOT NULL,
  `soin_insert` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `salary_other_outcome`
--

CREATE TABLE IF NOT EXISTS `salary_other_outcome` (
  `sooc_key` char(32) NOT NULL,
  `emp_key` varchar(32) NOT NULL,
  `salary_key` varchar(32) NOT NULL,
  `sooc_title` varchar(128) NOT NULL,
  `sooc_date` date NOT NULL,
  `sooc_amount` double NOT NULL,
  `user_key` varchar(32) NOT NULL,
  `sooc_insert` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `sell_detail`
--

CREATE TABLE IF NOT EXISTS `sell_detail` (
  `ds_key` char(32) NOT NULL,
  `sellh_key` varchar(32) NOT NULL,
  `pro_key` varchar(32) NOT NULL,
  `ds_quantity` double NOT NULL,
  `ds_price_per_unit` double NOT NULL,
  `unit_key` varchar(32) NOT NULL,
  `user_key` varchar(32) NOT NULL,
  `ds_insert` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `sell_detail`
--

INSERT INTO `sell_detail` (`ds_key`, `sellh_key`, `pro_key`, `ds_quantity`, `ds_price_per_unit`, `unit_key`, `user_key`, `ds_insert`) VALUES
('13d77b61a0f51e346a95e5fdaec700e3', '5373766967aa09640a2d17ce0179c15e', '802411d5299e367501f38ce8b1d554ab', 1, 10, 'acf212c78cafdd55bfaf2c76e8093965', 'f2372494babff1aa4d6ec3f67fb269ed', '2020-11-06 05:23:02'),
('36342690be1a4176bcb86c0c546a2234', '6456cd8b3ea637fe6686763bbe3c2e78', '802411d5299e367501f38ce8b1d554ab', 1, 10, 'acf212c78cafdd55bfaf2c76e8093965', '6690cfcca425120ff7e650b0a791bc71', '2021-06-15 04:10:47'),
('cfa1e6ee8411e4f79a7bdeb08f8c369e', 'ad1e882ffe89ab81accd77c39aa46b06', '802411d5299e367501f38ce8b1d554ab', 1, 10, 'acf212c78cafdd55bfaf2c76e8093965', '6690cfcca425120ff7e650b0a791bc71', '2021-06-15 05:05:23');

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

--
-- Table structure for table `sell_header`
--

CREATE TABLE IF NOT EXISTS `sell_header` (
  `sellh_key` char(32) NOT NULL,
  `finh_number` varchar(32) NOT NULL,
  `sellh_name` varchar(32) NOT NULL,
  `sellh_note` text NOT NULL,
  `finance_discount` double NOT NULL,
  `finance_discount_type` tinyint(1) NOT NULL,
  `finance_discount_value` double NOT NULL,
  `op_key` varchar(32) NOT NULL,
  `finance_other_pay` double NOT NULL,
  `finance_other_pay_type` tinyint(4) NOT NULL,
  `finance_other_pay_value` double NOT NULL,
  `oc_key` varchar(32) NOT NULL,
  `finance_fee` double NOT NULL,
  `finance_fee_type` tinyint(1) NOT NULL,
  `finance_fee_value` double NOT NULL,
  `price_all` double NOT NULL,
  `price_all_total` double NOT NULL,
  `finh_pay_type` tinyint(1) NOT NULL COMMENT '1=เงินสด,2=บัตรเครดิต,3=โอนผ่านบัญชีธนาคาร,4=ค้างชำระ,5=ชำระหนี้ครบแล้ว',
  `finh_create_card_type` tinyint(1) NOT NULL COMMENT '0=No Credit card,1=Visa,2=Master Card,3=american Express,5=Other',
  `finh_create_card_number` varchar(32) NOT NULL,
  `finh_type` tinyint(1) NOT NULL DEFAULT '1',
  `user_key` varchar(32) NOT NULL,
  `finh_insert` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `sell_header`
--

INSERT INTO `sell_header` (`sellh_key`, `finh_number`, `sellh_name`, `sellh_note`, `finance_discount`, `finance_discount_type`, `finance_discount_value`, `op_key`, `finance_other_pay`, `finance_other_pay_type`, `finance_other_pay_value`, `oc_key`, `finance_fee`, `finance_fee_type`, `finance_fee_value`, `price_all`, `price_all_total`, `finh_pay_type`, `finh_create_card_type`, `finh_create_card_number`, `finh_type`, `user_key`, `finh_insert`) VALUES
('5373766967aa09640a2d17ce0179c15e', 'RA20110001', 'eee', 'eee', 0, 0, 0, '', 0, 0, 0, '37a6259cc0c1dae299a7866489dff0bd', 0, 0, 0, 10, 10, 1, 0, '', 2, 'f2372494babff1aa4d6ec3f67fb269ed', '2020-11-06 05:23:02'),
('6456cd8b3ea637fe6686763bbe3c2e78', 'RA21060001', 'dump', 'test', 0, 0, 0, '', 0, 0, 0, '37a6259cc0c1dae299a7866489dff0bd', 0, 0, 0, 10, 10, 1, 0, '', 2, '6690cfcca425120ff7e650b0a791bc71', '2021-06-15 04:10:47'),
('ad1e882ffe89ab81accd77c39aa46b06', 'RA21060002', 'wwww', 'ddd', 0, 0, 0, '', 0, 0, 0, '37a6259cc0c1dae299a7866489dff0bd', 0, 0, 0, 10, 10, 1, 0, '', 2, '6690cfcca425120ff7e650b0a791bc71', '2021-06-15 05:05:23');

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

--
-- Table structure for table `sell_temp`
--

CREATE TABLE IF NOT EXISTS `sell_temp` (
  `sell_key` char(32) NOT NULL,
  `item_key` varchar(32) NOT NULL,
  `sell_price_per_unit` double NOT NULL,
  `sell_amount` double NOT NULL,
  `user_key` varchar(32) NOT NULL,
  `sell_insert` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `sex`
--

CREATE TABLE IF NOT EXISTS `sex` (
  `id` int(11) NOT NULL,
  `sex_th` varchar(32) NOT NULL,
  `sex_en` varchar(32) NOT NULL
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `sex`
--

INSERT INTO `sex` (`id`, `sex_th`, `sex_en`) VALUES
(1, 'ชาย', 'Male'),
(2, 'หญิง', 'Female'),
(3, 'ไม่ระบุ', 'Unknown');

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

--
-- Table structure for table `system_font_size`
--

CREATE TABLE IF NOT EXISTS `system_font_size` (
  `font_key` char(32) NOT NULL,
  `font_name` varchar(128) NOT NULL,
  `font_size_text` text NOT NULL,
  `font_status` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `system_font_size`
--

INSERT INTO `system_font_size` (`font_key`, `font_name`, `font_size_text`, `font_status`) VALUES
('6c3ca25445248c1dff79d51ad9fa4082', '14px', 'font-size:14px;', 1),
('74af75636b4e933684d63b617c97f398', '24px', 'font-size:24px;', 1),
('bffeb9ae0d04ffc7affc3701f9858932', '22px', 'font-size:22px;', 1),
('dd7e28065e654467be0f9c16f3bd987d', '16px', 'font-size:16px;', 1),
('e215155479796a0bdcad2326ffca09c7', '18px', 'font-size:18px;', 1),
('ff9ec5b758824e67edcf5ecc7e635f6f', '20px', 'font-size:20px;', 1);

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

--
-- Table structure for table `system_info`
--

CREATE TABLE IF NOT EXISTS `system_info` (
  `site_key` char(32) NOT NULL,
  `clinic_title` varchar(256) NOT NULL,
  `clinic_drugs` varchar(32) NOT NULL,
  `clinic_xray` varchar(32) NOT NULL,
  `clinic_address` text NOT NULL,
  `clinic_latitude` double(18,15) NOT NULL,
  `clinic_longitude` double(18,15) NOT NULL,
  `site_logo` varchar(256) NOT NULL,
  `site_favicon` varchar(256) NOT NULL,
  `time_zone` varchar(128) NOT NULL,
  `year_type` varchar(16) NOT NULL,
  `year_format` varchar(32) NOT NULL,
  `reciept_logo_en` varchar(128) NOT NULL,
  `reciept_title_en` varchar(128) NOT NULL,
  `reciept_address_en` text NOT NULL,
  `reciept_note_en` text NOT NULL,
  `reciept_bottom_left_en` text NOT NULL,
  `reciept_bottom_right_en` text NOT NULL,
  `reciept_logo_th` varchar(128) NOT NULL,
  `reciept_title_th` varchar(128) NOT NULL,
  `reciept_address_th` text NOT NULL,
  `reciept_note_th` text NOT NULL,
  `reciept_bottom_left_th` text NOT NULL,
  `reciept_bottom_right_th` text NOT NULL,
  `sell_key` varchar(32) NOT NULL,
  `vat_include` double NOT NULL,
  `system_tax` double NOT NULL,
  `followup_before_day` int(11) NOT NULL,
  `system_storage` int(11) NOT NULL DEFAULT '10',
  `system_patient` int(11) NOT NULL,
  `system_clinic` varchar(128) NOT NULL,
  `system_database` varchar(128) NOT NULL,
  `system_expire` date NOT NULL,
  `system_service_price` double NOT NULL,
  `system_service_type` varchar(32) NOT NULL,
  `system_credit` double NOT NULL,
  `line_chanel_secret` varchar(128) NOT NULL,
  `line_chanel_token` varchar(128) NOT NULL,
  `line_account_preconnect_type` varchar(32) NOT NULL,
  `line_account_preconnect_text` text NOT NULL,
  `line_account_connect_type` varchar(128) NOT NULL,
  `line_account_connect_text` text NOT NULL,
  `credit_patient_price` double NOT NULL,
  `credit_appointment_price` double NOT NULL,
  `credit_sell_price` double NOT NULL,
  `credit_sms_price` double NOT NULL,
  `credit_storage_price` double NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `system_info`
--

INSERT INTO `system_info` (`site_key`, `clinic_title`, `clinic_drugs`, `clinic_xray`, `clinic_address`, `clinic_latitude`, `clinic_longitude`, `site_logo`, `site_favicon`, `time_zone`, `year_type`, `year_format`, `reciept_logo_en`, `reciept_title_en`, `reciept_address_en`, `reciept_note_en`, `reciept_bottom_left_en`, `reciept_bottom_right_en`, `reciept_logo_th`, `reciept_title_th`, `reciept_address_th`, `reciept_note_th`, `reciept_bottom_left_th`, `reciept_bottom_right_th`, `sell_key`, `vat_include`, `system_tax`, `followup_before_day`, `system_storage`, `system_patient`, `system_clinic`, `system_database`, `system_expire`, `system_service_price`, `system_service_type`, `system_credit`, `line_chanel_secret`, `line_chanel_token`, `line_account_preconnect_type`, `line_account_preconnect_text`, `line_account_connect_type`, `line_account_connect_text`, `credit_patient_price`, `credit_appointment_price`, `credit_sell_price`, `credit_sms_price`, `credit_storage_price`) VALUES
('8f411b77c389d5de467af8f2c0e91cda', 'Clinic', 'd59d44be6a7b72bc9f2a6bd3741e6c2a', '36c5420a68681b0873664baae9a3dd9c', '', 0.000000000000000, 0.000000000000000, 'logo.png', 'icon.png', 'Asia/Bangkok', 'BE', '3', '9c1b152c1fca121146c14b5c40ffbe34.png', 'Reciept', 'Address........................................................................', 'Note........................................................................', '(.............................................................)<br/>Payer', '(.............................................................)<br/>Payee', '875bdfdcdfa56ffed907b9f1436c811d.png', 'ใบเสร็จรับเงิน', 'ที่อยู่........................................................................', 'หมายเหตุ........................................................................', '(.............................................................)<br/>ผู้จ่ายเงิน', '(.............................................................)<br/>ผู้รับเงิน', 'f8895f347b4bf9185d34118b9d853d23', 7, 20, 5, 1, 0, 'Clinic', 'alicia_006', '2021-06-17', 900, 'month', 2100, '', '', '', '', '', '', 5, 3, 2, 1, 1000);

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

--
-- Table structure for table `tooths`
--

CREATE TABLE IF NOT EXISTS `tooths` (
  `tooth_key` char(32) NOT NULL,
  `tooth_type` varchar(16) NOT NULL,
  `tooth_number` int(11) NOT NULL,
  `tooth_icon` varchar(256) NOT NULL,
  `tooth_sorting` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `tooths`
--

INSERT INTO `tooths` (`tooth_key`, `tooth_type`, `tooth_number`, `tooth_icon`, `tooth_sorting`) VALUES
('074d5d17d831582ffcaf1edde78d2adb', 'child', 28, 'icon-c2108', 18),
('07ae153a4f9e087201edbdd5a4c12d5e', 'adult', 27, 'icon-1115', 15),
('081b16bcd52a14c866fe2ab1ae3c065a', 'child', 29, 'icon-c2109', 19),
('0ae79a56a8ffad7be7d27b4ab266a912', 'child', 14, 'icon-c1104', 4),
('11340131feec68e7ca463f960f0f341c', 'adult', 11, 'icon-1101', 1),
('1821e85b82eef4439c2f8c3fc98d4e90', 'adult', 41, 'icon-2109', 29),
('2169184650ee32062f115ec35faf6c9b', 'adult', 14, 'icon-1104', 4),
('26c91801f25caaf4bf5db26f6ad5802b', 'adult', 47, 'icon-2115', 35),
('306754ce45dc3a2441a1828dcf3fe238', 'adult', 45, 'icon-2113', 33),
('336efc5a2cdd35d98e8aa99afe35af86', 'adult', 32, 'icon-2102', 22),
('3758981810f104dacd144b2df63d5199', 'adult', 33, 'icon-2103', 23),
('403aee4f97916bc68b21f4dc89a5fba8', 'adult', 43, 'icon-2111', 31),
('4d41ca3ae901a60c9d82d1eb80b58661', 'child', 17, 'icon-c1107', 7),
('547d9b61ebf6828f37f3f1616b06eb94', 'adult', 18, 'icon-1108', 8),
('5c385d6d334ea0a9301bd28ea067aba7', 'child', 12, 'icon-c1102', 2),
('5f7478e5278270a0851340d2deda3943', 'child', 25, 'icon-c2105', 15),
('62a0e3d0e8d9db40e64419904a137c32', 'adult', 17, 'icon-1107', 7),
('6458f3bfa6486a2be61b9fb6f37645c8', 'adult', 22, 'icon-1110', 10),
('647e24fdbfcbc54e7dbb98e11c45059b', 'child', 19, 'icon-c1109', 9),
('7850737a42d9d21cac6fee3958d95f5f', 'adult', 25, 'icon-1113', 13),
('7cd98be5e1169540c0d3bffad38df058', 'adult', 36, 'icon-2106', 26),
('801886d15a07a0f786169c3fa4c54b34', 'child', 20, 'icon-c1110', 10),
('838ff8b78dfbe82b2bc6c681f0cb390f', 'adult', 28, 'icon-1116', 16),
('8557acbd605dce2d0a6106c47bcd2338', 'child', 26, 'icon-c2106', 16),
('856deecf45fa4ace6b5b49bd4ad54acf', 'child', 18, 'icon-c1108', 8),
('8807ea68c5175d0173220bec0542d2e9', 'adult', 35, 'icon-2105', 25),
('88676f41f30573cd40803b102b052cc5', 'adult', 34, 'icon-2104', 24),
('99c91b979d234058c005ea53bf19594d', 'child', 11, 'icon-c1101', 1),
('99ff292e23794ad843b5d75c459ed289', 'child', 22, 'icon-c2102', 12),
('9c8a0632757d66bb9ae533b2d0a7a0fa', 'adult', 15, 'icon-1105', 5),
('a126f3646da124e2839a6bbbd2f1400f', 'adult', 21, 'icon-1109', 9),
('a1ce2b3db8ca6d0a488dcda486570695', 'adult', 31, 'icon-2101', 21),
('a4157eabf48518bb189351bcf3b52e21', 'child', 21, 'icon-c2101', 11),
('a43c7f3d9d0f4a718450633e3765b67c', 'adult', 24, 'icon-1112', 12),
('a74c3599ba5233f66e6d90523e0d7975', 'adult', 44, 'icon-2112', 32),
('bbf2466e744a50035030927d7283f2b3', 'adult', 26, 'icon-1114', 14),
('cceb37600876af8163b31e0ce7400aeb', 'adult', 42, 'icon-2110', 30),
('d0a4f1984f1ee1f764a04b6536d96b1b', 'child', 13, 'icon-c1103', 3),
('d161425547c059ba556e30cf612fb974', 'adult', 13, 'icon-1103', 3),
('d4e99aaa1f75eb02a66f89dc95ca6e3c', 'child', 15, 'icon-c1105', 5),
('d7b24e66a3c4ea77a4a224995bc3899a', 'adult', 16, 'icon-1106', 6),
('d81fee4887336b1dba216cfff99bd9e6', 'child', 30, 'icon-c2110', 20),
('dc9b670b36ec41cd821e65daa6aead0c', 'adult', 48, 'icon-2116', 36),
('de118786b5cddc3188d04a75e15d854e', 'child', 23, 'icon-c2103', 13),
('e174b03de89decac4d4ed2da3ba1f5df', 'adult', 38, 'icon-2108', 28),
('e4a7fc9521d0b60fcbb982035b644b5e', 'adult', 23, 'icon-1111', 11),
('e77aa1b8a24da9674c86f83bb588777b', 'child', 16, 'icon-c1106', 6),
('e77fac5cdb5092a34b13bb2cb29efe5a', 'adult', 46, 'icon-2114', 34),
('e97ee6d270685ce8f551bf2353027d5b', 'adult', 37, 'icon-2107', 27),
('ed20a959d410ccd843d9e1dfcee04228', 'adult', 12, 'icon-1102', 2),
('f13904a0edbe91cc85cfd7b824d9b801', 'child', 24, 'icon-c2104', 14),
('f1852259718f260ca67402fd8acb42f8', 'child', 27, 'icon-c2107', 17);

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

--
-- Table structure for table `treatments`
--

CREATE TABLE IF NOT EXISTS `treatments` (
  `treatmentuser_key` varchar(32) NOT NULL,
  `room_key` varchar(32) NOT NULL,
  `pat_key` varchar(32) NOT NULL,
  `doctor_key` varchar(32) NOT NULL,
  `treatment_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `treatment_case` varchar(32) NOT NULL,
  `treatment_status` tinyint(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `treatments_detail`
--

CREATE TABLE IF NOT EXISTS `treatments_detail` (
  `treatd_key` char(32) NOT NULL,
  `treatt_key` varchar(32) NOT NULL,
  `treath_key` varchar(32) NOT NULL,
  `treatd_note` text NOT NULL,
  `treatd_insert` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `treatments_detail`
--

INSERT INTO `treatments_detail` (`treatd_key`, `treatt_key`, `treath_key`, `treatd_note`, `treatd_insert`) VALUES
('2773584d13c5e9a3179eb773419dd54d', 'none', '2c3bfeff6888ab88111fbe14dda56386', 'TEST', '2020-11-06 05:41:50'),
('52c3b3d9e57fdc89242a24cd398fcd0a', 'none', '2c3bfeff6888ab88111fbe14dda56386', 'หดหกดหกด', '2020-11-06 06:02:54'),
('6b3a2d703f64d963f9845c5e21dd86fd', 'none', '80631220dbb021f6bd6af466ad40a698', 'tertert', '2020-11-06 06:06:08'),
('85fc11bbe5c4a4059c59e6dffa0d2bba', 'none', '80631220dbb021f6bd6af466ad40a698', '34234', '2020-11-06 06:06:05'),
('9af2fd51607e6e458ab4da930d960140', 'none', '2c3bfeff6888ab88111fbe14dda56386', 'ขูดหินปูน', '2020-11-06 06:02:18'),
('d46a5fc634e815bc2a948518e34ca510', 'none', 'a9e706477bd9f54bddcefd217c82d70e', 'hest', '2020-11-10 20:54:15'),
('f7d24ad03a89977135d0d23ec0ce8344', 'none', 'ddff2d0cf75d54c8897d6bc2da62e4f4', 'ขูดหินปูน', '2021-06-15 08:07:44');

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

--
-- Table structure for table `treatments_doctor`
--

CREATE TABLE IF NOT EXISTS `treatments_doctor` (
  `treatsdc_key` char(32) NOT NULL,
  `treath_key` varchar(32) NOT NULL,
  `item_key` varchar(32) NOT NULL,
  `item_doctor_fee` double NOT NULL,
  `item_doctor_type` tinyint(1) NOT NULL,
  `doctor_key` varchar(32) NOT NULL,
  `item_price` double NOT NULL,
  `treatsdc_amount` double NOT NULL,
  `treatsdc_insert` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `treatments_document`
--

CREATE TABLE IF NOT EXISTS `treatments_document` (
  `treatdc_key` char(32) NOT NULL,
  `treath_key` varchar(32) NOT NULL,
  `pat_key` varchar(32) NOT NULL,
  `apm_key` varchar(32) NOT NULL,
  `treatdc_title` varchar(128) NOT NULL,
  `treatdc_file` varchar(128) NOT NULL,
  `treatdc_type` tinyint(1) NOT NULL COMMENT '1=document,2=x-ray,3=other',
  `treatdc_insert` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `treatments_expense`
--

CREATE TABLE IF NOT EXISTS `treatments_expense` (
  `treatex_key` char(32) NOT NULL,
  `treath_key` varchar(32) NOT NULL,
  `item_key` varchar(32) NOT NULL,
  `treatex_amount` double NOT NULL,
  `treatex_price_per_unit` double NOT NULL,
  `treatex_insert` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `treatments_expense`
--

INSERT INTO `treatments_expense` (`treatex_key`, `treath_key`, `item_key`, `treatex_amount`, `treatex_price_per_unit`, `treatex_insert`) VALUES
('3b593044a9af88e5d2d589d642a811a0', 'a9e706477bd9f54bddcefd217c82d70e', '7688fd920ad66e3ec055c9da614f2487', 1, 123, '2020-11-25 02:39:11'),
('48034e4e9a69cbe233ce6c140794c559', '9e270c0add8313df5555eb35c6579289', '7688fd920ad66e3ec055c9da614f2487', 1, 123, '2021-06-15 07:10:43'),
('9619462ea4400bc1e1a4756993510bd9', '2c3bfeff6888ab88111fbe14dda56386', '7688fd920ad66e3ec055c9da614f2487', 1, 123, '2020-11-10 20:48:33'),
('964c38cdd39eb3a7f4e349ef6f9c9b57', 'ec5d0877db41ca33e4a89ffd4436c860', '7688fd920ad66e3ec055c9da614f2487', 1, 123, '2020-11-10 20:43:38'),
('ae43a79fbfc995e5bffd2a3af029ccc4', '80631220dbb021f6bd6af466ad40a698', '7688fd920ad66e3ec055c9da614f2487', 1, 123, '2021-06-17 02:57:42'),
('b849c405b102ff6fd3a30ece72d5ce35', '9e270c0add8313df5555eb35c6579289', '7d4498bca493ed5dc5aa048e11194974', 1, 10, '2021-06-15 07:10:40');

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

--
-- Table structure for table `treatments_header`
--

CREATE TABLE IF NOT EXISTS `treatments_header` (
  `treath_key` char(32) NOT NULL,
  `apm_key` varchar(32) NOT NULL,
  `treath_type` varchar(16) NOT NULL DEFAULT 'adult',
  `treath_weight` double NOT NULL,
  `treath_height` double NOT NULL,
  `treath_pressure_low` double NOT NULL,
  `treath_pressure_high` double NOT NULL,
  `treath_temperature` double NOT NULL,
  `treath_pulse_rate` varchar(32) NOT NULL,
  `treath_note` text NOT NULL,
  `user_key` varchar(32) NOT NULL,
  `treath_insert` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `treatments_header`
--

INSERT INTO `treatments_header` (`treath_key`, `apm_key`, `treath_type`, `treath_weight`, `treath_height`, `treath_pressure_low`, `treath_pressure_high`, `treath_temperature`, `treath_pulse_rate`, `treath_note`, `user_key`, `treath_insert`) VALUES
('2bd56da7128d62246f92dfc6b6a98633', '57ee613d0944b2c23f72af1612f8c017', 'adult', 0, 0, 0, 0, 0, '', '', 'e934a4f90e9f302b662f7395b37855d9', '2021-05-27 10:22:43'),
('2c3bfeff6888ab88111fbe14dda56386', '8d4ad66367cf000e62d4be5a17604313', 'adult', 0, 0, 0, 0, 0, '', '', 'f2372494babff1aa4d6ec3f67fb269ed', '2020-11-06 05:12:49'),
('80631220dbb021f6bd6af466ad40a698', '40a05e916814e4270f6e3efafb06ce64', 'adult', 0, 0, 0, 0, 0, '', '', 'f2372494babff1aa4d6ec3f67fb269ed', '2020-11-06 06:06:01'),
('9e270c0add8313df5555eb35c6579289', '30d95cc06450d0873f61aef903dfa03c', 'adult', 0, 0, 0, 0, 0, '', '', '6690cfcca425120ff7e650b0a791bc71', '2021-06-15 07:10:26'),
('a9e706477bd9f54bddcefd217c82d70e', '5da9a272f39abe27445753c3b54b8430', 'adult', 0, 0, 0, 0, 0, '', 'hello\r\n', 'f2372494babff1aa4d6ec3f67fb269ed', '2020-11-10 20:53:32'),
('ddff2d0cf75d54c8897d6bc2da62e4f4', 'd0486cab6505e3e091a2900686c710b6', 'adult', 0, 0, 0, 0, 0, '', '', 'e934a4f90e9f302b662f7395b37855d9', '2021-05-27 10:32:52'),
('ec5d0877db41ca33e4a89ffd4436c860', '571624cd9462e6b3addfa5bd38f02829', 'adult', 0, 0, 0, 0, 0, '', '', 'f2372494babff1aa4d6ec3f67fb269ed', '2020-11-10 20:20:21');

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

--
-- Table structure for table `treatments_info`
--

CREATE TABLE IF NOT EXISTS `treatments_info` (
  `tmi_key` char(32) NOT NULL,
  `tmi_title` varchar(128) NOT NULL,
  `tmi_color` varchar(32) NOT NULL DEFAULT '#9036ff',
  `tmi_status` tinyint(1) NOT NULL,
  `tmi_insert` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `treatments_tooth`
--

CREATE TABLE IF NOT EXISTS `treatments_tooth` (
  `treatt_key` char(32) NOT NULL,
  `treath_key` varchar(32) NOT NULL,
  `tooth_key` varchar(32) NOT NULL,
  `tmi_key` varchar(32) NOT NULL,
  `treatt_note` text NOT NULL,
  `treatt_insert` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `unit_type`
--

CREATE TABLE IF NOT EXISTS `unit_type` (
  `unit_key` varchar(32) NOT NULL,
  `unit_label` varchar(32) NOT NULL,
  `unit_status` tinyint(1) NOT NULL DEFAULT '1'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `unit_type`
--

INSERT INTO `unit_type` (`unit_key`, `unit_label`, `unit_status`) VALUES
('9bdf20c4418deb338c8ef521f0b26ec5', 'ซี่', 1),
('ad6aa5ca0ed7af49bdab82b3258a06c0', 'ชิ้น', 1),
('c314c3c2511a29e3d4cd6dc9aa6e6021', 'อัน', 1),
('3deebc16e86953df1a4092d3955416f6', 'ชุด', 1),
('a59e18c9eb4692403e8206628d121328', 'ครั้ง', 1),
('f4bb89251485bb085d794af9245caf58', 'เม็ด', 1),
('c9568fcf108d1c2a5d2c580d556b8f53', 'ขวด', 1),
('baf47b1bdad84fb68670525820097a09', 'ฟิล์ม', 1),
('bbc9e1f848f464051e8e84103d1567db', 'หลอด', 1),
('162cacf0d591b432412c89437dea28e0', 'ตลับ', 1),
('acf212c78cafdd55bfaf2c76e8093965', 'กล่อง', 1);

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

--
-- Table structure for table `user`
--

CREATE TABLE IF NOT EXISTS `user` (
  `user_key` char(32) NOT NULL,
  `name` varchar(64) NOT NULL,
  `lastname` varchar(64) NOT NULL,
  `username` varchar(64) NOT NULL,
  `password` varchar(60) NOT NULL,
  `birthday` date NOT NULL,
  `user_photo` varchar(128) NOT NULL DEFAULT 'noimg.jpg',
  `user_class` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1=user,2=doctor,3=super admin',
  `position` varchar(128) NOT NULL,
  `user_language` varchar(8) NOT NULL DEFAULT 'th',
  `user_branch` varchar(32) NOT NULL,
  `cashier_default` varchar(32) NOT NULL,
  `user_theme` varchar(128) NOT NULL DEFAULT 'light_gray.css',
  `system_font_size` varchar(32) NOT NULL DEFAULT 'dd7e28065e654467be0f9c16f3bd987d',
  `system_icon_prefix` varchar(32) NOT NULL DEFAULT 'fad',
  `email` varchar(128) NOT NULL,
  `user_status` tinyint(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `user`
--

INSERT INTO `user` (`user_key`, `name`, `lastname`, `username`, `password`, `birthday`, `user_photo`, `user_class`, `position`, `user_language`, `user_branch`, `cashier_default`, `user_theme`, `system_font_size`, `system_icon_prefix`, `email`, `user_status`) VALUES
('f2372494babff1aa4d6ec3f67fb269ed', 'khumphol', 'tearmpin', 'dump', '$1$w5yBHzMR$YMXcJJQoyiz9/E6ngVZJq.', '2017-01-01', 'noimg.jpg', 1, '', '', '', '', 'light_gray.css', 'dd7e28065e654467be0f9c16f3bd987d', 'fat', 'khumphol@gmail.com', 1),
('6690cfcca425120ff7e650b0a791bc71', 'admin', 'admin', 'admin', '$1$1SK3CfVi$KIC0f1I6cF9rD.WtDLoAa.', '1988-06-27', 'noimg.jpg', 1, 'Administrator', '', '', '', 'light_teak.css', 'dd7e28065e654467be0f9c16f3bd987d', 'fat', 'admin@clear.co.th', 1),
('d8844fd909bc0ab5f0eaf5358fa73f82', 'alicia', 'alicia', 'ADBE4G97', '$1$bgdcsTUu$TpO4QdB1B6uoaAZUI.mJc0', '0000-00-00', 'noimg.jpg', 2, '', 'th', '', '', 'light_blue.css', 'dd7e28065e654467be0f9c16f3bd987d', 'fad', '', 1),
('e934a4f90e9f302b662f7395b37855d9', 'test', 'test', 'test', '$1$KA.XRgN7$OkPvqm8W/nx/eFVMV1h65/', '0000-00-00', 'noimg.jpg', 2, '', 'th', '', '', 'light_gray.css', 'dd7e28065e654467be0f9c16f3bd987d', 'fat', 'test', 1);

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

--
-- Table structure for table `user_default`
--

CREATE TABLE IF NOT EXISTS `user_default` (
  `def_key` char(32) NOT NULL,
  `user_key` varchar(32) NOT NULL,
  `user_username` varchar(64) NOT NULL,
  `user_password` varchar(64) NOT NULL,
  `def_change` tinyint(1) NOT NULL,
  `def_insert` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `user_default`
--

INSERT INTO `user_default` (`def_key`, `user_key`, `user_username`, `user_password`, `def_change`, `def_insert`) VALUES
('759dc98f8e6cd66afc266db4365e1831', 'e934a4f90e9f302b662f7395b37855d9', 'test', 'test', 1, '2020-11-01 02:53:51');

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

--
-- Table structure for table `user_online`
--

CREATE TABLE IF NOT EXISTS `user_online` (
  `osession` varchar(128) CHARACTER SET utf8 NOT NULL DEFAULT '',
  `user_key` varchar(32) CHARACTER SET utf8 NOT NULL,
  `otime` int(11) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `access_list`
--
ALTER TABLE `access_list`
  ADD PRIMARY KEY (`access_key`);

--
-- Indexes for table `appointment`
--
ALTER TABLE `appointment`
  ADD PRIMARY KEY (`apm_key`);

--
-- Indexes for table `appointment_flag`
--
ALTER TABLE `appointment_flag`
  ADD PRIMARY KEY (`apf_key`);

--
-- Indexes for table `appointment_recall_alert`
--
ALTER TABLE `appointment_recall_alert`
  ADD PRIMARY KEY (`ara_key`);

--
-- Indexes for table `appointment_skip`
--
ALTER TABLE `appointment_skip`
  ADD PRIMARY KEY (`skip_key`);

--
-- Indexes for table `autonumber`
--
ALTER TABLE `autonumber`
  ADD PRIMARY KEY (`cn_count`);

--
-- Indexes for table `backup_logs`
--
ALTER TABLE `backup_logs`
  ADD PRIMARY KEY (`backup_key`);

--
-- Indexes for table `bank`
--
ALTER TABLE `bank`
  ADD PRIMARY KEY (`bank_key`);

--
-- Indexes for table `credit_history`
--
ALTER TABLE `credit_history`
  ADD PRIMARY KEY (`credit_key`);

--
-- Indexes for table `credit_used`
--
ALTER TABLE `credit_used`
  ADD PRIMARY KEY (`cu_key`);

--
-- Indexes for table `doctor`
--
ALTER TABLE `doctor`
  ADD PRIMARY KEY (`doctor_key`);

--
-- Indexes for table `doctor_calendar`
--
ALTER TABLE `doctor_calendar`
  ADD PRIMARY KEY (`dc_key`);

--
-- Indexes for table `doctor_calendar_header`
--
ALTER TABLE `doctor_calendar_header`
  ADD PRIMARY KEY (`dcap_key`);

--
-- Indexes for table `doctor_private_fund`
--
ALTER TABLE `doctor_private_fund`
  ADD PRIMARY KEY (`dpf_key`);

--
-- Indexes for table `drugs_export`
--
ALTER TABLE `drugs_export`
  ADD PRIMARY KEY (`exp_key`);

--
-- Indexes for table `drugs_import`
--
ALTER TABLE `drugs_import`
  ADD PRIMARY KEY (`imp_key`);

--
-- Indexes for table `drugs_store`
--
ALTER TABLE `drugs_store`
  ADD PRIMARY KEY (`drug_key`);

--
-- Indexes for table `employees`
--
ALTER TABLE `employees`
  ADD PRIMARY KEY (`emp_key`);

--
-- Indexes for table `employee_document`
--
ALTER TABLE `employee_document`
  ADD PRIMARY KEY (`doc_key`);

--
-- Indexes for table `expenses`
--
ALTER TABLE `expenses`
  ADD PRIMARY KEY (`exp_key`);

--
-- Indexes for table `expenses_header`
--
ALTER TABLE `expenses_header`
  ADD PRIMARY KEY (`expenses_key`);

--
-- Indexes for table `finance_debtor`
--
ALTER TABLE `finance_debtor`
  ADD PRIMARY KEY (`deb_key`);

--
-- Indexes for table `finance_header`
--
ALTER TABLE `finance_header`
  ADD PRIMARY KEY (`finh_key`);

--
-- Indexes for table `finance_payment_method`
--
ALTER TABLE `finance_payment_method`
  ADD PRIMARY KEY (`fpm_key`);

--
-- Indexes for table `followup_flag`
--
ALTER TABLE `followup_flag`
  ADD PRIMARY KEY (`fuf_key`);

--
-- Indexes for table `items_categories`
--
ALTER TABLE `items_categories`
  ADD PRIMARY KEY (`categories_key`);

--
-- Indexes for table `items_list`
--
ALTER TABLE `items_list`
  ADD PRIMARY KEY (`item_key`);

--
-- Indexes for table `language`
--
ALTER TABLE `language`
  ADD PRIMARY KEY (`language_code`);

--
-- Indexes for table `line_connect`
--
ALTER TABLE `line_connect`
  ADD PRIMARY KEY (`lc_key`);

--
-- Indexes for table `list`
--
ALTER TABLE `list`
  ADD PRIMARY KEY (`cases`);

--
-- Indexes for table `logs`
--
ALTER TABLE `logs`
  ADD PRIMARY KEY (`log_key`);

--
-- Indexes for table `menus`
--
ALTER TABLE `menus`
  ADD PRIMARY KEY (`menu_key`);

--
-- Indexes for table `modules`
--
ALTER TABLE `modules`
  ADD PRIMARY KEY (`mod_key`);

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

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

--
-- Indexes for table `other_charge`
--
ALTER TABLE `other_charge`
  ADD PRIMARY KEY (`oc_key`);

--
-- Indexes for table `other_pay`
--
ALTER TABLE `other_pay`
  ADD PRIMARY KEY (`op_key`);

--
-- Indexes for table `patient`
--
ALTER TABLE `patient`
  ADD PRIMARY KEY (`pat_key`);

--
-- Indexes for table `patient_flag`
--
ALTER TABLE `patient_flag`
  ADD PRIMARY KEY (`ptf_key`);

--
-- Indexes for table `plugins`
--
ALTER TABLE `plugins`
  ADD PRIMARY KEY (`plug_key`);

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

--
-- Indexes for table `report_income_group`
--
ALTER TABLE `report_income_group`
  ADD PRIMARY KEY (`incg_key`);

--
-- Indexes for table `report_income_summary_header`
--
ALTER TABLE `report_income_summary_header`
  ADD PRIMARY KEY (`rish_key`);

--
-- Indexes for table `room`
--
ALTER TABLE `room`
  ADD PRIMARY KEY (`room_key`);

--
-- Indexes for table `salary_employees`
--
ALTER TABLE `salary_employees`
  ADD PRIMARY KEY (`semp_key`);

--
-- Indexes for table `salary_header`
--
ALTER TABLE `salary_header`
  ADD PRIMARY KEY (`salary_key`);

--
-- Indexes for table `salary_other_income`
--
ALTER TABLE `salary_other_income`
  ADD PRIMARY KEY (`soin_key`);

--
-- Indexes for table `salary_other_outcome`
--
ALTER TABLE `salary_other_outcome`
  ADD PRIMARY KEY (`sooc_key`);

--
-- Indexes for table `sell_detail`
--
ALTER TABLE `sell_detail`
  ADD PRIMARY KEY (`ds_key`);

--
-- Indexes for table `sell_header`
--
ALTER TABLE `sell_header`
  ADD PRIMARY KEY (`sellh_key`);

--
-- Indexes for table `sell_temp`
--
ALTER TABLE `sell_temp`
  ADD PRIMARY KEY (`sell_key`);

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

--
-- Indexes for table `system_font_size`
--
ALTER TABLE `system_font_size`
  ADD PRIMARY KEY (`font_key`);

--
-- Indexes for table `system_info`
--
ALTER TABLE `system_info`
  ADD PRIMARY KEY (`site_key`);

--
-- Indexes for table `tooths`
--
ALTER TABLE `tooths`
  ADD PRIMARY KEY (`tooth_key`);

--
-- Indexes for table `treatments`
--
ALTER TABLE `treatments`
  ADD PRIMARY KEY (`treatmentuser_key`);

--
-- Indexes for table `treatments_detail`
--
ALTER TABLE `treatments_detail`
  ADD PRIMARY KEY (`treatd_key`);

--
-- Indexes for table `treatments_doctor`
--
ALTER TABLE `treatments_doctor`
  ADD PRIMARY KEY (`treatsdc_key`);

--
-- Indexes for table `treatments_document`
--
ALTER TABLE `treatments_document`
  ADD PRIMARY KEY (`treatdc_key`);

--
-- Indexes for table `treatments_expense`
--
ALTER TABLE `treatments_expense`
  ADD PRIMARY KEY (`treatex_key`);

--
-- Indexes for table `treatments_header`
--
ALTER TABLE `treatments_header`
  ADD PRIMARY KEY (`treath_key`);

--
-- Indexes for table `treatments_info`
--
ALTER TABLE `treatments_info`
  ADD PRIMARY KEY (`tmi_key`);

--
-- Indexes for table `treatments_tooth`
--
ALTER TABLE `treatments_tooth`
  ADD PRIMARY KEY (`treatt_key`);

--
-- Indexes for table `unit_type`
--
ALTER TABLE `unit_type`
  ADD PRIMARY KEY (`unit_key`);

--
-- Indexes for table `user`
--
ALTER TABLE `user`
  ADD PRIMARY KEY (`user_key`);

--
-- Indexes for table `user_default`
--
ALTER TABLE `user_default`
  ADD PRIMARY KEY (`def_key`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `month`
--
ALTER TABLE `month`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=13;
--
-- AUTO_INCREMENT for table `mstatus`
--
ALTER TABLE `mstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `prefix`
--
ALTER TABLE `prefix`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=11;
--
-- AUTO_INCREMENT for table `sex`
--
ALTER TABLE `sex`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4;
