1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\SoftDeletes;
- use Slowlyo\OwlAdmin\Models\BaseModel as Model;
- class Wallet extends Model
- {
- use SoftDeletes;
- protected $table = 'wallet';
- protected $fillable = [
- 'owner_type',
- ];
-
- public function transRecords()
- {
- return $this->hasMany('App\Models\WalletTransRecord', 'wallet_id', 'id');
- }
-
- public function withdrawRecords()
- {
- return $this->hasMany('App\Models\WalletWithdrawRecord', 'wallet_id', 'id');
- }
-
- public function member()
- {
- return $this->belongsTo('App\Models\MemberUser', 'owner_id');
- }
- }
|