Add apitypes to avoid parsing from/to DB

This commit is contained in:
Arnau B
2020-10-22 17:10:17 +02:00
parent 0e5aad4767
commit 7c8f380637
9 changed files with 538 additions and 2 deletions

View File

@@ -16,7 +16,8 @@ CREATE TABLE coordinator (
);
CREATE TABLE batch (
batch_num BIGINT PRIMARY KEY,
item_id SERIAL PRIMARY KEY,
batch_num BIGINT NOT NULL,
eth_block_num BIGINT NOT NULL REFERENCES block (eth_block_num) ON DELETE CASCADE,
forger_addr BYTEA NOT NULL, -- fake foreign key for coordinator
fees_collected BYTEA NOT NULL,