<?php
// 文件名: UnifiedScrmData.php

class UnifiedScrmData
{
    public $todayNewCount = 0;
    public $totalOnline = 0;
    public $totalOffline = 0;
    public $numbers = [];   // 号码列表
    public $total = 0;      // 号码总数

    public function addNumber($number, $isOnline, $newFollowersToday)
    {
        $this->numbers[] = [
            'number' => $number,
            'status' => $isOnline ? 'online' : 'offline',
            'newFollowersToday' => $newFollowersToday
        ];

        if ($isOnline) {
            $this->totalOnline++;
        } else {
            $this->totalOffline++;
        }
    }
}