Commit Graph

8 Commits

Author SHA1 Message Date
caoqianming a33c013da5 Add operation-system config schema and CRUD API
Land design doc §12 P1 + P2: ops business tables plus station/segment
configuration endpoints. The engine (P3) consumes these as its inputs.

- Migration: six ops tables (station, station_signal, process_segment,
  segment_step, segment_interlock, segment_resource) plus event attribution
  columns (subject_type, subject_id).
- model.rs: FromRow structs and string-backed enum helpers
  (StationType, StationSignalRole, SegmentMode, ActionKind, OnTimeout,
  InterlockAppliesTo, RuleKind).
- service: station CRUD with signal-binding upsert; segment CRUD with
  nested step/interlock CRUD and transactional resource replacement.
- handler: 13 endpoints covering design doc §9.1 config routes with
  validator-based input checks and enum allowlists.
- router: wires the new routes; smoke tests cover station and segment
  collection routes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 08:17:34 +08:00
caoqianming 1354f89204 db: enforce unique signal_role per equipment on point
Prevents accidentally binding two points with the same role to the
same equipment at the database level.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 22:14:27 +08:00
caoqianming 4e3d325437 feat(control): add unit and event foundation 2026-03-24 10:20:23 +08:00
caoqianming 8be82e372e feat(point): add equipment metadata scaffolding 2026-03-23 10:38:20 +08:00
caoqianming 6f215162a3 feat(page): add page table and CRUD handlers 2026-03-11 13:54:14 +08:00
caoqianming a6be0827d0 refactor: 统一轮询任务实现,移除 scan_interval_s 字段 2026-03-05 09:30:30 +08:00
caoqianming 550c7b3974 修改migrate名称 2026-03-04 13:57:40 +08:00
caoqianming 44f4a794d3 feat: 软件第一个版本 2026-03-03 13:32:05 +08:00