CREATE TABLE `productions` ( `production_id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `staff_id` int(11) NOT NULL, `item_id` int(11) NOT NULL, `production_teko` decimal(10,2) NOT NULL, `production_car` varchar(20) COLLATE utf8_unicode_ci NOT NULL, `teko_point` decimal(10,2) NOT NULL, `teko_result` decimal(10,2) NOT NULL, `daily_hour` decimal(10,2) NOT NULL, `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `deleted_at` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE `production_item` ( `item_id` int(11) NOT NULL, `item_name` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `item_point` int(10) NOT NULL, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, `deleted_at` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Indexes for table `productions` -- ALTER TABLE `productions` ADD PRIMARY KEY (`production_id`); -- -- Indexes for table `production_item` -- ALTER TABLE `production_item` ADD PRIMARY KEY (`item_id`); -- -- AUTO_INCREMENT for table `productions` -- ALTER TABLE `productions` MODIFY `production_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1; -- -- AUTO_INCREMENT for table `production_item` -- ALTER TABLE `production_item` MODIFY `item_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1; COMMIT; CREATE TABLE `setting_daily_hour` ( `daily_hour_id` int(11) NOT NULL, `daily_hour` decimal(10,2) NOT NULL, `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `deleted_at` datetime DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Indexes for table `setting_daily_hour` -- ALTER TABLE `setting_daily_hour` ADD PRIMARY KEY (`daily_hour_id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `setting_daily_hour` -- ALTER TABLE `setting_daily_hour` MODIFY `daily_hour_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1; COMMIT; CREATE TABLE `staff_attendance_working` ( `working_id` int(11) NOT NULL, `staff_id` int(11) NOT NULL, `working_date` date NOT NULL, `working_on` enum('yes','no') COLLATE utf8_unicode_ci NOT NULL, `working_next_day` enum('no','yes') COLLATE utf8_unicode_ci NOT NULL, `working_if_flexi` enum('no','yes') COLLATE utf8_unicode_ci DEFAULT NULL, `working_if_ot` enum('no','yes') COLLATE utf8_unicode_ci NOT NULL, `working_if_fixed_work` enum('no','yes') COLLATE utf8_unicode_ci DEFAULT 'no', `working_period_from` time NOT NULL, `working_period_to` time NOT NULL, `working_from` time NOT NULL, `working_to` time NOT NULL, `working_total_hours` time NOT NULL, `working_total_rest_hours` time NOT NULL, `working_rest_range_from` time DEFAULT NULL, `working_rest_range_to` time DEFAULT NULL, `working_rounding_ot` tinyint(2) NOT NULL, `working_if_offduty` enum('no','yes') COLLATE utf8_unicode_ci NOT NULL, `working_count_offduty` time NOT NULL, `working_if_deduct_offduty` enum('no','yes') COLLATE utf8_unicode_ci NOT NULL, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `deleted_at` timestamp NULL DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Indexes for dumped tables -- -- -- Indexes for table `staff_attendance_working` -- ALTER TABLE `staff_attendance_working` ADD PRIMARY KEY (`working_id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `staff_attendance_working` -- ALTER TABLE `staff_attendance_working` MODIFY `working_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; COMMIT;