feat&fix(add Listmonk service and sync part 1, fix association email on member sync)
This commit is contained in:
40
app/Models/ListmonkMember.php
Normal file
40
app/Models/ListmonkMember.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
* @property int $member_id
|
||||
* @property int|null $listmonk_user_id
|
||||
* @property array<array-key, mixed>|null $data
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property-read \App\Models\Member $member
|
||||
*
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class ListmonkMember extends Model
|
||||
{
|
||||
protected $table = 'listmonks_members';
|
||||
|
||||
protected $fillable = [
|
||||
'member_id',
|
||||
'listmonk_user_id',
|
||||
'data',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'data' => 'array',
|
||||
];
|
||||
}
|
||||
|
||||
public function member(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Member::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user