You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nt_backend/application/common/model/ProjectOrderFlow.php

29 lines
669 B

1 year ago
<?php
namespace app\common\model;
use think\Model;
class ProjectOrderFlow extends Model
{
// 表名
protected $name = 'project_order_flow';
// 开启自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
protected $resultSetType = 'collection';
public static function add($data) {
return self::create($data);
}
public static function getStatus($order_id, $flow_id) {
//获取流程状态
$status = self::where('order_id', $order_id)
->where('flow_id', $flow_id)
->order('create_time', 'DESC')
->value('status');
return $status ? $status : 0;
}
}