SsNodeIp.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Builder;
  4. use Illuminate\Database\Eloquent\Model;
  5. /**
  6. * SS节点在线IP信息
  7. *
  8. * @property int $id
  9. * @property int $node_id 节点ID
  10. * @property int $user_id 用户ID
  11. * @property int $port 端口
  12. * @property string $type 类型:all、tcp、udp
  13. * @property string|null $ip 连接IP:每个IP用,号隔开
  14. * @property \Illuminate\Support\Carbon $created_at 上报时间
  15. * @property-read \App\Models\SsNode $node
  16. * @property-read \App\Models\User $user
  17. * @method static Builder|SsNodeIp newModelQuery()
  18. * @method static Builder|SsNodeIp newQuery()
  19. * @method static Builder|SsNodeIp query()
  20. * @method static Builder|SsNodeIp whereCreatedAt($value)
  21. * @method static Builder|SsNodeIp whereId($value)
  22. * @method static Builder|SsNodeIp whereIp($value)
  23. * @method static Builder|SsNodeIp whereNodeId($value)
  24. * @method static Builder|SsNodeIp wherePort($value)
  25. * @method static Builder|SsNodeIp whereType($value)
  26. * @method static Builder|SsNodeIp whereUserId($value)
  27. * @mixin \Eloquent
  28. */
  29. class SsNodeIp extends Model {
  30. protected $table = 'ss_node_ip';
  31. protected $primaryKey = 'id';
  32. function node() {
  33. return $this->belongsTo(SsNode::class, 'node_id', 'id');
  34. }
  35. function user() {
  36. return $this->belongsTo(User::class, 'port', 'port');
  37. }
  38. }