@@ 8-26 (lines=19) @@ | ||
5 | use Illuminate\Database\Eloquent\Model; |
|
6 | use Illuminate\Database\Eloquent\Relations\BelongsTo; |
|
7 | ||
8 | class CampaignClick extends Model |
|
9 | { |
|
10 | protected $guarded = []; |
|
11 | ||
12 | public function campaignSend(): BelongsTo |
|
13 | { |
|
14 | return $this->belongsTo(CampaignSend::class, 'campaign_send_id'); |
|
15 | } |
|
16 | ||
17 | public function link(): BelongsTo |
|
18 | { |
|
19 | return $this->belongsTo(CampaignLink::class, 'campaign_link_id'); |
|
20 | } |
|
21 | ||
22 | public function subscriber(): BelongsTo |
|
23 | { |
|
24 | return $this->belongsTo(Subscriber::class, 'email_list_subscriber_id'); |
|
25 | } |
|
26 | } |
|
27 |
@@ 8-26 (lines=19) @@ | ||
5 | use Illuminate\Database\Eloquent\Model; |
|
6 | use Illuminate\Database\Eloquent\Relations\BelongsTo; |
|
7 | ||
8 | class CampaignOpen extends Model |
|
9 | { |
|
10 | protected $guarded = []; |
|
11 | ||
12 | public function campaignSend(): BelongsTo |
|
13 | { |
|
14 | return $this->belongsTo(CampaignSend::class, 'campaign_send_id'); |
|
15 | } |
|
16 | ||
17 | public function campaign(): BelongsTo |
|
18 | { |
|
19 | return $this->belongsTo(Campaign::class, 'email_campaign_id'); |
|
20 | } |
|
21 | ||
22 | public function subscriber(): BelongsTo |
|
23 | { |
|
24 | return $this->belongsTo(Subscriber::class, 'email_list_subscriber_id'); |
|
25 | } |
|
26 | } |
|
27 |