修改音视频毁掉路由

This commit is contained in:
2024-03-11 13:49:24 +08:00
parent 70b0e780c4
commit f56c2292a5
5 changed files with 483 additions and 9 deletions
+86
View File
@@ -0,0 +1,86 @@
<?php
declare(strict_types=1);
namespace App\Model;
use Carbon\Carbon;
use Hyperf\Snowflake\Concern\Snowflake;
/**
* @property int $records_id 主键id
* @property int $order_inquiry_id 问诊订单id
* @property string $room_id 房间id
* @property int $video_status 视频状态(1:已发起 2:患者进入房间 3:开始通话 4:结束)
* @property string $start_video_time 开始视频时间
* @property string $stop_video_time 结束视频时间
* @property Carbon $created_at 创建时间
* @property Carbon $updated_at 修改时间
*/
class OrderInquiryVideoRecord extends Model
{
use Snowflake;
/**
* The table associated with the model.
*/
protected ?string $table = 'order_inquiry_video_records';
/**
* The attributes that are mass assignable.
*/
protected array $fillable = ['records_id', 'order_inquiry_id', 'room_id', 'video_status', 'start_video_time', 'stop_video_time', 'created_at', 'updated_at'];
protected string $primaryKey = "records_id";
/**
* 获取信息-单条
* @param array $params
* @param array $fields
* @return object|null
*/
public static function getOne(array $params, array $fields = ['*']): object|null
{
return self::where($params)->first($fields);
}
/**
* 获取信息-多条
* @param array $params
* @param array $fields
* @return object|null
*/
public static function getList(array $params, array $fields = ['*']): object|null
{
return self::where($params)->get($fields);
}
/**
* 新增-批量
* @param array $data 新增数据
* @return \Hyperf\Database\Model\Model|VideoRecord
*/
public static function addVideoRecord(array $data): \Hyperf\Database\Model\Model|VideoRecord
{
return self::create($data);
}
public static function edit(array $params = [], array $data = []): int
{
return self::where($params)->update($data);
}
/**
* 获取信息-最后一条
* @param array $params
* @param array $fields
* @return object|null
*/
public static function getLastOne(array $params, array $fields = ['*']): object|null
{
return self::where($params)->latest()->first($fields);
}
}
@@ -0,0 +1,89 @@
<?php
declare(strict_types=1);
namespace App\Model;
use Carbon\Carbon;
use Hyperf\Snowflake\Concern\Snowflake;
/**
* @property int $reservation_id 主键id
* @property int $patient_id 患者id
* @property int $patient_user_id 患者用户id
* @property int $doctor_id 医生id
* @property int $doctor_user_id 医生用户id
* @property int $order_inquiry_id 问诊订单id
* @property string $room_id 房间号
* @property string $reservation_time 预约时间
* @property int $is_send_reservation_notice 是否已发送预约通知(0:否 1:是)
* @property int $update_number 修改次数
* @property Carbon $created_at 创建时间
* @property Carbon $updated_at 修改时间
*/
class OrderInquiryVideoReservation extends Model
{
use Snowflake;
/**
* The table associated with the model.
*/
protected ?string $table = 'order_inquiry_video_reservation';
/**
* The attributes that are mass assignable.
*/
protected array $fillable = ['reservation_id', 'patient_id', 'patient_user_id', 'doctor_id', 'doctor_user_id', 'order_inquiry_id', 'room_id', 'reservation_time', 'is_send_reservation_notice', 'update_number', 'created_at', 'updated_at'];
protected string $primaryKey = "reservation_id";
/**
* 获取信息-单条
* @param array $params
* @param array $fields
* @return object|null
*/
public static function getOne(array $params, array $fields = ['*']): object|null
{
return self::where($params)->first($fields);
}
/**
* 获取信息-多条
* @param array $params
* @param array $fields
* @return object|null
*/
public static function getList(array $params, array $fields = ['*']): object|null
{
return self::where($params)->get($fields);
}
/**
* 新增-批量
* @param array $data 新增数据
* @return \Hyperf\Database\Model\Model|VideoReservation
*/
public static function addVideoReservation(array $data): \Hyperf\Database\Model\Model|VideoReservation
{
return self::create($data);
}
public static function edit(array $params = [], array $data = []): int
{
return self::where($params)->update($data);
}
/**
* 获取信息-最后一条
* @param array $params
* @param array $fields
* @return object|null
*/
public static function getLastOne(array $params, array $fields = ['*']): object|null
{
return self::where($params)->latest()->first($fields);
}
}