智慧教务系统
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

<?php
declare(strict_types=1);
namespace app\model\school_approval;
use think\Model;
/**
* 审批流配置节点模型
* Class SchoolApprovalConfigNode
* @package app\model\school_approval
*/
class SchoolApprovalConfigNode extends Model
{
/**
* 数据表主键
* @var string
*/
protected $pk = 'id';
/**
* 模型名称
* @var string
*/
protected $name = 'school_approval_config_node';
/**
* 自动写入时间戳
* @var bool
*/
protected $autoWriteTimestamp = true;
/**
* 创建时间字段
* @var string
*/
protected $createTime = 'created_at';
/**
* 更新时间字段
* @var string
*/
protected $updateTime = 'updated_at';
/**
* 审批人类型
*/
const APPROVER_TYPE_USER = 'user'; // 指定用户
const APPROVER_TYPE_ROLE = 'role'; // 指定角色
const APPROVER_TYPE_DEPARTMENT = 'department'; // 指定部门
/**
* 签署类型
*/
const SIGN_TYPE_OR = 'or_sign'; // 或签(一人通过即可)
const SIGN_TYPE_AND = 'and_sign'; // 会签(需全部通过)
/**
* 关联审批流配置
* @return \think\model\relation\BelongsTo
*/
public function config()
{
return $this->belongsTo(SchoolApprovalConfig::class, 'config_id', 'id');
}
}