love_php/app/Models/EarningAccount.php

28 lines
509 B
PHP
Raw Permalink Normal View History

2026-04-02 09:20:51 +08:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class EarningAccount extends Model
{
protected $fillable = [];
protected $guarded = [];
public function user()
{
return $this->belongsTo(User::class, 'user_id', 'id');
}
public function earnings()
{
return $this->hasMany(Earning::class, 'user_id', 'user_id');
}
public function withdraws()
{
return $this->hasMany(EarningWithdraw::class, 'user_id', 'user_id');
}
}