Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 1
Keyword
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 2
6
0.00% covered (danger)
0.00%
0 / 1
 feed
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 platformChannel
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace App\Models;
4
5use Illuminate\Database\Eloquent\Model;
6use Illuminate\Database\Eloquent\Relations\BelongsTo;
7use Illuminate\Support\Carbon;
8
9/**
10 * @property int $id
11 * @property int $feed_id
12 * @property Feed $feed
13 * @property int $platform_channel_id
14 * @property PlatformChannel $platformChannel
15 * @property string $keyword
16 * @property bool $is_active
17 * @property Carbon $created_at
18 * @property Carbon $updated_at
19 */
20class Keyword extends Model
21{
22    protected $fillable = [
23        'feed_id',
24        'platform_channel_id',
25        'keyword',
26        'is_active'
27    ];
28
29    protected $casts = [
30        'is_active' => 'boolean'
31    ];
32
33    /**
34     * @return BelongsTo<Feed, $this>
35     */
36    public function feed(): BelongsTo
37    {
38        return $this->belongsTo(Feed::class);
39    }
40
41    /**
42     * @return BelongsTo<PlatformChannel, $this>
43     */
44    public function platformChannel(): BelongsTo
45    {
46        return $this->belongsTo(PlatformChannel::class);
47    }
48
49}