GroupSendTaskLog.php 1.4 KB
<?php

namespace App\Models\Subscribe;

use App\Models\Base;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
 * Class GroupSendTaskLog
 * @package App\Models\Subscribe
 * @author zbj
 * @date 2024/8/27
 */
class GroupSendTaskLog extends Base
{
    use SoftDeletes;

    //设置关联表名
    /**
     * @var mixed
     */
    protected $table = 'gl_email_group_send_task_log';


    //`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
    //  `task_id` int(11) unsigned NOT NULL DEFAULT '0',
    //  `project_id` int(11) unsigned NOT NULL DEFAULT '0',
    //  `from` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
    //  `to` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
    //  `status` tinyint(1) unsigned NOT NULL DEFAULT '0',
    //  `manage_id` int(11) unsigned NOT NULL DEFAULT '0',
    //  `created_at` datetime NOT NULL,
    //  `updated_at` datetime NOT NULL,
    //  `deleted_at` datetime DEFAULT NULL,
    //  `remark` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',

    public static function addLog($task_id, $project_id, $from, $to, $status = 1, $remark = '')
    {
        $model = new self();
        $model->task_id = $task_id;
        $model->project_id = $project_id;
        $model->from = $from;
        $model->to = $to;
        $model->status = $status;
        $model->remark = $remark;
        $model->save();
    }
}