43 lines
690 B
PHP
43 lines
690 B
PHP
<?php
|
|
/**
|
|
* Created by PhpStorm.
|
|
* User: yancheng<cheng@love.xiaoyan.me>
|
|
* Date: 2019/6/19
|
|
* Time: 9:41 PM
|
|
*/
|
|
|
|
namespace app\util;
|
|
|
|
|
|
class DataStatus
|
|
{
|
|
const Normal = 1;
|
|
const Delete = -1;
|
|
const Disabled = 2;
|
|
/**
|
|
* @var string 字段名称
|
|
*/
|
|
const FieldKey = 'status';
|
|
|
|
/**
|
|
* 正常状态条件
|
|
* @return array
|
|
*/
|
|
public static function NormalCondition()
|
|
{
|
|
return [
|
|
self::FieldKey => self::Normal
|
|
];
|
|
}
|
|
|
|
/**
|
|
* 删除状态条件
|
|
* @return array
|
|
*/
|
|
public static function DeleteCondition()
|
|
{
|
|
return [
|
|
self::FieldKey => self::Delete
|
|
];
|
|
}
|
|
} |