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.
66 lines
1.3 KiB
66 lines
1.3 KiB
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace app\model\school_approval;
|
|
|
|
use think\Model;
|
|
|
|
/**
|
|
* 审批参与人模型
|
|
* Class SchoolApprovalParticipants
|
|
* @package app\model\school_approval
|
|
*/
|
|
class SchoolApprovalParticipants extends Model
|
|
{
|
|
/**
|
|
* 数据表主键
|
|
* @var string
|
|
*/
|
|
protected $pk = 'id';
|
|
|
|
/**
|
|
* 模型名称
|
|
* @var string
|
|
*/
|
|
protected $name = 'approval_participants';
|
|
|
|
/**
|
|
* 自动写入时间戳
|
|
* @var bool
|
|
*/
|
|
protected $autoWriteTimestamp = true;
|
|
|
|
/**
|
|
* 创建时间字段
|
|
* @var string
|
|
*/
|
|
protected $createTime = 'created_at';
|
|
|
|
/**
|
|
* 更新时间字段
|
|
* @var string
|
|
*/
|
|
protected $updateTime = 'updated_at';
|
|
|
|
/**
|
|
* 审批状态
|
|
*/
|
|
const STATUS_PENDING = 'pending'; // 待审批
|
|
const STATUS_APPROVED = 'approved'; // 已批准
|
|
const STATUS_REJECTED = 'rejected'; // 已拒绝
|
|
|
|
/**
|
|
* 签署类型
|
|
*/
|
|
const SIGN_TYPE_OR = 'or_sign'; // 或签(一人通过即可)
|
|
const SIGN_TYPE_AND = 'and_sign'; // 会签(需全部通过)
|
|
|
|
/**
|
|
* 关联审批流程
|
|
* @return \think\model\relation\BelongsTo
|
|
*/
|
|
public function process()
|
|
{
|
|
return $this->belongsTo(SchoolApprovalProcess::class, 'process_id', 'id');
|
|
}
|
|
}
|