-- Active: xiaoding_test@@192.168.110.85@3306@xiaoding_test

DROP TABLE IF EXISTS `order_setting_cte`;

CREATE TABLE order_setting_cte
(
   id                   BIGINT NOT NULL AUTO_INCREMENT COMMENT '主键ID',
   area_code                 VARCHAR(100) NOT NULL COMMENT '区域',
   evaluation_terms     TEXT COMMENT '评价术语',
   complaint_terms      TEXT COMMENT '投诉术语',
   order_distance       DECIMAL(10,2) NOT NULL COMMENT '接单距离(单位:公里)',
   free_distance       DECIMAL(10,2) NOT NULL COMMENT '免费距离(单位:公里)',
   default_fare        DECIMAL(10,2) NOT NULL COMMENT '默认扣除路费(单位:元)',
   payment_timeout     INT NOT NULL COMMENT '支付超时时长(单位:分钟)',
   technician_lock_time INT NOT NULL COMMENT '锁定技师时长(单位:分钟)',
   no_technician_timeout INT NOT NULL COMMENT '无技师抢单时长(单位:分钟)',
   order_cancel_time   INT NOT NULL COMMENT '订单取消时长(单位:分钟)',
   create_time         DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
   update_time         DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
   is_deleted          TINYINT NOT NULL DEFAULT 0 COMMENT '是否删除(0:未删除 1:已删除)',
   PRIMARY KEY (id)
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '订单设置';