|
|
@@ -22,7 +22,7 @@ class AccountLogModel extends BaseModel
|
|
|
// 设置数据表
|
|
|
protected $table = 'account_logs';
|
|
|
|
|
|
- protected $appends = ['bill','time_text','type_name'];
|
|
|
+ protected $appends = ['bill','real_money','time_text','type_name'];
|
|
|
|
|
|
// 时间
|
|
|
public function getTimeTextAttribute()
|
|
|
@@ -30,6 +30,12 @@ class AccountLogModel extends BaseModel
|
|
|
return $this->create_time? datetime($this->create_time,'Y-m-d H:i:s') : '';
|
|
|
}
|
|
|
|
|
|
+ // 时间
|
|
|
+ public function getRealMoneyAttribute()
|
|
|
+ {
|
|
|
+ return abs($this->money);
|
|
|
+ }
|
|
|
+
|
|
|
// 类型
|
|
|
public function getTypeNameAttribute()
|
|
|
{
|