__('Type pay'), 'groups' => __('Type groups'), 'recharge' => __('Type recharge'), 'withdraw' => __('Type withdraw'), 'refund' => __('Type refund'), 'sys' => __('Type sys')]; } public function getTypeTextAttr($value, $data) { $value = $value ? $value : (isset($data['type']) ? $data['type'] : ''); $list = $this->getTypeList(); return isset($list[$value]) ? $list[$value] : ''; } public function getCreatetimeTextAttr($value, $data) { $value = $value ? $value : (isset($data['createtime']) ? $data['createtime'] : ''); return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value; } public function getUpdatetimeTextAttr($value, $data) { $value = $value ? $value : (isset($data['updatetime']) ? $data['updatetime'] : ''); return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value; } public function user() { return $this->belongsTo('app\index\model\User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0); } }