initial: bootstrap from BukidBountyApp base

This commit is contained in:
Jonathan Sykes
2026-06-06 18:43:00 +08:00
commit eb4a5731fb
5674 changed files with 160857 additions and 0 deletions

View File

@@ -0,0 +1,84 @@
<?php
declare(strict_types=1);
namespace App\Models\Market;
use App\Models\Model;
use App\Models\User;
class ProductTransactionSession extends Model
{
protected ?string $table = 'prd_trx_ses';
/**
* The primary key for the model.
*/
protected $primaryKey = 'id';
/**
* Indicates if the IDs are auto-incrementing.
*/
public $incrementing = true;
/**
* The "type" of the primary key.
*/
protected $keyType = 'int';
/**
* The attributes that are mass assignable.
*/
protected array $fillable = [
'hashkey',
'name',
'description',
'logs',
'remarks',
'created_by',
'updated_by',
'created_for',
'subtype',
'additionaldata',
'category',
'store_id',
'status',
'is_void',
'last_total_price',
'last_total_discount',
'notes',
];
protected array $casts = [
'is_void' => 'boolean',
];
/**
* Relationships.
*/
public function transactions()
{
return $this->hasMany(ProductTransaction::class, 'transactionsessionhash', 'hashkey');
}
public function store()
{
return $this->belongsTo(Store::class, 'store_id');
}
public function creator()
{
return $this->belongsTo(User::class, 'created_by');
}
public function updater()
{
return $this->belongsTo(User::class, 'updated_by');
}
public function createdFor()
{
return $this->belongsTo(User::class, 'created_for');
}
}