mirror of
https://github.com/serty2005/rmser.git
synced 2026-02-05 03:12:34 -06:00
редактирование и удаление сопоставлений
список накладных с позициями
This commit is contained in:
@@ -51,6 +51,15 @@ func (r *pgRepository) GetRankedByUsage(serverID uuid.UUID, daysLookBack int) ([
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (r *pgRepository) GetByID(id uuid.UUID) (*suppliers.Supplier, error) {
|
||||
var supplier suppliers.Supplier
|
||||
err := r.db.Where("id = ? AND is_deleted = ?", id, false).First(&supplier).Error
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &supplier, nil
|
||||
}
|
||||
|
||||
func (r *pgRepository) Count(serverID uuid.UUID) (int64, error) {
|
||||
var count int64
|
||||
err := r.db.Model(&suppliers.Supplier{}).
|
||||
|
||||
Reference in New Issue
Block a user