web/website/node/guild-route-bindings.mjs

3 lines
520 B
JavaScript

// Route receipt metadata only; organisation ownership stays in original deeds.
export const GUILD_ROUTE_SCHEMA=`CREATE TABLE IF NOT EXISTS pb_guild_route_bindings(id CHAR(36) PRIMARY KEY,route_kind VARCHAR(16) NOT NULL,source_world VARCHAR(32) NOT NULL,binding_json TEXT NULL,delivered_at BIGINT NULL,created_at BIGINT NOT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4`;
export const passageView=r=>({requestId:r.id,destination:r.destination,state:r.state,fareMinor:Number(r.fare_minor),expiresAt:Number(r.expires_at)});