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