Files
exchange-2.0/app/Models/UserAffiliate.php
T
Edmond Lang 30ed77f304 Merge branch 'affiliate-program' of https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0 into vapor/production
# Conflicts:
#	resources/assets/vue/components/accounts/forms/RegistrationFormComponent.vue
#	routes/api.php
2026-01-26 00:13:10 +08:00

40 lines
664 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class UserAffiliate extends AbstractModel
{
protected $table = 'user_affiliates';
protected $fillable = [
'user_id',
'affiliate_id',
'clicked_at',
'registered_at'
];
protected $dates = [
'clicked_at',
'registered_at'
];
/**
* @return BelongsTo
*/
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
/**
* @return BelongsTo
*/
public function affiliate(): BelongsTo
{
return $this->belongsTo(Affiliate::class);
}
}