NodeAuth.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Builder;
  4. use Illuminate\Database\Eloquent\Model;
  5. /**
  6. * App\Models\NodeAuth
  7. *
  8. * @property int $id
  9. * @property int $node_id 授权节点ID
  10. * @property string|null $key 认证KEY
  11. * @property string|null $secret 通信密钥
  12. * @property \Illuminate\Support\Carbon|null $created_at 创建时间
  13. * @property \Illuminate\Support\Carbon|null $updated_at 最后更新时间
  14. * @property-read \App\Models\SsNode|null $node
  15. * @method static Builder|NodeAuth newModelQuery()
  16. * @method static Builder|NodeAuth newQuery()
  17. * @method static Builder|NodeAuth query()
  18. * @method static Builder|NodeAuth whereCreatedAt($value)
  19. * @method static Builder|NodeAuth whereId($value)
  20. * @method static Builder|NodeAuth whereKey($value)
  21. * @method static Builder|NodeAuth whereNodeId($value)
  22. * @method static Builder|NodeAuth whereSecret($value)
  23. * @method static Builder|NodeAuth whereUpdatedAt($value)
  24. * @mixin \Eloquent
  25. */
  26. class NodeAuth extends Model {
  27. protected $table = 'node_auth';
  28. protected $primaryKey = 'id';
  29. function node() {
  30. return $this->hasOne(SsNode::class, 'id', 'node_id');
  31. }
  32. }