LifeFarmLandOrderDetail.php 700 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace app\admin\model;
  3. use support\Model;
  4. class LifeFarmLandOrderDetail extends Model
  5. {
  6. const UPDATED_AT = 'detail_update_time';
  7. /**
  8. * 权益包
  9. * The table associated with the model.
  10. *
  11. * @var string
  12. */
  13. protected $table = 'life_farm_land_order_detail';
  14. /**
  15. * The primary key associated with the table.
  16. *
  17. * @var string
  18. */
  19. protected $primaryKey = 'detail_id';
  20. /**
  21. * Indicates if the model should be timestamped.
  22. *
  23. * @var bool
  24. */
  25. protected $dateFormat = 'U';
  26. //时间格式
  27. public function getDetailCreateTimeAttribute($value)
  28. {
  29. return date('Y-m-d H:i:s', $value);
  30. }
  31. }