Annotation.php 505 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class Annotation extends Model
  5. {
  6. protected $table = 'annotations';
  7. protected $fillable = ['word_id','postag_id','user_id','confidence_score'];
  8. public function postag()
  9. {
  10. return $this->belongsTo('App\Models\Postag');
  11. }
  12. public function user()
  13. {
  14. return $this->belongsTo('App\Models\User');
  15. }
  16. public function word()
  17. {
  18. return $this->belongsTo('App\Models\Word');
  19. }
  20. }