NodeLabel.php 449 B

12345678910111213141516171819202122232425
  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. {
  10. public $timestamps = false;
  11. protected $table = 'node_label';
  12. public function node(): BelongsTo
  13. {
  14. return $this->belongsTo(Node::class);
  15. }
  16. public function label(): BelongsTo
  17. {
  18. return $this->belongsTo(Label::class);
  19. }
  20. }