ReInquiryCount.php 1.1 KB
<?php
/**
 * Created by PhpStorm.
 * User: zhl
 * Date: 2024/9/30
 * Time: 14:56
 */
namespace App\Models\Inquiry;

use App\Helper\Arr;
use Illuminate\Database\Eloquent\Model;

/**
 * Class ReInquiryCount
 * @package App\Models\Inquiry
 * @author zbj
 * @date 2024/10/25
 */
class ReInquiryCount extends Model
{
    /**
     * @var string
     */
    protected $table = 'gl_re_inquiry_count';

    //`task_id` int(11) NOT NULL DEFAULT '0' COMMENT '转发任务ID',
    //  `company` varchar(255) NOT NULL DEFAULT '',
    //  `domain` varchar(200) NOT NULL DEFAULT '' COMMENT '广告名称',
    //  `num` int(2) NOT NU
    public static function updateCount($task_id, $domain, $num = 0){
       $model = self::where('domain', $domain)->first();
       if(!$model){
           $model = new self();
           $model->domain = $domain;
           $model->company =
       }
       $model->task_id =
    }

    public function setTaskIdsAttribute($value){
        $this->attributes['task_ids'] = Arr::a2s($value);
    }

    public function getTaskIdsAttribute($value){
        return Arr::s2a($value);
    }

}