'integer', 'payment_cycle_days' => 'integer', 'total_purchase_amount' => 'decimal:2', 'status' => 'integer', 'last_login_at' => 'datetime:Y-m-d H:i:s', 'created_at' => 'datetime:Y-m-d H:i:s', ]; /** * 所属客户等级(决定商品展示价格) */ public function level(): BelongsTo { return $this->belongsTo(CustomerLevelModel::class, 'level_id', 'id'); } /** * 门店订单 */ public function orders(): HasMany { return $this->hasMany(StoreOrderModel::class, 'store_id', 'id'); } /** * 门店账单(采购单完成后按门店生成) */ public function bills(): HasMany { return $this->hasMany(BillModel::class, 'store_id', 'id'); } /** * 门店购物车 */ public function carts(): HasMany { return $this->hasMany(CartModel::class, 'store_id', 'id'); } /** * 门店通知 */ public function notices(): HasMany { return $this->hasMany(NoticeModel::class, 'store_id', 'id'); } }