Files
jk8_admin/app/admin/model/MoneyLogHistory.php

34 lines
641 B
PHP

<?php
namespace app\admin\model;
use think\model\relation\HasMany;
use Throwable;
use think\model;
use think\Exception;
use think\model\relation\BelongsTo;
/**
* MoneyLogHistory 模型
*/
class MoneyLogHistory extends model
{
protected $autoWriteTimestamp = true;
protected $updateTime = false;
public static function onBeforeDelete(): bool
{
return false;
}
public function moneyLog(): BelongsTo
{
return $this->belongsTo(UserMoneyLog::class, 'money_log_id');
}
public function admin(): BelongsTo
{
return $this->belongsTo(Admin::class, 'created_by');
}
}