Drop files here

SQL upload ( 0 ) x -

Page-related settings Click on the bar to scroll to top of page
Press Ctrl+Enter to execute query Press Enter to execute query
ascending
descending
Order:
Debug SQL
Count
Execution order
Time taken
Order by:
Group queries
Ungroup queries
Collapse Expand Show trace Hide trace Count : Time taken :
Bookmarks
Refresh
Add
No bookmarks
Add bookmark
Options
Set default





Collapse Expand Requery Edit Explain Profiling Bookmark Query failed Database : Queried time :
Untitled *
v Show/Hide tables list View in fullscreen Add tables from other databases New page Open page Save page Save page as Delete pages Create table Create relationship Choose column to display Reload Help Angular links / Direct links Snap to grid v Small/Big All Toggle small/big Toggle relationship lines Export schema > Move Menu > Pin text
Number of tables: 0
v saa_system borrow_items
* id : int(11)
* dept_code : varchar(10)
* name : varchar(255)
* photo : varchar(255)
* total_qty : int(11)
* available_qty : int(11)
* status : enum('active','retired')
* created_by : int(11)
* created_at : datetime
* updated_at : datetime
v saa_system borrow_photos
* id : int(10) unsigned
* request_id : int(10) unsigned
* phase : enum('before','after')
* file_name : varchar(255)
* uploaded_at : datetime
v saa_system borrow_requests
* id : int(11)
* borrow_code : varchar(30)
* dept_code : varchar(10)
* requester_id : int(11)
* lender_id : int(10) unsigned
* borrower_user_id : int(10) unsigned
* borrower_name : varchar(150)
* borrower_dept : varchar(100)
* borrower_phone : varchar(30)
* purpose : text
* lender_note : text
* finish_comment : text
* expected_return_date : date
* due_reminder_sent_at : datetime
* delivery_type : enum('pickup','deliver')
* delivery_location : varchar(255)
* status : enum('pending','approved','rejected','return_reported','returned','on_loan')
* requester_signature : mediumtext
* approver_id : int(11)
* approver_signature : mediumtext
* approved_at : datetime
* handover_by : varchar(255)
* handover_photo : varchar(255)
* rejected_reason : varchar(255)
* returned_at : datetime
* returned_confirmed_by : int(11)
* return_photo : varchar(255)
* return_reported_at : datetime
* created_at : datetime
v saa_system borrow_request_items
* id : int(11)
* request_id : int(11)
* borrow_item_id : int(11)
* qty_borrowed : int(11)
* qty_returned : int(11)
v saa_system chat_messages
* id : int(11)
* from_user : int(11)
* to_user : int(11)
* message : text
* file_name : varchar(255)
* file_path : varchar(500)
* file_type : varchar(20)
* is_read : tinyint(1)
* created_at : datetime
* is_deleted : tinyint(1)
* is_edited : tinyint(1)
v saa_system chat_reactions
* id : int(11)
* message_id : int(11)
* user_id : int(11)
* emoji : varchar(16)
* created_at : datetime
v saa_system chat_typing
* user_id : int(11)
* to_user : int(11)
* updated_at : datetime
v saa_system community_bookmarks
* id : int(11)
* post_id : int(11)
* user_id : int(11)
* created_at : datetime
v saa_system community_comments
* id : int(11)
* post_id : int(11)
* user_id : int(11)
* content : text
* created_at : datetime
* parent_id : int(11)
* is_edited : tinyint(1)
* is_deleted : tinyint(1)
v saa_system community_comment_likes
* id : int(11)
* comment_id : int(11)
* user_id : int(11)
* created_at : datetime
v saa_system community_hashtags
* id : int(11)
* post_id : int(11)
* tag : varchar(100)
v saa_system community_likes
* id : int(11)
* post_id : int(11)
* user_id : int(11)
* reaction_type : varchar(10)
* created_at : datetime
v saa_system community_mentions
* id : int(11)
* post_id : int(11)
* comment_id : int(11)
* mentioned_user_id : int(11)
* display_name : varchar(150)
* created_at : datetime
v saa_system community_notifications
* id : int(11)
* user_id : int(11)
* from_user_id : int(11)
* type : varchar(20)
* post_id : int(11)
* is_read : tinyint(1)
* created_at : datetime
v saa_system community_polls
* id : int(11)
* post_id : int(11)
* created_at : datetime
v saa_system community_poll_options
* id : int(11)
* poll_id : int(11)
* option_text : varchar(200)
* sort_order : int(11)
v saa_system community_poll_votes
* id : int(11)
* poll_id : int(11)
* option_id : int(11)
* user_id : int(11)
* created_at : datetime
v saa_system community_posts
* id : int(11)
* user_id : int(11)
* content : text
* category : varchar(20)
* created_at : datetime
* updated_at : datetime
* is_pinned : tinyint(1)
* is_edited : tinyint(1)
v saa_system community_post_files
* id : int(11)
* post_id : int(11)
* file_name : varchar(255)
* file_type : varchar(50)
* file_path : varchar(500)
* created_at : datetime
v saa_system community_typing
* post_id : int(11)
* user_id : int(11)
* fullname : varchar(100)
* updated_at : datetime
v saa_system company_holidays
* id : int(11)
* holiday_date : date
* name : varchar(255)
* type : enum('company','arranged','festival')
* created_by : int(11)
* created_at : datetime
v saa_system departments
* id : int(11)
* code : varchar(20)
* name_th : varchar(100)
* group_name : varchar(50)
* org_chart_group : varchar(50)
* parent_dept_id : int(11)
* parent_user_id : int(11)
* chain_top_level : enum('GM','Director','President')
* top_signer_pdf_col : varchar(2)
* created_at : datetime
v saa_system dept_org_chart_positions
* id : int(11)
* node_type : enum('department','person')
* ref_id : int(11)
* pos_x : int(11)
* pos_y : int(11)
* updated_at : datetime
v saa_system edp_repair_requests
* id : int(11)
* repair_no : varchar(30)
* user_id : int(11)
* req_phone : varchar(20)
* request_type : set('service','repair','borrow','other')
* machine_problem : text
* req_signature : mediumtext
* attachment_note : varchar(255)
* problem_photo : varchar(255)
* approver_id : int(11)
* approver_signature : mediumtext
* approved_at : datetime
* status : enum('pending','in_progress','pending_receipt','completed')
* it_solution : text
* it_staff_id : int(11)
* claimed_at : datetime
* it_completed_at : datetime
* it_signature : mediumtext
* edp_approver_id : int(11)
* edp_approver_signature : mediumtext
* edp_approved_at : datetime
* satisfaction : enum('very_good','good','fair')
* sat_suggestion : varchar(255)
* eval_signature : mediumtext
* eval_at : datetime
* created_at : datetime
v saa_system employee_master_data
* id : int(11)
* emp_id : varchar(20)
* fullname : varchar(255)
* fullname_en : varchar(255)
* gender : varchar(10)
* phone : varchar(20)
* dept_code : varchar(30)
* role : varchar(30)
* hire_date : date
* supervisor_emp_id : varchar(20)
* note : varchar(255)
* imported_at : datetime
v saa_system employee_master_quota
* id : int(11)
* emp_id : varchar(20)
* pdf_code : varchar(10)
* year : int(11)
* quota_max_days : decimal(5,2)
* imported_at : datetime
v saa_system employee_whitelist
* id : int(11)
* emp_id : varchar(20)
* fullname : varchar(255)
* is_used : tinyint(1)
* created_at : datetime
* department_id : int(11)
* hire_date : date
* role : varchar(30)
* fullname_en : varchar(100)
v saa_system export_activity_log
* id : int(11)
* shipment_id : int(11)
* action : varchar(20)
* note : varchar(255)
* actor_id : int(11)
* created_at : datetime
v saa_system export_doc_files
* id : int(11)
* shipment_id : int(11)
* doc_no : tinyint(4)
* file_name : varchar(255)
* original_name : varchar(255)
* uploaded_by : int(11)
* uploaded_at : datetime
v saa_system export_due_templates
* id : int(11)
* customer : varchar(100)
* doc_no : tinyint(4)
* offset_days : int(11)
* updated_by : int(11)
* updated_at : datetime
v saa_system export_log
* id : int(11)
* dataset_type : enum('employee','leave_request')
* record_id : int(11)
* exported_by : int(11)
* exported_at : datetime
v saa_system export_shipments
* id : int(11)
* customer : varchar(50)
* shipment_no : varchar(50)
* status : enum('active','cancelled')
* etd_saa_plan : date
* etd_saa_actual : date
* loading_plan : date
* loading_actual : date
* etd_lcb_plan : date
* etd_lcb_actual : date
* eta_plan : date
* eta_actual : date
* doc1_response : varchar(100)
* doc1_due_date : date
* doc1_actual_date : date
* doc1_status : tinyint(1)
* doc2_response : varchar(100)
* doc2_due_date : date
* doc2_actual_date : date
* doc2_status : tinyint(1)
* doc2_case_pallet_qty : int(10) unsigned
* doc2_container_40ft : int(10) unsigned
* doc2_container_20ft : int(10) unsigned
* doc3_response : varchar(100)
* doc3_due_date : date
* doc3_actual_date : date
* doc3_status : tinyint(1)
* doc4_response : varchar(100)
* doc4_due_date : date
* doc4_actual_date : date
* doc4_status : tinyint(1)
* doc5_response : varchar(100)
* doc5_due_date : date
* doc5_actual_date : date
* doc5_status : tinyint(1)
* doc6_response : varchar(100)
* doc6_due_date : date
* doc6_actual_date : date
* doc6_status : tinyint(1)
* doc7_response : varchar(100)
* doc7_due_date : date
* doc7_actual_date : date
* doc7_status : tinyint(1)
* doc8_response : varchar(100)
* doc8_due_date : date
* doc8_actual_date : date
* doc8_status : tinyint(1)
* doc9_response : varchar(100)
* doc9_due_date : date
* doc9_actual_date : date
* doc9_status : tinyint(1)
* doc10_response : varchar(100)
* doc10_due_date : date
* doc10_actual_date : date
* doc10_status : tinyint(1)
* doc11_response : varchar(100)
* doc11_due_date : date
* doc11_actual_date : date
* doc11_status : tinyint(1)
* doc12_response : varchar(100)
* doc12_due_date : date
* doc12_actual_date : date
* doc12_status : tinyint(1)
* doc13_response : varchar(100)
* doc13_due_date : date
* doc13_actual_date : date
* doc13_status : tinyint(1)
* doc14_response : varchar(100)
* doc14_due_date : date
* doc14_actual_date : date
* doc14_status : tinyint(1)
* doc15_response : varchar(100)
* doc15_due_date : date
* doc15_actual_date : date
* doc15_status : tinyint(1)
* last_notified_date : date
* created_by : int(11)
* created_at : datetime
* updated_by : int(11)
* updated_at : datetime
v saa_system form_signers
* id : int(11)
* form_type : varchar(20)
* slot : tinyint(4)
* user_id : int(11)
* created_at : datetime
* updated_at : datetime
v saa_system job_applications
* id : int(10) unsigned
* fullname : varchar(150)
* position_applied : varchar(150)
* birth_date : date
* age : tinyint(3) unsigned
* gender : varchar(10)
* weight_kg : decimal(5,1)
* height_cm : decimal(5,1)
* phone : varchar(20)
* email : varchar(150)
* current_address : varchar(500)
* photo_file : varchar(255)
* status : varchar(20)
* created_at : datetime
* ip_address : varchar(45)
v saa_system job_application_certificates
* id : int(10) unsigned
* application_id : int(10) unsigned
* sort_order : tinyint(3) unsigned
* certificate_name : varchar(200)
* photo_file : varchar(255)
v saa_system job_application_education
* id : int(10) unsigned
* application_id : int(10) unsigned
* sort_order : tinyint(3) unsigned
* level_label : varchar(50)
* school_name : varchar(200)
* major : varchar(150)
* graduate_year : varchar(10)
v saa_system job_application_work_history
* id : int(10) unsigned
* application_id : int(10) unsigned
* sort_order : tinyint(3) unsigned
* company_name : varchar(200)
* start_year : varchar(10)
* end_year : varchar(10)
* position : varchar(150)
* salary : varchar(50)
* leave_reason : varchar(255)
v saa_system leave_attachments
* id : int(11)
* leave_request_id : int(11)
* file_name : varchar(255)
* file_path : varchar(500)
* created_at : datetime
v saa_system leave_notifications
* id : int(11)
* user_id : int(11)
* from_user_id : int(11)
* leave_request_id : int(11)
* type : varchar(30)
* is_read : tinyint(1)
* created_at : datetime
v saa_system leave_quotas
* id : int(11)
* user_id : int(11)
* leave_type_id : int(11)
* year : year(4)
* max_days : int(11)
* paid_days : int(11)
* opening_used_days : decimal(5,2)
* annual_leave_note : varchar(100)
v saa_system leave_requests
* id : int(11)
* user_id : int(11)
* leave_type_id : int(11)
* day_type : enum('full','hour','continuous')
* hours : decimal(4,2)
* start_date : date
* end_date : date
* total_days : decimal(4,2)
* reason : text
* status : enum('draft','pending_check','pending_approve','completed','pending_pn_receive','rejected','cancelled')
* auto_rejected_reason : varchar(255)
* auto_reject_notified_at : datetime
* signed_1_at : datetime
* sig_1 : longtext
* signed_2_by : int(11)
* signed_2_at : datetime
* sig_2 : longtext
* signed_3_by : int(11)
* signed_3_at : datetime
* sig_3 : longtext
* signed_pn_by : int(11)
* signed_pn_at : datetime
* sig_pn : longtext
* reject_reason : text
* created_at : datetime
* updated_at : datetime
* cancel_requested_at : datetime
* cancel_reason : varchar(255)
* cancel_confirm_2_by : int(11)
* cancel_confirm_2_at : datetime
* cancel_confirm_3_by : int(11)
* cancel_confirm_3_at : datetime
* hour_start_time : time
* hour_end_time : time
v saa_system leave_request_signatures
* id : int(11)
* leave_request_id : int(11)
* chain_order : int(11)
* required_role : varchar(30)
* signer_user_id : int(11)
* status : enum('pending','signed','rejected')
* signed_at : datetime
* sig_image : longtext
* escalated_at : datetime
* created_at : datetime
v saa_system leave_signers
* id : int(11)
* department_id : int(11)
* requester_role : varchar(30)
* slot : int(11)
* user_id : int(11)
* updated_at : datetime
v saa_system leave_signer_chain
* id : int(11)
* department_id : int(11)
* requester_role : varchar(30)
* chain_order : int(11)
* required_role : varchar(30)
* user_id : int(11)
* created_at : datetime
* updated_at : datetime
v saa_system leave_types
* id : int(11)
* name : varchar(100)
* pdf_code : varchar(5)
* max_days : int(11)
* max_days_male : int(11)
* paid_days : int(11)
* is_active : tinyint(1)
* count_holidays : tinyint(1)
* count_holidays_male : tinyint(1)
v saa_system lg_field_mapping
* id : int(11)
* field_name : varchar(100)
* mapping_type : enum('single','status_pair')
* cell_address : varchar(10)
* pass_cell : varchar(10)
* fail_cell : varchar(10)
* updated_by : int(11)
* updated_at : datetime
v saa_system lg_field_mapping_backup
* id : int(11)
* snapshot_json : longtext
* backed_up_by : int(11)
* backed_up_at : datetime
v saa_system lg_field_mapping_log
* id : int(11)
* field_name : varchar(100)
* action : enum('create','update','delete')
* old_value : text
* new_value : text
* changed_by : int(11)
* changed_at : datetime
v saa_system lg_patrol_log
* id : int(11)
* check_date : date
* shift : enum('D','N')
* inspector_name : text
* status : enum('pending_check','pending_approve','completed')
* duration_seconds : int(10) unsigned
* q1_1_lot : text
* q1_1_prod_date_1 : date
* q1_1_prod_date_2 : date
* q1_1_prod_date_3 : date
* q1_1_status : varchar(10)
* q1_1_cause : text
* q1_1_action : text
* q1_1_pic : text
* q1_1_due_date : date
* q1_1_follower : text
* q1_1_follow_date : date
* q1_2_lot : text
* q1_2_prod_date_1 : date
* q1_2_prod_date_2 : date
* q1_2_prod_date_3 : date
* q1_2_status : varchar(10)
* q1_2_cause : text
* q1_2_action : text
* q1_2_pic : text
* q1_2_due_date : date
* q1_2_follower : text
* q1_2_follow_date : date
* q1_3_lot : text
* q1_3_prod_date_1 : date
* q1_3_prod_date_2 : date
* q1_3_prod_date_3 : date
* q1_3_status : varchar(10)
* q1_3_cause : text
* q1_3_action : text
* q1_3_pic : text
* q1_3_due_date : date
* q1_3_follower : text
* q1_3_follow_date : date
* q2_1_input : text
* q2_1_prod_date_1 : date
* q2_1_prod_qty_1 : int(11)
* q2_1_prod_date_2 : date
* q2_1_prod_qty_2 : int(11)
* q2_1_prod_date_3 : date
* q2_1_prod_qty_3 : int(11)
* q2_1_status : varchar(10)
* q2_1_cause : text
* q2_1_action : text
* q2_1_pic : text
* q2_1_due_date : date
* q2_1_follower : text
* q2_1_follow_date : date
* q2_2_input : text
* q2_2_prod_date_1 : date
* q2_2_prod_qty_1 : int(11)
* q2_2_prod_date_2 : date
* q2_2_prod_qty_2 : int(11)
* q2_2_prod_date_3 : date
* q2_2_prod_qty_3 : int(11)
* q2_2_status : varchar(10)
* q2_2_cause : text
* q2_2_action : text
* q2_2_pic : text
* q2_2_due_date : date
* q2_2_follower : text
* q2_2_follow_date : date
* q2_3_input : text
* q2_3_prod_date_1 : date
* q2_3_prod_qty_1 : int(11)
* q2_3_prod_date_2 : date
* q2_3_prod_qty_2 : int(11)
* q2_3_prod_date_3 : date
* q2_3_prod_qty_3 : int(11)
* q2_3_status : varchar(10)
* q2_3_cause : text
* q2_3_action : text
* q2_3_pic : text
* q2_3_due_date : date
* q2_3_follower : text
* q2_3_follow_date : date
* q3_1_input : text
* q3_1_status : varchar(10)
* q3_1_cause : text
* q3_1_action : text
* q3_1_pic : text
* q3_1_due_date : date
* q3_1_follower : text
* q3_1_follow_date : date
* q3_2_input : text
* q3_2_status : varchar(10)
* q3_2_cause : text
* q3_2_action : text
* q3_2_pic : text
* q3_2_due_date : date
* q3_2_follower : text
* q3_2_follow_date : date
* q3_3_input : text
* q3_3_status : varchar(10)
* q3_3_cause : text
* q3_3_action : text
* q3_3_pic : text
* q3_3_due_date : date
* q3_3_follower : text
* q3_3_follow_date : date
* q4_1_lot : text
* q4_1_status : varchar(10)
* q4_1_cause : text
* q4_1_action : text
* q4_1_pic : text
* q4_1_due_date : date
* q4_1_follower : text
* q4_1_follow_date : date
* q4_2_lot : text
* q4_2_status : varchar(10)
* q4_2_cause : text
* q4_2_action : text
* q4_2_pic : text
* q4_2_due_date : date
* q4_2_follower : text
* q4_2_follow_date : date
* q4_3_lot : text
* q4_3_status : varchar(10)
* q4_3_cause : text
* q4_3_action : text
* q4_3_pic : text
* q4_3_due_date : date
* q4_3_follower : text
* q4_3_follow_date : date
* q5_1_lot : text
* q5_1_per_box : int(11)
* q5_1_boxes : int(11)
* q5_1_remainder : int(11)
* q5_1_total : int(11)
* q5_1_status : varchar(10)
* q5_1_cause : text
* q5_1_action : text
* q5_1_pic : text
* q5_1_due_date : date
* q5_1_follower : text
* q5_1_follow_date : date
* q5_2_lot : text
* q5_2_per_box : int(11)
* q5_2_boxes : int(11)
* q5_2_remainder : int(11)
* q5_2_total : int(11)
* q5_2_status : varchar(10)
* q5_2_cause : text
* q5_2_action : text
* q5_2_pic : text
* q5_2_due_date : date
* q5_2_follower : text
* q5_2_follow_date : date
* q5_3_lot : text
* q5_3_per_box : int(11)
* q5_3_boxes : int(11)
* q5_3_remainder : int(11)
* q5_3_total : int(11)
* q5_3_status : varchar(10)
* q5_3_cause : text
* q5_3_action : text
* q5_3_pic : text
* q5_3_due_date : date
* q5_3_follower : text
* q5_3_follow_date : date
* q6_1_status : varchar(10)
* q6_1_cause : text
* q6_1_action : text
* q6_1_pic : text
* q6_1_due_date : date
* q6_1_follower : text
* q6_1_follow_date : date
* q6_2_status : varchar(10)
* q6_2_cause : text
* q6_2_action : text
* q6_2_pic : text
* q6_2_due_date : date
* q6_2_follower : text
* q6_2_follow_date : date
* q6_3_status : varchar(10)
* q6_3_cause : text
* q6_3_action : text
* q6_3_pic : text
* q6_3_due_date : date
* q6_3_follower : text
* q6_3_follow_date : date
* q6_4_status : varchar(10)
* q6_4_cause : text
* q6_4_action : text
* q6_4_pic : text
* q6_4_due_date : date
* q6_4_follower : text
* q6_4_follow_date : date
* q7_1_status : varchar(10)
* q7_1_cause : text
* q7_1_action : text
* q7_1_pic : text
* q7_1_due_date : date
* q7_1_follower : text
* q7_1_follow_date : date
* q7_2_status : varchar(10)
* q7_2_cause : text
* q7_2_action : text
* q7_2_pic : text
* q7_2_due_date : date
* q7_2_follower : text
* q7_2_follow_date : date
* q7_3_status : varchar(10)
* q7_3_cause : text
* q7_3_action : text
* q7_3_pic : text
* q7_3_due_date : date
* q7_3_follower : text
* q7_3_follow_date : date
* q8_1_lot : text
* q8_1_plant : varchar(30)
* q8_1_shipment_no : varchar(100)
* q8_1_cno : varchar(100)
* q8_1_qty : int(11)
* q8_1_status : varchar(10)
* q8_1_cause : text
* q8_1_action : text
* q8_1_pic : text
* q8_1_due_date : date
* q8_1_follower : text
* q8_1_follow_date : date
* q8_2_lot : text
* q8_2_plant : varchar(30)
* q8_2_shipment_no : varchar(100)
* q8_2_cno : varchar(100)
* q8_2_qty : int(11)
* q8_2_status : varchar(10)
* q8_2_cause : text
* q8_2_action : text
* q8_2_pic : text
* q8_2_due_date : date
* q8_2_follower : text
* q8_2_follow_date : date
* q8_3_lot : text
* q8_3_plant : varchar(30)
* q8_3_shipment_no : varchar(100)
* q8_3_cno : varchar(100)
* q8_3_qty : int(11)
* q8_3_status : varchar(10)
* q8_3_cause : text
* q8_3_action : text
* q8_3_pic : text
* q8_3_due_date : date
* q8_3_follower : text
* q8_3_follow_date : date
* q9_1_lot : text
* q9_1_order_qty : int(11)
* q9_1_per_box : int(11)
* q9_1_boxes : int(11)
* q9_1_remainder : int(11)
* q9_1_prod_date_1 : date
* q9_1_prod_boxes_1 : int(11)
* q9_1_prod_pieces_1 : int(11)
* q9_1_prod_date_2 : date
* q9_1_prod_boxes_2 : int(11)
* q9_1_prod_pieces_2 : int(11)
* q9_1_prod_date_3 : date
* q9_1_prod_boxes_3 : int(11)
* q9_1_prod_pieces_3 : int(11)
* q9_1_status : varchar(10)
* q9_1_cause : text
* q9_1_action : text
* q9_1_pic : text
* q9_1_due_date : date
* q9_1_follower : text
* q9_1_follow_date : date
* q9_2_lot : text
* q9_2_order_qty : int(11)
* q9_2_per_box : int(11)
* q9_2_boxes : int(11)
* q9_2_remainder : int(11)
* q9_2_prod_date_1 : date
* q9_2_prod_boxes_1 : int(11)
* q9_2_prod_pieces_1 : int(11)
* q9_2_prod_date_2 : date
* q9_2_prod_boxes_2 : int(11)
* q9_2_prod_pieces_2 : int(11)
* q9_2_prod_date_3 : date
* q9_2_prod_boxes_3 : int(11)
* q9_2_prod_pieces_3 : int(11)
* q9_2_status : varchar(10)
* q9_2_cause : text
* q9_2_action : text
* q9_2_pic : text
* q9_2_due_date : date
* q9_2_follower : text
* q9_2_follow_date : date
* q9_3_lot : text
* q9_3_order_qty : int(11)
* q9_3_per_box : int(11)
* q9_3_boxes : int(11)
* q9_3_remainder : int(11)
* q9_3_prod_date_1 : date
* q9_3_prod_boxes_1 : int(11)
* q9_3_prod_pieces_1 : int(11)
* q9_3_prod_date_2 : date
* q9_3_prod_boxes_2 : int(11)
* q9_3_prod_pieces_2 : int(11)
* q9_3_prod_date_3 : date
* q9_3_prod_boxes_3 : int(11)
* q9_3_prod_pieces_3 : int(11)
* q9_3_status : varchar(10)
* q9_3_cause : text
* q9_3_action : text
* q9_3_pic : text
* q9_3_due_date : date
* q9_3_follower : text
* q9_3_follow_date : date
* q10_1_lot : text
* q10_1_status : varchar(10)
* q10_1_cause : text
* q10_1_action : text
* q10_1_pic : text
* q10_1_due_date : date
* q10_1_follower : text
* q10_1_follow_date : date
* q10_2_lot : text
* q10_2_status : varchar(10)
* q10_2_cause : text
* q10_2_action : text
* q10_2_pic : text
* q10_2_due_date : date
* q10_2_follower : text
* q10_2_follow_date : date
* q10_3_lot : text
* q10_3_status : varchar(10)
* q10_3_cause : text
* q10_3_action : text
* q10_3_pic : text
* q10_3_due_date : date
* q10_3_follower : text
* q10_3_follow_date : date
* q11_1_status : varchar(10)
* q11_1_cause : text
* q11_1_action : text
* q11_1_pic : varchar(255)
* q11_1_due_date : date
* q11_1_follower : varchar(255)
* q11_1_follow_date : date
* q12_1_status : varchar(10)
* q12_1_cause : text
* q12_1_action : text
* q12_1_pic : varchar(255)
* q12_1_due_date : date
* q12_1_follower : varchar(255)
* q12_1_follow_date : date
* q13_1_status : varchar(10)
* q13_1_cause : text
* q13_1_action : text
* q13_1_pic : varchar(255)
* q13_1_due_date : date
* q13_1_follower : varchar(255)
* q13_1_follow_date : date
* q14_1_status : varchar(10)
* q14_1_cause : text
* q14_1_action : text
* q14_1_pic : varchar(255)
* q14_1_due_date : date
* q14_1_follower : varchar(255)
* q14_1_follow_date : date
* q15_1_status : varchar(10)
* q15_1_cause : text
* q15_1_action : text
* q15_1_pic : varchar(255)
* q15_1_due_date : date
* q15_1_follower : varchar(255)
* q15_1_follow_date : date
* sig_report : longtext
* sig_check : longtext
* sig_approve : longtext
* created_at : datetime
* q16_1_status : varchar(10)
* q16_1_cause : text
* q16_1_action : text
* q16_1_pic : text
* q16_1_due_date : date
* q16_1_follower : text
* q16_1_follow_date : date
* q9_1_total : int(11)
* q9_2_total : int(11)
* q9_3_total : int(11)
* q8_1_box1_part : varchar(100)
* q8_1_box1_prod_date : date
* q8_1_box1_boxes : int(11)
* q8_1_box2_part : varchar(100)
* q8_1_box2_prod_date : date
* q8_1_box2_boxes : int(11)
* q8_1_box3_part : varchar(100)
* q8_1_box3_prod_date : date
* q8_1_box3_boxes : int(11)
* q8_1_box4_part : varchar(100)
* q8_1_box4_prod_date : date
* q8_1_box4_boxes : int(11)
* q8_1_box5_part : varchar(100)
* q8_1_box5_prod_date : date
* q8_1_box5_boxes : int(11)
* q8_2_box1_part : varchar(100)
* q8_2_box1_prod_date : date
* q8_2_box1_boxes : int(11)
* q8_2_box2_part : varchar(100)
* q8_2_box2_prod_date : date
* q8_2_box2_boxes : int(11)
* q8_2_box3_part : varchar(100)
* q8_2_box3_prod_date : date
* q8_2_box3_boxes : int(11)
* q8_2_box4_part : varchar(100)
* q8_2_box4_prod_date : date
* q8_2_box4_boxes : int(11)
* q8_2_box5_part : varchar(100)
* q8_2_box5_prod_date : date
* q8_2_box5_boxes : int(11)
* q8_3_box1_part : varchar(100)
* q8_3_box1_prod_date : date
* q8_3_box1_boxes : int(11)
* q8_3_box2_part : varchar(100)
* q8_3_box2_prod_date : date
* q8_3_box2_boxes : int(11)
* q8_3_box3_part : varchar(100)
* q8_3_box3_prod_date : date
* q8_3_box3_boxes : int(11)
* q8_3_box4_part : varchar(100)
* q8_3_box4_prod_date : date
* q8_3_box4_boxes : int(11)
* q8_3_box5_part : varchar(100)
* q8_3_box5_prod_date : date
* q8_3_box5_boxes : int(11)
v saa_system lg_predelivery_check
* id : int(11)
* check_date : date
* shift_flags : longtext
* part_no : varchar(100)
* sub_models : longtext
* sub_model_other_text : varchar(255)
* status : enum('open','closed')
* foreman_sign : longtext
* supervisor_sign : longtext
* manager_sign : longtext
* created_by : int(11)
* created_at : datetime
* updated_at : datetime
v saa_system lg_predelivery_field_mapping
* id : int(11)
* field_name : varchar(100)
* mapping_type : enum('single','status_pair','checkbox')
* cell_address : varchar(10)
* pass_cell : varchar(10)
* fail_cell : varchar(10)
* checkbox_name : varchar(50)
* hidden : tinyint(1)
* updated_by : int(11)
* updated_at : datetime
v saa_system lg_predelivery_field_mapping_backup
* id : int(11)
* snapshot_json : longtext
* backed_up_by : int(11)
* backed_up_at : datetime
v saa_system lg_predelivery_field_mapping_log
* id : int(11)
* field_name : varchar(100)
* action : enum('create','update','delete')
* old_value : text
* new_value : text
* changed_by : int(11)
* changed_at : datetime
v saa_system lg_predelivery_periods
* id : int(11)
* check_id : int(11)
* period_no : tinyint(2)
* period_label : varchar(50)
* check_time : varchar(20)
* items : longtext
* inspector_name : varchar(255)
* created_by : int(11)
* created_at : datetime
v saa_system lg_template_update_notice
* id : int(11)
* notified_by : int(11)
* note : varchar(255)
* is_resolved : tinyint(1)
* created_at : datetime
* resolved_at : datetime
* resolved_by : int(11)
v saa_system org_chart_positions
* id : int(11)
* user_id : int(11)
* group_name : varchar(30)
* pos_x : int(11)
* pos_y : int(11)
* updated_at : datetime
v saa_system password_reset_tokens
* id : int(11)
* user_id : int(11)
* token : varchar(64)
* expires_at : datetime
* used : tinyint(1)
* created_at : datetime
v saa_system patrol_draft
* id : int(11)
* user_id : int(11)
* dept : enum('LG','WH')
* draft_data : longtext
* saved_at : timestamp
v saa_system patrol_images
* id : int(11)
* log_id : int(11)
* dept : varchar(10)
* question_key : varchar(50)
* file_name : varchar(255)
* created_at : datetime
v saa_system patrol_photo_staging
* id : int(11)
* user_id : int(11)
* dept : enum('LG','WH')
* question_key : varchar(50)
* file_name : varchar(255)
* client_gen : bigint(20)
* created_at : datetime
v saa_system pn_export_log
* id : int(11)
* exported_by : int(11)
* record_count : int(11)
* exported_at : datetime
v saa_system pn_hazard_reports
* id : int(11)
* user_id : int(11)
* hazard_type : tinyint(4)
* emp_id : varchar(20)
* fullname : varchar(100)
* job_area : varchar(255)
* machine_equipment : varchar(255)
* hazard_desc : text
* hazard_image : varchar(255)
* improve_suggestion : text
* created_at : datetime
v saa_system positions
* id : int(11)
* name_th : varchar(100)
* level : tinyint(4)
v saa_system profile_settings
* user_id : int(10) unsigned
* bio : text
* banner_img : varchar(255)
* banner_pos_x : tinyint(3) unsigned
* banner_pos_y : tinyint(3) unsigned
* accent_color : varchar(7)
* theme_pack : varchar(20)
* seasonal_theme_enabled : tinyint(1)
* ui_sound_enabled : tinyint(1)
* effect : varchar(20)
* created_at : datetime
* updated_at : datetime
v saa_system profile_widgets
* id : int(10) unsigned
* user_id : int(10) unsigned
* widget_type : varchar(30)
* pos_x : int(11)
* pos_y : int(11)
* width : int(11)
* height : int(11)
* z_index : int(11)
* content_json : text
* created_at : datetime
* updated_at : datetime
v saa_system push_subscriptions
* id : int(11)
* user_id : int(11)
* endpoint : varchar(500)
* p256dh : varchar(255)
* auth : varchar(255)
* user_agent : varchar(255)
* created_at : datetime
* last_used_at : datetime
v saa_system registration_attempts
* ip_address : varchar(45)
* fail_count : int(11)
* locked_until : datetime
* updated_at : datetime
v saa_system safety_incidents
* id : int(11)
* incident_date : date
* description : varchar(255)
* logged_by : int(11)
* created_at : datetime
v saa_system users
* id : int(11)
* emp_id : varchar(20)
* fullname : varchar(100)
* fullname_en : varchar(150)
* gender : enum('male','female')
* hire_date : date
* phone : varchar(20)
* department_id : int(11)
* direct_supervisor_id : int(11)
* position_id : int(11)
* role : enum('Staff','Leader','Foreman','Supervisor','Asst.Manager','Manager','GM','Director','President','Senior Interpreter','Chief','Operator','Driver','Contract','Japan Interpreter')
* system_role : enum('user','hr_admin','admin')
* approver_id : int(11)
* leave_approver_id : int(11)
* password_hash : varchar(255)
* profile_img : varchar(255)
* outlook_email : varchar(150)
* status : enum('active','inactive','pending')
* last_active : datetime
* created_at : datetime
* updated_at : datetime
* session_token : varchar(64)
* remember_token : varchar(64)
* reset_fail_count : int(11)
* reset_locked_until : datetime
* login_fail_count : int(11)
* login_locked_until : datetime
* two_factor_enabled : tinyint(1)
* twofa_fail_count : int(11)
* twofa_locked_until : datetime
v saa_system user_module_access
* id : int(11)
* user_id : int(11)
* module : varchar(30)
* permission : enum('view','export','full')
* created_at : datetime
* updated_at : datetime
v saa_system user_status
* user_id : int(11)
* fullname : varchar(100)
* dept_code : varchar(20)
* page_label : varchar(100)
* last_seen : datetime
v saa_system wh_field_mapping
* id : int(11)
* field_name : varchar(100)
* mapping_type : enum('single','status_pair')
* cell_address : varchar(10)
* pass_cell : varchar(10)
* fail_cell : varchar(10)
* updated_by : int(11)
* updated_at : datetime
v saa_system wh_field_mapping_backup
* id : int(11)
* snapshot_json : longtext
* backed_up_by : int(11)
* backed_up_at : datetime
v saa_system wh_field_mapping_log
* id : int(11)
* field_name : varchar(100)
* action : enum('create','update','delete')
* old_value : text
* new_value : text
* changed_by : int(11)
* changed_at : datetime
v saa_system wh_patrol_log
* id : int(11)
* check_date : date
* shift : enum('D','N')
* inspector_name : text
* status : enum('pending_check','pending_approve','completed')
* duration_seconds : int(10) unsigned
* q1_1_lot : text
* q1_1_status : varchar(10)
* q1_1_cause : text
* q1_1_action : text
* q1_1_pic : text
* q1_1_due_date : date
* q1_1_follower : text
* q1_1_follow_date : date
* q1_2_lot : text
* q1_2_status : varchar(10)
* q1_2_cause : text
* q1_2_action : text
* q1_2_pic : text
* q1_2_due_date : date
* q1_2_follower : text
* q1_2_follow_date : date
* q1_3_lot : text
* q1_3_status : varchar(10)
* q1_3_cause : text
* q1_3_action : text
* q1_3_pic : text
* q1_3_due_date : date
* q1_3_follower : text
* q1_3_follow_date : date
* q2_1_input : text
* q2_1_status : varchar(10)
* q2_1_cause : text
* q2_1_action : text
* q2_1_pic : text
* q2_1_due_date : date
* q2_1_follower : text
* q2_1_follow_date : date
* q2_2_input : text
* q2_2_status : varchar(10)
* q2_2_cause : text
* q2_2_action : text
* q2_2_pic : text
* q2_2_due_date : date
* q2_2_follower : text
* q2_2_follow_date : date
* q2_3_input : text
* q2_3_status : varchar(10)
* q2_3_cause : text
* q2_3_action : text
* q2_3_pic : text
* q2_3_due_date : date
* q2_3_follower : text
* q2_3_follow_date : date
* q3_1_input : text
* q3_1_status : varchar(10)
* q3_1_cause : text
* q3_1_action : text
* q3_1_pic : text
* q3_1_due_date : date
* q3_1_follower : text
* q3_1_follow_date : date
* q3_2_input : text
* q3_2_status : varchar(10)
* q3_2_cause : text
* q3_2_action : text
* q3_2_pic : text
* q3_2_due_date : date
* q3_2_follower : text
* q3_2_follow_date : date
* q3_3_input : text
* q3_3_status : varchar(10)
* q3_3_cause : text
* q3_3_action : text
* q3_3_pic : text
* q3_3_due_date : date
* q3_3_follower : text
* q3_3_follow_date : date
* q4_1_input : text
* q4_1_status : varchar(10)
* q4_1_cause : text
* q4_1_action : text
* q4_1_pic : text
* q4_1_due_date : date
* q4_1_follower : text
* q4_1_follow_date : date
* q5_1_input : text
* q5_1_status : varchar(10)
* q5_1_cause : text
* q5_1_action : text
* q5_1_pic : text
* q5_1_due_date : date
* q5_1_follower : text
* q5_1_follow_date : date
* q6_1_input : text
* q6_1_status : varchar(10)
* q6_1_cause : text
* q6_1_action : text
* q6_1_pic : text
* q6_1_due_date : date
* q6_1_follower : text
* q6_1_follow_date : date
* q7_1_status : varchar(10)
* q7_1_cause : text
* q7_1_action : text
* q7_1_pic : text
* q7_1_due_date : date
* q7_1_follower : text
* q7_1_follow_date : date
* q7_2_status : varchar(10)
* q7_2_cause : text
* q7_2_action : text
* q7_2_pic : text
* q7_2_due_date : date
* q7_2_follower : text
* q7_2_follow_date : date
* q7_3_status : varchar(10)
* q7_3_cause : text
* q7_3_action : text
* q7_3_pic : text
* q7_3_due_date : date
* q7_3_follower : text
* q7_3_follow_date : date
* q7_4_status : varchar(10)
* q7_4_cause : text
* q7_4_action : text
* q7_4_pic : text
* q7_4_due_date : date
* q7_4_follower : text
* q7_4_follow_date : date
* q7_5_status : varchar(10)
* q7_5_cause : text
* q7_5_action : text
* q7_5_pic : text
* q7_5_due_date : date
* q7_5_follower : text
* q7_5_follow_date : date
* q7_6_status : varchar(10)
* q7_6_cause : text
* q7_6_action : text
* q7_6_pic : text
* q7_6_due_date : date
* q7_6_follower : text
* q7_6_follow_date : date
* q8_1_status : varchar(10)
* q8_1_cause : text
* q8_1_action : text
* q8_1_pic : text
* q8_1_due_date : date
* q8_1_follower : text
* q8_1_follow_date : date
* q9_1_status : varchar(10)
* q9_1_cause : text
* q9_1_action : text
* q9_1_pic : text
* q9_1_due_date : date
* q9_1_follower : text
* q9_1_follow_date : date
* q10_1_status : varchar(10)
* q10_1_cause : text
* q10_1_action : text
* q10_1_pic : text
* q10_1_due_date : date
* q10_1_follower : text
* q10_1_follow_date : date
* q11_1_status : varchar(10)
* q11_1_cause : text
* q11_1_action : text
* q11_1_pic : text
* q11_1_due_date : date
* q11_1_follower : text
* q11_1_follow_date : date
* sig_report : longtext
* sig_check : longtext
* sig_approve : longtext
* created_at : datetime
* q12_1_input : text
* q12_1_status : varchar(10)
* q12_1_cause : text
* q12_1_action : text
* q12_1_pic : text
* q12_1_due_date : date
* q12_1_follower : text
* q12_1_follow_date : date
* q13_1_lot : text
* q13_1_status : varchar(10)
* q13_1_cause : text
* q13_1_action : text
* q13_1_pic : text
* q13_1_due_date : date
* q13_1_follower : text
* q13_1_follow_date : date
* q1_1_prod_date_1 : date
* q1_1_prod_date_2 : date
* q1_1_prod_date_3 : date
* q1_2_prod_date_1 : date
* q1_2_prod_date_2 : date
* q1_2_prod_date_3 : date
* q1_3_prod_date_1 : date
* q1_3_prod_date_2 : date
* q1_3_prod_date_3 : date
* q2_1_prod_date_1 : date
* q2_1_prod_date_2 : date
* q2_1_prod_date_3 : date
* q2_2_prod_date_1 : date
* q2_2_prod_date_2 : date
* q2_2_prod_date_3 : date
* q2_3_prod_date_1 : date
* q2_3_prod_date_2 : date
* q2_3_prod_date_3 : date
* q3_1_prod_date_1 : date
* q3_1_prod_date_2 : date
* q3_1_prod_date_3 : date
* q3_2_prod_date_1 : date
* q3_2_prod_date_2 : date
* q3_2_prod_date_3 : date
* q3_3_prod_date_1 : date
* q3_3_prod_date_2 : date
* q3_3_prod_date_3 : date
* q4_1_prod_date_1 : date
* q4_1_prod_date_2 : date
* q4_1_prod_date_3 : date
* q5_1_prod_date_1 : date
* q5_1_prod_date_2 : date
* q5_1_prod_date_3 : date
* q6_1_prod_date_1 : date
* q6_1_prod_date_2 : date
* q6_1_prod_date_3 : date
* q2_1_per_box : int(11)
* q2_1_boxes : int(11)
* q2_1_remainder : int(11)
* q2_1_total : int(11)
* q2_2_per_box : int(11)
* q2_2_boxes : int(11)
* q2_2_remainder : int(11)
* q2_2_total : int(11)
* q2_3_per_box : int(11)
* q2_3_boxes : int(11)
* q2_3_remainder : int(11)
* q2_3_total : int(11)
* q4_1_per_box : int(11)
* q4_1_boxes : int(11)
* q4_1_remainder : int(11)
* q4_1_total : int(11)
* q4_1_no : varchar(255)
* q10_1_input : text
v saa_system wh_template_update_notice
* id : int(11)
* notified_by : int(11)
* note : varchar(255)
* is_resolved : tinyint(1)
* created_at : datetime
* resolved_at : datetime
* resolved_by : int(11)
Create relationship
FOREIGN KEY
on delete
on update
Delete relationship