| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- namespace App\Module\Fund\Models;
- use App\Models\ModelCore;
- use App\Module\User\Model\User;
- class FundTransferModel extends ModelCore
- {
- protected $table = 'fund_transfer';
- protected $fillable = [
- 'user_id',
- 'from_fund_id',
- 'to_fund_id',
- 'amount',
- 'status',
- 'remark',
- 'create_time',
- 'create_ip',
- 'update_time',
- 'update_ip',
- 'admin_id',
- 'admin_name'
- ];
- public $timestamps = false;
- /**
- * 获取用户信息
- */
- public function user()
- {
- return $this->belongsTo(User::class, 'user_id');
- }
- /**
- * 获取来源资金账户
- */
- public function fromFund()
- {
- return $this->belongsTo('App\Module\Fund\Models\FundModel', 'from_fund_id');
- }
- /**
- * 获取目标资金账户
- */
- public function toFund()
- {
- return $this->belongsTo('App\Module\Fund\Models\FundModel', 'to_fund_id');
- }
- }
|