UserTrafficDaily.php 1.7 KB

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