|
|
|
@ -8,6 +8,15 @@ class Order extends Model |
|
|
|
{ |
|
|
|
protected $table = 'lanzu_order'; |
|
|
|
|
|
|
|
protected $appends = [ |
|
|
|
'created_at_text', |
|
|
|
]; |
|
|
|
|
|
|
|
public function getCreatedAtTextAttribute() |
|
|
|
{ |
|
|
|
return date('Y-m-d H:i:s', $this->attributes['created_at']); |
|
|
|
} |
|
|
|
|
|
|
|
public function orderGoods() |
|
|
|
{ |
|
|
|
return $this->hasMany(OrderGoods::class, 'order_id', 'id'); |
|
|
|
|