1
0

Like.php 629 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace App;
  3. use Illuminate\Database\Eloquent\Model;
  4. use Illuminate\Database\Eloquent\SoftDeletes;
  5. class Like extends Model
  6. {
  7. use SoftDeletes;
  8. const MAX_PER_DAY = 1500;
  9. /**
  10. * The attributes that should be mutated to dates.
  11. *
  12. * @var array
  13. */
  14. protected $casts = [
  15. 'deleted_at' => 'datetime'
  16. ];
  17. protected $fillable = ['profile_id', 'status_id', 'status_profile_id'];
  18. public function actor()
  19. {
  20. return $this->belongsTo(Profile::class, 'profile_id', 'id');
  21. }
  22. public function status()
  23. {
  24. return $this->belongsTo(Status::class);
  25. }
  26. }