-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
portfolio account aggregated statistics #444
Comments
User sign in
address [string]
message [string]
signature [string]
pub_key [string]
jwt [string] Update user name
name [string] User portfolio statistics
address [string] # latest_address_in_frontend
capacity [decimal]
deposit_compensation [decimal]
occupied_capacity [decimal]
dao_deposit [decimal] Sync portfolio addresses
addresses [][string] # addresses_diff_between_frontend_and_backend CREATE TABLE
`users`(
`id` BIGINT NOT NULL AUTO_INCREMENT COMMENT 'user id, primary key',
`uuid` VARCHAR(36) NOT NULL DEFAULT '' COMMENT 'user uuid',
`identifier` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'user identifier',
`nonce` INT unsigned NOT NULL DEFAULT 0 COMMENT 'user nonce',
`name` VARCHAR(255) DEFAULT '' COMMENT 'user name',
`create_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'created at',
`update_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'updated at',
PRIMARY KEY(`id`),
CONSTRAINT uc_identifier_on_users UNIQUE(`identifier`),
CONSTRAINT uc_uuid_on_users UNIQUE(`uuid`)
); CREATE TABLE
`portfolios`(
`user_id` BIGINT NOT NULL DEFAULT 0 COMMENT 'user id',
`address_id` BIGINT NOT NULL DEFAULT 0 COMMENT 'address id',
UNIQUE KEY `uc_user_id_address_id_on_portfolios`(`user_id`, `address_id`)
); CREATE TABLE
`portfolio_statistics`(
`user_id` BIGINT NOT NULL DEFAULT 0,
`capacity` DECIMAL(30, 0) UNSIGNED NOT NULL DEFAULT 0,
`occupied_capacity` DECIMAL(30, 0) UNSIGNED NOT NULL DEFAULT 0,
`dao_deposit` DECIMAL(30, 0) UNSIGNED NOT NULL DEFAULT 0,
`interest` DECIMAL(30, 0) UNSIGNED NOT NULL DEFAULT 0,
`unclaimed_compensation` DECIMAL(30, 0) UNSIGNED NOT NULL DEFAULT 0,
UNIQUE KEY `uc_user_id_address_id_on_portfolios`(`user_id`, `address_id`)
); |
Open
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Magickbase/visual-style-guide#36
ckb-js/kuai#464 (comment)
Magickbase/neuron-public-issues#144
https://github.com/ckb-js/lumos/blob/develop/packages/hd/src/key.ts#L27-L30
The text was updated successfully, but these errors were encountered: