兼容接入订单租期字段

This commit is contained in:
yml
2026-05-24 18:24:39 +08:00
parent e69d08ca9f
commit 778e08a261
9 changed files with 211 additions and 85 deletions
+4 -1
View File
@@ -78,6 +78,8 @@ CREATE TABLE rental_orders (
account_id BIGINT UNSIGNED NOT NULL,
owner_id BIGINT UNSIGNED NOT NULL,
renter_id BIGINT UNSIGNED NOT NULL,
rented_at DATETIME NULL,
estimated_duration_hours INT NOT NULL DEFAULT 24,
rent_start_at DATETIME NULL,
rent_end_at DATETIME NULL,
rent_hours INT NOT NULL,
@@ -95,7 +97,8 @@ CREATE TABLE rental_orders (
UNIQUE KEY uk_rental_orders_order_no (order_no),
KEY idx_rental_orders_renter_status (renter_id, status),
KEY idx_rental_orders_owner_status (owner_id, status),
KEY idx_rental_orders_listing_id (listing_id)
KEY idx_rental_orders_listing_id (listing_id),
KEY idx_rental_orders_rented_at (status, rented_at)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE handoff_records (