mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 12:33:56 +00:00
30ed77f304
# Conflicts: # resources/assets/vue/components/accounts/forms/RegistrationFormComponent.vue # routes/api.php
40 lines
664 B
PHP
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);
|
|
}
|
|
}
|
|
|