[wip] code smell, psr-12, mvc, other, forgot by 1 year.
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<?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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user