10.April 2026
This commit is contained in:
parent
a00c42e770
commit
f58c709945
208 changed files with 19280 additions and 2914 deletions
56
app/Models/IncentiveNewAbo.php
Normal file
56
app/Models/IncentiveNewAbo.php
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class IncentiveNewAbo
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $participant_id
|
||||
* @property int $user_abo_id
|
||||
* @property Carbon $activated_at
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property-read IncentiveParticipant $participant
|
||||
* @property-read UserAbo $userAbo
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, IncentivePointsLog> $pointsLogs
|
||||
*
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class IncentiveNewAbo extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'incentive_new_abos';
|
||||
|
||||
protected $casts = [
|
||||
'participant_id' => 'int',
|
||||
'user_abo_id' => 'int',
|
||||
'activated_at' => 'datetime',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'participant_id',
|
||||
'user_abo_id',
|
||||
'activated_at',
|
||||
];
|
||||
|
||||
public function participant()
|
||||
{
|
||||
return $this->belongsTo(IncentiveParticipant::class, 'participant_id');
|
||||
}
|
||||
|
||||
public function userAbo()
|
||||
{
|
||||
return $this->belongsTo(UserAbo::class, 'user_abo_id');
|
||||
}
|
||||
|
||||
public function pointsLogs()
|
||||
{
|
||||
return $this->hasMany(IncentivePointsLog::class, 'incentive_new_abo_id');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue