fix: 订单表 schema 跟进 name 字段移除
This commit is contained in:
@@ -1,20 +1,15 @@
|
||||
CREATE TABLE orders (
|
||||
id BIGINT PRIMARY KEY,
|
||||
consumer_id BIGINT NOT NULL,
|
||||
consumer_name VARCHAR(100) NOT NULL,
|
||||
player_id BIGINT NOT NULL,
|
||||
player_name VARCHAR(100) NOT NULL,
|
||||
shop_id BIGINT,
|
||||
shop_name VARCHAR(200),
|
||||
service_snapshot JSONB NOT NULL,
|
||||
status VARCHAR(30) NOT NULL DEFAULT 'pending_payment',
|
||||
total_price DECIMAL(10,2) NOT NULL,
|
||||
note TEXT,
|
||||
version INT NOT NULL DEFAULT 1,
|
||||
timeout_job_id VARCHAR(100),
|
||||
search_text TEXT GENERATED ALWAYS AS (
|
||||
consumer_name || ' ' || player_name || ' ' || coalesce(shop_name, '') || ' ' || coalesce(note, '')
|
||||
) STORED,
|
||||
search_text TEXT,
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
||||
accepted_at TIMESTAMPTZ,
|
||||
closed_at TIMESTAMPTZ,
|
||||
|
||||
Reference in New Issue
Block a user