feat[BE-222]: create migration create template for SO API and kandang id param on product warehouse

This commit is contained in:
aguhh18
2025-11-10 14:49:46 +07:00
parent b2ed58c734
commit fd0943dfaf
12 changed files with 147 additions and 31 deletions
@@ -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)
}