Added request characteristics model file
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 11s
Laravel Pint / pint (pull_request) Successful in 2m13s
Laravel Larastan / larastan (pull_request) Failing after 3m22s
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 11s
Laravel Pint / pint (pull_request) Successful in 2m13s
Laravel Larastan / larastan (pull_request) Failing after 3m22s
This commit is contained in:
99
app/Models/RequestCharacteristic.php
Normal file
99
app/Models/RequestCharacteristic.php
Normal file
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class RequestCharacteristic extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $fillable = [
|
||||
'plant_id',
|
||||
'machine_id',
|
||||
'item_id',
|
||||
'characteristic_approver_master_id',
|
||||
'aufnr',
|
||||
'characteristic_name',
|
||||
'current_value',
|
||||
'update_value',
|
||||
'approver_status1',
|
||||
'approver_status2',
|
||||
'approver_status3',
|
||||
'approver_remark1',
|
||||
'approver_remark2',
|
||||
'approver_remark3',
|
||||
'approved1_at',
|
||||
'approved2_at',
|
||||
'approved3_at',
|
||||
'mail_status',
|
||||
'trigger_at',
|
||||
'work_flow_id',
|
||||
|
||||
'created_at',
|
||||
'updated_at',
|
||||
'created_by',
|
||||
'updated_by',
|
||||
];
|
||||
|
||||
public function plant(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Plant::class);
|
||||
}
|
||||
|
||||
public function item(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Item::class);
|
||||
}
|
||||
|
||||
|
||||
public function machine(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Machine::class);
|
||||
}
|
||||
|
||||
public function characteristicApproverMaster(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(CharacteristicApproverMaster::class);
|
||||
}
|
||||
|
||||
// public function approverName1()
|
||||
// {
|
||||
// return $this->belongsTo(
|
||||
// CharacteristicApproverMaster::class,
|
||||
// 'characteristic_approver_master_id'
|
||||
// );
|
||||
// }
|
||||
|
||||
// public function approverName2()
|
||||
// {
|
||||
// return $this->belongsTo(
|
||||
// CharacteristicApproverMaster::class,
|
||||
// 'characteristic_approver_master_id'
|
||||
// );
|
||||
// }
|
||||
|
||||
// public function approverName3()
|
||||
// {
|
||||
// return $this->belongsTo(
|
||||
// CharacteristicApproverMaster::class,
|
||||
// 'characteristic_approver_master_id'
|
||||
// );
|
||||
// }
|
||||
|
||||
public function approver()
|
||||
{
|
||||
return $this->belongsTo(
|
||||
CharacteristicApproverMaster::class,
|
||||
'characteristic_approver_master_id'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user