File size: 740 Bytes
5f32fbd | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | <?php
namespace App\Models\Team;
use App\Models\User;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class TeamMember extends Model
{
protected $fillable = [
'team_id',
'user_id',
'role',
'email',
'status',
'allow_unlimited_credits',
'remaining_images',
'remaining_words',
'used_image_credit',
'used_word_credit',
'joined_at',
];
protected $casts = [
'joined_at' => 'datetime',
];
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
public function team(): BelongsTo
{
return $this->belongsTo(Team::class);
}
}
|