<?php

namespace App\Modules\User\Models;

use App\Modules\TableSuffix;
use Illuminate\Database\Eloquent\Model;

class ReadLog extends Model
{
    use TableSuffix;

    protected $table = 'record_logs';
    protected $fillable = [
        'distribution_channel_id',
        'bid',
        'cid',
        'uid',
        'send_order_id',
        'from',
        'attach',
        'sequence',
    ];
    protected $connection = 'qapp_log_mysql';

    public static function model(int $uid)
    {
        self::suffix($uid % 1024);
        return new static;
    }
}
