'integer', 'shipment_id' => 'integer', 'arrival_datetime' => 'datetime', 'options' => 'array', ]; /** * 출하 관계 */ public function shipment(): BelongsTo { return $this->belongsTo(Shipment::class); } /** * 다음 순번 가져오기 */ public static function getNextSeq(int $shipmentId): int { $maxSeq = static::where('shipment_id', $shipmentId)->max('seq'); return ($maxSeq ?? 0) + 1; } }