SsNodeTrafficDaily.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. namespace App\Http\Models;
  3. use Eloquent;
  4. use Illuminate\Database\Eloquent\Builder;
  5. use Illuminate\Database\Eloquent\Model;
  6. use Illuminate\Support\Carbon;
  7. /**
  8. * 节点每日流量统计
  9. *
  10. * @property int $id
  11. * @property int $node_id 节点ID
  12. * @property int $u 上传流量
  13. * @property int $d 下载流量
  14. * @property int $total 总流量
  15. * @property string|null $traffic 总流量(带单位)
  16. * @property Carbon|null $created_at 创建时间
  17. * @property Carbon|null $updated_at 最后更新时间
  18. * @property-read SsNode|null $info
  19. * @method static Builder|SsNodeTrafficDaily newModelQuery()
  20. * @method static Builder|SsNodeTrafficDaily newQuery()
  21. * @method static Builder|SsNodeTrafficDaily query()
  22. * @method static Builder|SsNodeTrafficDaily whereCreatedAt($value)
  23. * @method static Builder|SsNodeTrafficDaily whereD($value)
  24. * @method static Builder|SsNodeTrafficDaily whereId($value)
  25. * @method static Builder|SsNodeTrafficDaily whereNodeId($value)
  26. * @method static Builder|SsNodeTrafficDaily whereTotal($value)
  27. * @method static Builder|SsNodeTrafficDaily whereTraffic($value)
  28. * @method static Builder|SsNodeTrafficDaily whereU($value)
  29. * @method static Builder|SsNodeTrafficDaily whereUpdatedAt($value)
  30. * @mixin Eloquent
  31. */
  32. class SsNodeTrafficDaily extends Model {
  33. protected $table = 'ss_node_traffic_daily';
  34. protected $primaryKey = 'id';
  35. function info() {
  36. return $this->hasOne(SsNode::class, 'id', 'node_id');
  37. }
  38. }