Added prune logic for transaction models
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Gemini PR Review / Gemini PR Review (pull_request) Has been cancelled
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Has been cancelled
Laravel Larastan / larastan (pull_request) Has been cancelled
Laravel Pint / pint (pull_request) Has been cancelled
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Gemini PR Review / Gemini PR Review (pull_request) Has been cancelled
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Has been cancelled
Laravel Larastan / larastan (pull_request) Has been cancelled
Laravel Pint / pint (pull_request) Has been cancelled
This commit is contained in:
@@ -2,45 +2,53 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Prunable;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class InvoiceInTransit extends Model
|
||||
{
|
||||
use Prunable;
|
||||
use SoftDeletes;
|
||||
|
||||
protected $fillable = [
|
||||
"plant_id",
|
||||
"receiving_plant",
|
||||
"receiving_plant_name",
|
||||
"invoice_number",
|
||||
"invoice_date",
|
||||
"item_code",
|
||||
"description",
|
||||
"quantity",
|
||||
"transport_name",
|
||||
"lr_bl_aw_number",
|
||||
"lr_bl_aw_date",
|
||||
"pending_days",
|
||||
"obd_number",
|
||||
"obd_date",
|
||||
"shipment_weight",
|
||||
"unit_price",
|
||||
"net_value",
|
||||
"total_item_amount",
|
||||
"tax_amount",
|
||||
"transport_mode",
|
||||
"vehicle_number",
|
||||
"e_waybill_number",
|
||||
"created_at",
|
||||
"created_by",
|
||||
"updated_by",
|
||||
"updated_at"
|
||||
'plant_id',
|
||||
'receiving_plant',
|
||||
'receiving_plant_name',
|
||||
'invoice_number',
|
||||
'invoice_date',
|
||||
'item_code',
|
||||
'description',
|
||||
'quantity',
|
||||
'transport_name',
|
||||
'lr_bl_aw_number',
|
||||
'lr_bl_aw_date',
|
||||
'pending_days',
|
||||
'obd_number',
|
||||
'obd_date',
|
||||
'shipment_weight',
|
||||
'unit_price',
|
||||
'net_value',
|
||||
'total_item_amount',
|
||||
'tax_amount',
|
||||
'transport_mode',
|
||||
'vehicle_number',
|
||||
'e_waybill_number',
|
||||
'created_at',
|
||||
'created_by',
|
||||
'updated_by',
|
||||
'updated_at',
|
||||
];
|
||||
|
||||
public function plant(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Plant::class);
|
||||
}
|
||||
|
||||
public function prunable(): Builder
|
||||
{
|
||||
return static::where('created_at', '<=', now()->subMonthsNoOverflow(6));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user