GroupSendTaskLog.php
1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?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();
}
}