initial: bootstrap from BukidBountyApp base
This commit is contained in:
49
app/Models/Market/PosTransaction.php
Normal file
49
app/Models/Market/PosTransaction.php
Normal file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Models\Market;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class PosTransaction extends Model
|
||||
{
|
||||
protected ?string $table = 'pos_transactions';
|
||||
|
||||
protected array $fillable = [
|
||||
'pos_session_id',
|
||||
'product_id',
|
||||
'quantity',
|
||||
'price_at_sale',
|
||||
'discount',
|
||||
'total_price',
|
||||
'is_void',
|
||||
'remarks',
|
||||
'hashkey',
|
||||
'created_by',
|
||||
'updated_by',
|
||||
];
|
||||
|
||||
protected array $casts = [
|
||||
'is_void' => 'boolean',
|
||||
'quantity' => 'integer',
|
||||
'price_at_sale' => 'integer',
|
||||
'discount' => 'integer',
|
||||
'total_price' => 'integer',
|
||||
'created_by' => 'integer',
|
||||
'updated_by' => 'integer',
|
||||
];
|
||||
|
||||
/**
|
||||
* Relationships
|
||||
*/
|
||||
public function session()
|
||||
{
|
||||
return $this->belongsTo(PosSession::class, 'pos_session_id');
|
||||
}
|
||||
|
||||
public function product()
|
||||
{
|
||||
return $this->belongsTo(Product::class, 'product_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user