managers: added managers entity && chore - #361
Open
bogdanserdinov wants to merge 15 commits into
Open
bogdanserdinov wants to merge 15 commits into
bogdanserdinov wants to merge 15 commits into
Conversation
bogdanserdinov
requested review from
Dmytro-yakymuk,
crawter and
tarkovskynik
November 16, 2021 15:57
crawter
reviewed
Nov 23, 2021
| // Copyright (C) 2021 Creditor Corp. Group. | ||
| // See LICENSE for copying information. | ||
|
|
||
| package managers |
Member
There was a problem hiding this comment.
i think that manager is a part of user. Some kind of new role. Should it be in users/managers?
| type Manager struct { | ||
| UserID uuid.UUID `json:"userId"` | ||
| ClubID uuid.UUID `json:"clubId"` | ||
| EndedAt time.Time `json:"endedAt"` |
Contributor
There was a problem hiding this comment.
do not need a manager createdAt field?
Member
Author
There was a problem hiding this comment.
mb we need to add season id in which manager started his work
| } | ||
|
|
||
| defer func() { | ||
| err = errs.Combine(err, rows.Close()) |
|
|
||
| allManagers = append(allManagers, manager) | ||
| } | ||
| if err = rows.Err(); err != nil { |
Contributor
There was a problem hiding this comment.
remove it and just return return allManagers, ErrManagers.Wrap(rows.Err())
| // architecture: Chore | ||
| type Chore struct { | ||
| service *Service | ||
| Loop *sync.Cycle |
| return userClubs, ErrClubs.Wrap(err) | ||
| } | ||
|
|
||
| managedClubs, err := service.managers.ListByUserID(ctx, userID) |
Contributor
There was a problem hiding this comment.
maybe one db method needs to be done for this?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.