NodeLabel.php 410 B

12345678910111213141516171819202122
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. use Illuminate\Database\Eloquent\Relations\BelongsTo;
  5. /**
  6. * 节点标签
  7. */
  8. class NodeLabel extends Model {
  9. public $timestamps = false;
  10. protected $table = 'node_label';
  11. public function node(): BelongsTo {
  12. return $this->belongsTo(Node::class);
  13. }
  14. public function label(): BelongsTo {
  15. return $this->belongsTo(Label::class);
  16. }
  17. }