HOME


Mini Shell 1.0
Redirecting to https://devs.lapieza.net/iniciar-sesion Redirecting to https://devs.lapieza.net/iniciar-sesion.
DIR: /var/www/devs.lapieza.net/app/Models/
Upload File :
Current File : /var/www/devs.lapieza.net/app/Models/CombinedOrder.php
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * @Property float $grand_total
 */
class CombinedOrder extends Model {
    protected $fillable = [
        'user_id',
        'shipping_address',
        'grand_total'
    ];
    protected $casts = [
        'shipping_address' => 'json',
        'grand_total' => 'double'
    ];
    public function orders(){
    	return $this->hasMany(Order::class);
    }
    public function user(){
    	return $this->belongsTo(User::class);
    }
    public function conversations(){
        return $this->hasMany(WhatsappOpenedConversation::class, 'combined_order_id');
    }
    public function workshopProposals(){
        return $this->hasMany(WorkShopProposal::class);
    }
}