Implement yookassa client

This commit is contained in:
2026-03-19 00:09:25 +03:00
parent 075a53f6ef
commit dd2c360cf6
15 changed files with 411 additions and 114 deletions

View File

@@ -98,8 +98,14 @@ func (d *dbService) CreatePayout(payoutModel *orm.Payout, opts ...Optional) erro
return gorm.G[orm.Payout](d.db).Create(p.ctx, payoutModel)
}
// UpdatePayout implements [Service].
func (d *dbService) UpdatePayout(payoutModel *orm.Payout, opts ...Optional) error {
// p := d.getParams(opts...)
panic("unimplemented")
// UpdatePayoutById implements [Service].
func (d *dbService) UpdatePayoutById(id uint, updateModel orm.Payout, opts ...Optional) (int, error) {
p := d.getParams(opts...)
return gorm.G[orm.Payout](d.db).Where("id = ?", id).Updates(p.ctx, updateModel)
}
// UpdatePayoutByPayoutID implements [Service].
func (d *dbService) UpdatePayoutByPayoutID(payoutId string, updateModel orm.Payout, opts ...Optional) (int, error) {
p := d.getParams(opts...)
return gorm.G[orm.Payout](d.db).Where("payout_id = ?", payoutId).Updates(p.ctx, updateModel)
}