Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TABLE H1S_wallets_txs (
- id int(10) unsigned NOT NULL AUTO_INCREMENT,
- blog_id bigint(20) NOT NULL DEFAULT 1 COMMENT 'useful in multisite installs only if plugin is not network activated',
- category enum('deposit','move','withdraw','trade') NOT NULL COMMENT 'type of transaction',
- tags varchar(255) NOT NULL DEFAULT '' COMMENT 'space separated list of tags, slugs, etc that further describe the type of transaction',
- account bigint(20) unsigned NOT NULL COMMENT 'H1S_users.ID',
- other_account bigint(20) unsigned DEFAULT NULL COMMENT 'H1S_users.ID when category==move',
- address varchar(120) NOT NULL DEFAULT '' COMMENT 'blockchain address when category==deposit or category==withdraw',
- extra varchar(120) NOT NULL DEFAULT '' COMMENT 'extra info required by some coins such as XMR',
- txid varchar(120) DEFAULT NULL COMMENT 'blockchain transaction id',
- symbol varchar(8) NOT NULL COMMENT 'coin symbol (e.g. BTC for Bitcoin)',
- amount decimal(20,10) signed NOT NULL COMMENT 'amount plus any fees deducted from account',
- fee decimal(20,10) signed NOT NULL DEFAULT 0 COMMENT 'fees deducted from account',
- comment TEXT DEFAULT NULL COMMENT 'transaction comment',
- created_time datetime NOT NULL COMMENT 'when transaction was entered into the system in GMT',
- updated_time datetime NOT NULL COMMENT 'when transaction was last updated in GMT (e.g. for update to confirmations count)',
- confirmations mediumint unsigned DEFAULT 0 COMMENT 'amount of confirmations received from blockchain, or null for category IN (move,trade)',
- status enum('unconfirmed','pending','done','failed','cancelled') NOT NULL DEFAULT 'unconfirmed' COMMENT 'state of transaction',
- retries tinyint unsigned NOT NULL DEFAULT 1 COMMENT 'retries left before a pending transaction status becomes failed',
- admin_confirm tinyint(1) NOT NULL DEFAULT 0 COMMENT '1 if an admin has confirmed this transaction',
- user_confirm tinyint(1) NOT NULL DEFAULT 0 COMMENT '1 if the user has confirmed this transaction over email',
- nonce char(32) DEFAULT NULL COMMENT 'nonce for user to confirm via emailed link',
- PRIMARY KEY (id),
- KEY account_idx (account),
- KEY blogid_idx (blog_id),
- UNIQUE KEY uq_tx_idx (txid,address,symbol)
- ) ENGINE = InnoDB;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement