You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
921 B
50 lines
921 B
<?php
|
|
|
|
namespace app\admin\model\income;
|
|
|
|
use think\Model;
|
|
|
|
|
|
class Expend extends Model
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
// 表名
|
|
protected $name = 'income_expend';
|
|
|
|
// 自动写入时间戳字段
|
|
protected $autoWriteTimestamp = 'integer';
|
|
|
|
// 定义时间戳字段名
|
|
protected $createTime = 'createtime';
|
|
protected $updateTime = 'updatetime';
|
|
protected $deleteTime = false;
|
|
|
|
// 追加属性
|
|
protected $append = [
|
|
|
|
];
|
|
|
|
public function getStatusList()
|
|
{
|
|
return ['1' => __('待支付'), '0' => __('待确认'),'2' => __('已支付'), '3' => __('已确认')];
|
|
}
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo('\app\admin\model\User', 'payer_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
|
}
|
|
public function user1()
|
|
{
|
|
return $this->belongsTo('\app\admin\model\User', 'payee_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|