12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- declare(strict_types=1);
- namespace App\Model\Arts;
- use App\Master\Enum\RedisKeyEnum;
- use App\Master\Framework\Library\Tencent\TencentIm;
- use App\Model\Model;
- use App\Utils\RedisUtil;
- use Hyperf\DbConnection\Db;
- class LiveReportModel extends Model
- {
- /**
- * The table associated with the model.
- *
- * @var ?string
- */
- protected ?string $table = 'live_report';
- protected ?string $dateFormat = 'U';
- public bool $timestamps = false;
- protected int $is_status_search = 1;// 是否使用 1=是 0=否 默认使用 status = 1 筛选
- protected int $is_delete_search = 0;// 是否使用 1=是 0=否 默认使用 is_delete = 0 筛选
- /**
- * 默认查询字段
- *
- * @var array|string[]
- */
- public array $select = [
- '*'
- ];
- public function add(int $user_id,array $data)
- {
- $data['user_id'] = $user_id;
- $data['create_time'] = time();
- return $this->query()->insert($data);
- }
- }
|