{"action":"closed","issue":{"url":"https://api.github.com/repos/golemfactory/concent/issues/894","repository_url":"https://api.github.com/repos/golemfactory/concent","labels_url":"https://api.github.com/repos/golemfactory/concent/issues/894/labels{/name}","comments_url":"https://api.github.com/repos/golemfactory/concent/issues/894/comments","events_url":"https://api.github.com/repos/golemfactory/concent/issues/894/events","html_url":"https://github.com/golemfactory/concent/issues/894","id":370587906,"node_id":"MDU6SXNzdWUzNzA1ODc5MDY=","number":894,"title":"Bankster: Add database models","user":{"login":"rwrzesien","id":10088909,"node_id":"MDQ6VXNlcjEwMDg4OTA5","avatar_url":"https://avatars0.githubusercontent.com/u/10088909?v=4","gravatar_id":"","url":"https://api.github.com/users/rwrzesien","html_url":"https://github.com/rwrzesien","followers_url":"https://api.github.com/users/rwrzesien/followers","following_url":"https://api.github.com/users/rwrzesien/following{/other_user}","gists_url":"https://api.github.com/users/rwrzesien/gists{/gist_id}","starred_url":"https://api.github.com/users/rwrzesien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwrzesien/subscriptions","organizations_url":"https://api.github.com/users/rwrzesien/orgs","repos_url":"https://api.github.com/users/rwrzesien/repos","events_url":"https://api.github.com/users/rwrzesien/events{/privacy}","received_events_url":"https://api.github.com/users/rwrzesien/received_events","type":"User","site_admin":false},"labels":[{"id":975867974,"node_id":"MDU6TGFiZWw5NzU4Njc5NzQ=","url":"https://api.github.com/repos/golemfactory/concent/labels/bankster","name":"bankster","color":"35eae7","default":false},{"id":822556027,"node_id":"MDU6TGFiZWw4MjI1NTYwMjc=","url":"https://api.github.com/repos/golemfactory/concent/labels/feature","name":"feature","color":"f2dc15","default":false}],"state":"closed","locked":false,"assignee":{"login":"MichalW-CP","id":36954871,"node_id":"MDQ6VXNlcjM2OTU0ODcx","avatar_url":"https://avatars3.githubusercontent.com/u/36954871?v=4","gravatar_id":"","url":"https://api.github.com/users/MichalW-CP","html_url":"https://github.com/MichalW-CP","followers_url":"https://api.github.com/users/MichalW-CP/followers","following_url":"https://api.github.com/users/MichalW-CP/following{/other_user}","gists_url":"https://api.github.com/users/MichalW-CP/gists{/gist_id}","starred_url":"https://api.github.com/users/MichalW-CP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichalW-CP/subscriptions","organizations_url":"https://api.github.com/users/MichalW-CP/orgs","repos_url":"https://api.github.com/users/MichalW-CP/repos","events_url":"https://api.github.com/users/MichalW-CP/events{/privacy}","received_events_url":"https://api.github.com/users/MichalW-CP/received_events","type":"User","site_admin":false},"assignees":[{"login":"MichalW-CP","id":36954871,"node_id":"MDQ6VXNlcjM2OTU0ODcx","avatar_url":"https://avatars3.githubusercontent.com/u/36954871?v=4","gravatar_id":"","url":"https://api.github.com/users/MichalW-CP","html_url":"https://github.com/MichalW-CP","followers_url":"https://api.github.com/users/MichalW-CP/followers","following_url":"https://api.github.com/users/MichalW-CP/following{/other_user}","gists_url":"https://api.github.com/users/MichalW-CP/gists{/gist_id}","starred_url":"https://api.github.com/users/MichalW-CP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichalW-CP/subscriptions","organizations_url":"https://api.github.com/users/MichalW-CP/orgs","repos_url":"https://api.github.com/users/MichalW-CP/repos","events_url":"https://api.github.com/users/MichalW-CP/events{/privacy}","received_events_url":"https://api.github.com/users/MichalW-CP/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2018-10-16T12:30:17Z","updated_at":"2018-10-24T09:10:37Z","closed_at":"2018-10-24T09:10:37Z","author_association":"COLLABORATOR","body":"This is a part of the implementation of the \"Bankster\" blueprint (#479).\r\n\r\nAdd following models along with migrations:\r\n\r\n#### `DepositClaim` model\r\n- **Database**: `control`\r\n\r\n| Column name                     | Type                  | Optional | Remarks                                                                                                                 |\r\n|---------------------------------|-----------------------|----------|-------------------------------------------------------------------------------------------------------------------------|\r\n| `subtask`                       | `Subtask`             | yes      | Foreign key to a subtask object. Can be `NULL` if and only if `concent_use_case` is `ForcedPayment`.\r\n| `payer_deposit_account`         | `DepositAccount`      | no       | The deposit account belonging to the client who is supposed to pay the claim. `payer_deposit_account.ethereum_public_key` cannot be the same as `payee_ethereum_public_key`.\r\n| `payee_ethereum_address`     | string                | no       | Address of the Ethereum account belonging to the entity (requestor, provider or Concent) who is supposed to receive the claim. Cannot be the same as `payer_deposit_account.ethereum_public_key`.\r\n| `concent_use_case`              | `ConcentUseCase`      | no       | Use case in which Concent claim the deposit.\r\n| `amount`                        | int               | no       | The amount claimed. Must be greater than zero.\r\n| `tx_hash`                       | string                | yes      | The hash of the Ethereum transaction that will cover the claim. Empty if the transaction has not been created yet. Must be unique - one transaction can satisfy only one claim.\r\n| `created_at`                    | datetime             | no       | The creation time of the object.\r\n| `updated_at`                    | datetime             | no       | Time of the last modification of any field in the object.\r\n\r\n#### `DepositAccount` model\r\n- **Database**: `control`\r\n\r\n| Column name                   | Type                  | Optional | Remarks                                                                                                                 |\r\n|-------------------------------|-----------------------|----------|-------------------------------------------------------------------------------------------------------------------------|\r\n| `client`                      | `Client`              | no       | `Client` who owns the deposit on this account.\r\n| `ethereum_address`         | string                | no       | Address of the Ethereum account belonging to the client who owns the deposit account.\r\n| `created_at`                  | datetime             | no       | The creation time of the object.\r\n"}}
{"actor":{"display_login":"MichalW-CP"}}