1234567891011121314151617181920212223242526272829 |
- <?php
- /**
- * Created by PhpStorm.
- * User: qisse
- * Date: 2017/6/27
- * Time: 20:02
- */
- namespace app\core\model;
- use think\Model;
- use tool\Common;
- class Fang extends Model
- {
- protected $pk = 'fangID';
- protected $resultSetType = 'collection';
- protected $updateTime = 'updateTime';
- protected $createTime = 'addTime';
- protected $autoWriteTimestamp = true;
- public function setMoneyAttr($value) {
- return $value * 100;
- }
- public function getMoneyAttr($value) {
- return Common::price2($value / 100);
- }
- }
|