SsNodeLabel.php 913 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace App\Http\Models;
  3. use Eloquent;
  4. use Illuminate\Database\Eloquent\Builder;
  5. use Illuminate\Database\Eloquent\Model;
  6. /**
  7. * 节点标签
  8. * Class SsNodeLabel
  9. *
  10. * @package App\Http\Models
  11. * @mixin Eloquent
  12. * @property-read Label $labelInfo
  13. * @property int $id
  14. * @property int $node_id 用户ID
  15. * @property int $label_id 标签ID
  16. * @method static Builder|SsNodeLabel newModelQuery()
  17. * @method static Builder|SsNodeLabel newQuery()
  18. * @method static Builder|SsNodeLabel query()
  19. * @method static Builder|SsNodeLabel whereId($value)
  20. * @method static Builder|SsNodeLabel whereLabelId($value)
  21. * @method static Builder|SsNodeLabel whereNodeId($value)
  22. */
  23. class SsNodeLabel extends Model
  24. {
  25. public $timestamps = FALSE;
  26. protected $table = 'ss_node_label';
  27. protected $primaryKey = 'id';
  28. function labelInfo()
  29. {
  30. return $this->hasOne(Label::class, 'id', 'label_id');
  31. }
  32. }