123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
- // +----------------------------------------------------------------------
- // | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
- // +----------------------------------------------------------------------
- // | Copyright (c) 2013-2019 http://www.thinkcmf.com All rights reserved.
- // +----------------------------------------------------------------------
- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
- // +----------------------------------------------------------------------
- // | Author: 老猫 <thinkcmf@126.com>
- // +----------------------------------------------------------------------
- namespace app\activity\model;
- use think\Model;
- use think\model\concern\SoftDelete;
- class ActivityModel extends Model
- {
- use SoftDelete;
- protected $type = ['options' => 'array'];
- /**
- * 状态名
- */
- public function getStatusTextAttr($value, $data)
- {
- $status = ['待审核', '通过', '不通过'];
- return $status[$data['status'] - 1];
- }
- public function setStartTimeAttr($value)
- {
- return strtotime($value);
- }
- public function setEndTimeAttr($value)
- {
- return strtotime($value);
- }
- }
|