xiaoai/php_server/app/common/model/human/HumanAnchor.php

47 lines
1.0 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace app\common\model\human;
use app\common\model\BaseModel;
use think\model\concern\SoftDelete;
/**
* HumanAnchor
* @desc 数字人形象
* @author dagouzi
*/
class HumanAnchor extends BaseModel
{
use SoftDelete;
protected $deleteTime = 'delete_time';
public static function getStatus($status)
{
// initialized 初始化sent 发送给算法pending 算法排队; processing 算法开始处理; completed 成功; failed 失败;
$data = [
0 => '初始化',
1 => '成功',
2 => '失败',
3 => '发送给算法',
4 => '算法排队',
5 => '算法开始处理'
];
return $data[$status] ?? '未知';
}
public static function transferStatus($status)
{
$data = [
'initialized' => 0,
'sent' => 3,
'pending' => 4,
'processing' => 5,
'completed' => 1,
'failed' => 2
];
return $data[$status] ?? 2;
}
}