You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
<?php
namespace App\Model\v3;
use App\Model\Model;
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'); }
public function market() { return $this->belongsTo(Market::class, 'market_id', 'id'); }
public function orderMain() { return $this->belongsTo(OrderMain::class, 'order_main_id', 'id'); }
public function user() { return $this->belongsTo(User::class, 'user_id', 'id'); }
public function store() { return $this->belongsTo(Store::class, 'store_id', 'id'); }}
|