BtEvents.php
683 字节
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
<?php
/**
* Created by PhpStorm.
* User: zhl
* Date: 2022/11/03
* Time: 09:53
*/
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* Class BtEvents
* @package App\Models
*/
class BtEvents extends Model
{
/**
* @var string $table
*/
protected $table = 'bt_events';
const STATUS_INIT = 0;
const STATUS_FINISH = 1;
const STATUS_ERROR = 9;
/**
* @param $type
* @param $param
* @return mixed
*/
public static function createBtEvent($type, $param)
{
$event = new self();
$event->type = $type;
$event->param = $param;
$event->save();
return $event->id;
}
}