Collaboration.php
3 weeks ago
CollaborationComment.php
3 weeks ago
CollaborationCommentSeen.php
3 weeks ago
CollaborationConnected.php
3 weeks ago
CollaborationSent.php
3 weeks ago
Collection.php
3 weeks ago
CollectionItem.php
3 weeks ago
Media.php
3 weeks ago
Page.php
3 weeks ago
Post.php
3 weeks ago
PostMeta.php
3 days ago
Reference.php
3 weeks ago
Term.php
3 weeks ago
TermMeta.php
3 weeks ago
TermTaxonomy.php
3 weeks ago
User.php
3 weeks ago
UserMeta.php
3 weeks ago
CollaborationCommentSeen.php
34 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Kirki\App\Models; |
| 4 | |
| 5 | defined('ABSPATH') || exit; |
| 6 | |
| 7 | use Kirki\Framework\Database\Query\Model; |
| 8 | |
| 9 | /** |
| 10 | * Tracks which users have seen/read a given collaboration comment, |
| 11 | * stored in the `kirki_comments_seen` table. |
| 12 | */ |
| 13 | class CollaborationCommentSeen extends Model |
| 14 | { |
| 15 | protected $table = 'kirki_comments_seen'; |
| 16 | protected $primary_key = 'id'; |
| 17 | protected $timestamps = false; |
| 18 | |
| 19 | protected $fillable = [ |
| 20 | 'comment_id', |
| 21 | 'user_id', |
| 22 | ]; |
| 23 | |
| 24 | protected $casts = [ |
| 25 | 'comment_id' => 'integer', |
| 26 | 'user_id' => 'integer', |
| 27 | ]; |
| 28 | |
| 29 | public function comment() |
| 30 | { |
| 31 | return $this->belongs_to(CollaborationComment::class, 'comment_id', 'id'); |
| 32 | } |
| 33 | } |
| 34 |