{"action":"closed","issue":{"url":"https://api.github.com/repos/RyanPnayR/issue-migration/issues/16","repository_url":"https://api.github.com/repos/RyanPnayR/issue-migration","labels_url":"https://api.github.com/repos/RyanPnayR/issue-migration/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/RyanPnayR/issue-migration/issues/16/comments","events_url":"https://api.github.com/repos/RyanPnayR/issue-migration/issues/16/events","html_url":"https://github.com/RyanPnayR/issue-migration/issues/16","id":356130290,"node_id":"MDU6SXNzdWUzNTYxMzAyOTA=","number":16,"title":"Make a Customer M->N For a User","user":{"login":"RyanPnayR","id":17659845,"node_id":"MDQ6VXNlcjE3NjU5ODQ1","avatar_url":"https://avatars2.githubusercontent.com/u/17659845?v=4","gravatar_id":"","url":"https://api.github.com/users/RyanPnayR","html_url":"https://github.com/RyanPnayR","followers_url":"https://api.github.com/users/RyanPnayR/followers","following_url":"https://api.github.com/users/RyanPnayR/following{/other_user}","gists_url":"https://api.github.com/users/RyanPnayR/gists{/gist_id}","starred_url":"https://api.github.com/users/RyanPnayR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RyanPnayR/subscriptions","organizations_url":"https://api.github.com/users/RyanPnayR/orgs","repos_url":"https://api.github.com/users/RyanPnayR/repos","events_url":"https://api.github.com/users/RyanPnayR/events{/privacy}","received_events_url":"https://api.github.com/users/RyanPnayR/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-31T21:36:40Z","updated_at":"2018-08-31T21:36:42Z","closed_at":"2018-08-31T21:36:42Z","author_association":"OWNER","body":"In GitLab by @nZac on Dec 2, 2017, 23:42\n\nA user might be assigned multiple customers (in the case of a broker managing other customers) and a customer might have multiple users (in the case of a husband and wife). Therefore a better design than the current 1->N is to move to an M->N design for customers and users.\n\nSo... create an association table for customers and users. Setup the relationships on the entities. Setup the migrations. And if you feel so inclined create an interface for assigning a user to a customer. Ping @nZac if you have questions on any of these items.\n\nThe API endpoints for creating this should probably be one user not the customer, though I haven't thought all the way through this yet, so it might be better to do it a different way."}}
{"actor":{"display_login":"RyanPnayR"}}