Add operator workspace tools

This commit is contained in:
Codex
2026-05-08 15:39:02 +08:00
parent 519186a73a
commit 2a21ebb5ff
16 changed files with 838 additions and 7 deletions
+18
View File
@@ -0,0 +1,18 @@
create table if not exists operator_notes (
id bigserial primary key,
instrument_id bigint not null references instruments(id),
note_scope text not null,
session_code text,
execution_id bigint references trade_executions(id),
signal_id bigint references trade_signals(id),
candidate_id bigint references trade_plan_candidates(id),
decision_packet_id bigint references decision_packets(id),
author text not null,
body text not null,
tags jsonb not null default '[]'::jsonb,
created_ts timestamptz not null,
updated_at timestamptz not null default now()
);
create index if not exists idx_operator_notes_instrument_created_desc
on operator_notes (instrument_id, created_ts desc, id desc);