feat(oneos): add signed scope API client
This commit is contained in:
@@ -35,14 +35,14 @@ CREATE TABLE IF NOT EXISTS business_customer_vehicle_scope (
|
||||
|
||||
CREATE TABLE IF NOT EXISTS business_scope_rejection (
|
||||
run_id CHAR(32) NOT NULL,
|
||||
row_number INT UNSIGNED NOT NULL,
|
||||
`row_number` INT UNSIGNED NOT NULL,
|
||||
vehicle_id BIGINT NULL,
|
||||
vin VARCHAR(64) NOT NULL DEFAULT '',
|
||||
customer_id BIGINT NULL,
|
||||
contract_id BIGINT NULL,
|
||||
reason_code VARCHAR(64) NOT NULL,
|
||||
created_at DATETIME(3) NOT NULL,
|
||||
PRIMARY KEY (run_id, row_number),
|
||||
PRIMARY KEY (run_id, `row_number`),
|
||||
INDEX idx_business_scope_rejection_reason (reason_code, created_at),
|
||||
CONSTRAINT fk_business_scope_rejection_run
|
||||
FOREIGN KEY (run_id) REFERENCES business_scope_sync_run(run_id)
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
ALTER TABLE business_customer_vehicle_scope
|
||||
ADD COLUMN customer_name VARCHAR(255) NOT NULL DEFAULT '' AFTER customer_id;
|
||||
|
||||
ALTER TABLE business_customer_vehicle_scope
|
||||
ADD COLUMN department_id VARCHAR(64) NOT NULL DEFAULT '' AFTER project_name;
|
||||
|
||||
ALTER TABLE business_customer_vehicle_scope
|
||||
ADD COLUMN department_name VARCHAR(255) NOT NULL DEFAULT '' AFTER department_id;
|
||||
|
||||
ALTER TABLE business_customer_vehicle_scope
|
||||
ADD COLUMN responsible_user_id VARCHAR(64) NOT NULL DEFAULT '' AFTER department_name;
|
||||
|
||||
ALTER TABLE business_customer_vehicle_scope
|
||||
ADD COLUMN responsible_user_name VARCHAR(255) NOT NULL DEFAULT '' AFTER responsible_user_id;
|
||||
|
||||
CREATE INDEX idx_business_scope_department
|
||||
ON business_customer_vehicle_scope(source_version, department_id, vin);
|
||||
|
||||
CREATE INDEX idx_business_scope_responsible
|
||||
ON business_customer_vehicle_scope(source_version, responsible_user_id, vin);
|
||||
Reference in New Issue
Block a user