12345678910111213141516171819202122 |
- <?php
- namespace app\model;
- use support\Model;
- class FarmLand extends Model
- {
- protected $table = 'farm_land';
- protected $primaryKey = 'land_id';
- protected $dateFormat = 'U';
- public const CREATED_AT = 'land_add_time';
- public const UPDATED_AT = 'land_update_time';
- public function getLandAddTimeAttribute($value){
- return date('Y-m-d H:i:s',strtotime($value));
- }
- }
|