DeliveryNote.php 638 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace App\Model;
  3. use Illuminate\Database\Eloquent\Model;
  4. /**
  5. * 交车单
  6. * Class Unit
  7. * @package App\Models
  8. */
  9. class DeliveryNote extends Model
  10. {
  11. protected $table = "delivery_note"; //指定表
  12. const CREATED_AT = 'crt_time';
  13. const UPDATED_AT = 'upd_time';
  14. protected $dateFormat = 'U';
  15. public function getBreakAttribute($value)
  16. {
  17. return json_decode($value, true);
  18. }
  19. public function getBreakMarkAttribute($value)
  20. {
  21. return json_decode($value, true);
  22. }
  23. public function getProjectIdAttribute($value)
  24. {
  25. return json_decode($value, true);
  26. }
  27. }