mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
fix(BE): merge conflict
This commit is contained in:
@@ -17,6 +17,7 @@ type KandangRepository interface {
|
||||
ProjectFlockExists(ctx context.Context, projectFlockID uint) (bool, error)
|
||||
GetFirstByProjectFlockID(ctx context.Context, projectFlockID uint) (*entity.Kandang, error)
|
||||
HasActiveKandangForProjectFlock(ctx context.Context, projectFlockID uint, excludeID *uint) (bool, error)
|
||||
UpdateStatusByProjectFlockID(ctx context.Context, projectFlockID uint, status utils.KandangStatus) error
|
||||
}
|
||||
|
||||
type KandangRepositoryImpl struct {
|
||||
@@ -81,3 +82,10 @@ func (r *KandangRepositoryImpl) GetFirstByProjectFlockID(ctx context.Context, pr
|
||||
}
|
||||
return kandang, nil
|
||||
}
|
||||
|
||||
func (r *KandangRepositoryImpl) UpdateStatusByProjectFlockID(ctx context.Context, projectFlockID uint, status utils.KandangStatus) error {
|
||||
return r.db.WithContext(ctx).
|
||||
Model(&entity.Kandang{}).
|
||||
Where("project_flock_id = ?", projectFlockID).
|
||||
Update("status", string(status)).Error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user