1
0
forked from poc/pds

After change datatype from citext to text

This commit is contained in:
dhanabalan
2025-03-25 15:02:25 +05:30
parent 8612cc08b1
commit 70a42a6651
20 changed files with 234 additions and 87 deletions

View File

@@ -4,14 +4,33 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class Item extends Model
{
use SoftDeletes;
protected $fillable = [
"plant_id",
"block_id",
"line_id",
'code',
'description',
'hourly_quantity',
];
public function plant(): BelongsTo
{
return $this->belongsTo(Plant::class);
}
public function block(): BelongsTo
{
return $this->belongsTo(Block::class);
}
public function line(): BelongsTo
{
return $this->belongsTo(Line::class);
}
}

View File

@@ -15,9 +15,7 @@ class ProductionQuantity extends Model
"block_id",
"shift_id",
"line_id",
"plan_quantity",
"hourly_quantity",
"item_code",
"item_id",
"serial_number",
];
@@ -40,4 +38,9 @@ class ProductionQuantity extends Model
{
return $this->belongsTo(Line::class);
}
public function item(): BelongsTo
{
return $this->belongsTo(Item::class);
}
}