first commit

This commit is contained in:
2026-04-16 14:16:41 +08:00
commit 5c33491ae2
586 changed files with 58153 additions and 0 deletions

49
app/admin/model/Bank.php Normal file
View File

@@ -0,0 +1,49 @@
<?php
namespace app\admin\model;
use think\Model;
/**
* Bank
*/
class Bank extends Model
{
// 表名
protected $name = 'bank';
// 自动写入时间戳字段
protected $autoWriteTimestamp = true;
protected static function onAfterInsert($model): void
{
if (is_null($model->weigh)) {
$pk = $model->getPk();
if (strlen($model[$pk]) >= 19) {
$model->where($pk, $model[$pk])->update(['weigh' => $model->count()]);
} else {
$model->where($pk, $model[$pk])->update(['weigh' => $model[$pk]]);
}
}
}
public function getTxInAttr($value): ?float
{
return is_null($value) ? null : (float)$value;
}
public function getTxOutAttr($value): ?float
{
return is_null($value) ? null : (float)$value;
}
public function getFundInAttr($value): ?float
{
return is_null($value) ? null : (float)$value;
}
public function getFundOutAttr($value): ?float
{
return is_null($value) ? null : (float)$value;
}
}