Update QR token generation

This commit is contained in:
2026-05-10 14:52:02 +07:00
parent 1834dd0b19
commit 6064ef8fde
3 changed files with 18 additions and 0 deletions
+7
View File
@@ -171,6 +171,13 @@ func (r *TableRepository) ReleaseTable(ctx context.Context, tableID uuid.UUID, p
}).Error
}
func (r *TableRepository) UpdateToken(ctx context.Context, tableID uuid.UUID, token string) error {
return r.db.WithContext(ctx).
Model(&entities.Table{}).
Where("id = ?", tableID).
Update("token", token).Error
}
func (r *TableRepository) GetByOrderID(ctx context.Context, orderID uuid.UUID) (*entities.Table, error) {
var table entities.Table
err := r.db.WithContext(ctx).