battles/classes/Battles/Models/BankModel.php

22 lines
443 B
PHP

<?php
namespace Battles\Models;
class BankModel extends Model
{
protected static string $tableName = 'bank';
protected static string $primaryKey = 'id';
/**
* @param int $money
* @param int $uid
*/
public function setMoney(int $money, int $uid): void
{
$this->columns = [
self::$primaryKey => $uid,
'money' => $money,
];
$this->updateByPrimaryKey();
}
}