mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-23 23:05:44 +00:00
feat[BE-222]: create migration create template for SO API and kandang id param on product warehouse
This commit is contained in:
@@ -12,6 +12,7 @@ type CustomerRepository interface {
|
||||
repository.BaseRepository[entity.Customer]
|
||||
PicExists(ctx context.Context, areaId uint) (bool, error)
|
||||
NameExists(ctx context.Context, name string, excludeID *uint) (bool, error)
|
||||
IdExists(ctx context.Context, id uint) (bool, error)
|
||||
}
|
||||
|
||||
type CustomerRepositoryImpl struct {
|
||||
@@ -33,3 +34,7 @@ func (r *CustomerRepositoryImpl) PicExists(ctx context.Context, picId uint) (boo
|
||||
func (r *CustomerRepositoryImpl) NameExists(ctx context.Context, name string, excludeID *uint) (bool, error) {
|
||||
return repository.ExistsByName[entity.Customer](ctx, r.db, name, excludeID)
|
||||
}
|
||||
|
||||
func (r *CustomerRepositoryImpl) IdExists(ctx context.Context, id uint) (bool, error) {
|
||||
return repository.Exists[entity.Customer](ctx, r.db, id)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user