家政小程序
Ви не можете вибрати більше 25 тем Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class Order extends Model
  5. {
  6. public $classify1 = "";
  7. public $classify2 = "";
  8. public $order_type = "";
  9. function __construct($classify1 = "", $classify2 = "", $order_type = "") {
  10. $this->classify1 = $classify1;
  11. $this->classify2 = $classify2;
  12. $this->order_type = $order_type;
  13. }
  14. protected $fillable = [
  15. 'wechat_id', // 微信号id(open_id)
  16. 'address', // 服务地址
  17. 'contact', // 联系人
  18. 'phone', //联系电话
  19. 'status', // 订单状态, 0.待处理 1.待支付 2.已支付
  20. 'price', // 订单价格
  21. 'photo', // 显示的图片
  22. 'comment_id', // 评论id
  23. 'paid_at', // 支付时间
  24. ];
  25. public function setFillable($fillable) {
  26. $this->fillable = $fillable;
  27. }
  28. public function getFillable() {
  29. return $this->fillable;
  30. }
  31. public function mergeFillable($fillable) {
  32. $this->fillable = array_merge($this->fillable, $fillable);
  33. }
  34. }