123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
-
- namespace App\Models;
-
- use Illuminate\Database\Eloquent\Model;
-
- class Order extends Model
- {
- public $order_type = "";
-
- function __construct($order_type = "") {
- $this->order_type = $order_type;
- }
-
- protected $fillable = [
- 'wechat_id', // 微信号id(open_id)
- 'address', // 服务地址
- 'contact', // 联系人
- 'phone', //联系电话
- 'status', // 订单状态, 0.待处理 1.待支付 2.已支付
- 'price', // 订单价格
- 'photo', // 显示的图片
- 'comment_id', // 评论id
- 'comment', // 评论
- 'paid_at', // 支付时间,
- 'classify', //订单类型,分类
- 'classify1', //分类1
- 'classify2', //分类2
- ];
-
- public function setFillable($fillable) {
- $this->fillable = $fillable;
- }
-
- public function getFillable() {
- return $this->fillable;
- }
-
- public function mergeFillable($fillable) {
- $this->fillable = array_merge($this->fillable, $fillable);
- }
- }
|