add:新增用户token字段

This commit is contained in:
JaguarJack
2020-11-23 19:57:49 +08:00
parent 85f4fc0df8
commit 5f49a22a5e
4 changed files with 70 additions and 3 deletions

View File

@@ -33,4 +33,16 @@ abstract class CatchModel extends \think\Model
public const ENABLE = 1;
// 禁用
public const DISABLE = 2;
/**
* 是否有 field
*
* @time 2020年11月23日
* @param string $field
* @return bool
*/
public function hasField(string $field)
{
return property_exists($this, 'field') ? in_array($field, $this->field) : false;
}
}