123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- namespace App\Models;
- use App\Models\BaseModel;
- /**
- * @description 提现列表
- * @author system;
- * @version 1.0
- * @date 2017-06-30 18:18:37
- *
- */
- class UserCashOutModel extends BaseModel
- {
- /**
- * 数据表名
- *
- * @var string
- *
- */
- protected $table = 'user_cash_out';
- /**
- 主键
- */
- protected $primaryKey = 'id';
- //分页
- protected $perPage = PAGE_NUMS;
- /**
- * 可以被集体附值的表的字段
- *
- * @var string
- */
- protected $fillable = [
- 'user_id',
- 'bank_id',
- 'status',
- 'cash',
- 'comments'
- ];
- public function user() //方法名加_id作为连接的外键名
- {
- return $this->belongsTo('App\Models\UserInfoModel');
- }
- public function bank()
- {
- return $this->belongsTo('App\Models\UserBanksModel');
- }
- }
|