<?php


namespace App\Models;


use Illuminate\Database\Eloquent\Model;

class GroupControlRecord extends Model
{
    const TABLE = 'agent.dbo.group_control_record';
    protected $table = self::TABLE;

    public $timestamps = false;


    protected $guarded = [];


    public static function add_record($server_id, $stock, $admin_id)
    {
        $data = [
            'server_id' => $server_id,
            'stock' => $stock,
            'admin_id' => $admin_id,
            'created_at' => date('Y-m-d H:i:s')
        ];
        self::create($data);
    }
}
