<?php
namespace app\common\model\master_worker;

use app\common\model\BaseModel;
use app\common\model\MasterWorkerRegister;
use think\model\concern\SoftDelete;

/**
 * 工程师账户流水记录模型
 * Class MasterWorker
 * @package app\common\model
 */
class MasterWorkerAccountLog extends BaseModel
{
    protected $name = 'master_worker_account_log';
    use SoftDelete;

    protected $deleteTime = 'delete_time';
    public function getActionTextAttr($value,$data)
    {
        $status = [1=>'+',2=>'-'];
        return $status[$data['action']];
    }
    public function masterWorker()
    {
        return $this->hasOne(MasterWorker::class, 'id', 'worker_id');
    }
}