12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
- namespace App\Model;
- use Illuminate\Database\Eloquent\Model;
- /**
- * 交车单
- * Class Unit
- * @package App\Models
- */
- class DeliveryNote extends Model
- {
- protected $table = "delivery_note"; //指定表
- const CREATED_AT = 'crt_time';
- const UPDATED_AT = 'upd_time';
- protected $dateFormat = 'U';
- public function setBreakAttribute($value)
- {
- $this->attributes['break'] = json_encode($value);
- }
- public function getBreakAttribute($value)
- {
- return json_decode($value, true);
- }
- public function setBreakMarkAttribute($value)
- {
- $this->attributes['break_mark'] = json_encode($value);
- }
- public function getBreakMarkAttribute($value)
- {
- return json_decode($value, true);
- }
- public function setProjectIdAttribute($value)
- {
- $this->attributes['project_id'] = json_encode($value);
- }
- public function getProjectIdAttribute($value)
- {
- return json_decode($value, true);
- }
- }
|