Skip to content

managers: added managers entity && chore - #361

Open
bogdanserdinov wants to merge 15 commits into
developfrom
bs/managers-for-clubs
Open

bogdanserdinov wants to merge 15 commits into
developfrom
bs/managers-for-clubs

Conversation

@bogdanserdinov

Copy link
Copy Markdown
Member

No description provided.

@bogdanserdinov bogdanserdinov self-assigned this Nov 16, 2021
@bogdanserdinov bogdanserdinov changed the title managers: added managers && chore managers: added managers entity && chore Nov 16, 2021
Comment thread clubs/clubs.go Outdated
Comment thread clubs/service.go Outdated
Comment thread managers/managers.go
Comment thread managers/managers.go
// Copyright (C) 2021 Creditor Corp. Group.
// See LICENSE for copying information.

package managers

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think that manager is a part of user. Some kind of new role. Should it be in users/managers?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mb

Comment thread managers/managers.go
type Manager struct {
UserID uuid.UUID `json:"userId"`
ClubID uuid.UUID `json:"clubId"`
EndedAt time.Time `json:"endedAt"`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not need a manager createdAt field?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mb we need to add season id in which manager started his work

Comment thread database/managers.go
}

defer func() {
err = errs.Combine(err, rows.Close())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrap

Comment thread database/managers.go

allManagers = append(allManagers, manager)
}
if err = rows.Err(); err != nil {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove it and just return return allManagers, ErrManagers.Wrap(rows.Err())

Comment thread managers/chore.go
// architecture: Chore
type Chore struct {
service *Service
Loop *sync.Cycle

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loop

@tarkovskynik tarkovskynik added the invalid This doesn't seem right label Jun 16, 2022
Comment thread clubs/service.go
return userClubs, ErrClubs.Wrap(err)
}

managedClubs, err := service.managers.ListByUserID(ctx, userID)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe one db method needs to be done for this?

@OleksandrBokov1
OleksandrBokov1 changed the base branch from master to develop June 17, 2022 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

invalid This doesn't seem right

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants