26 lines
861 B
Java
26 lines
861 B
Java
package com.baiyue.warehouse.dto;
|
|
|
|
import com.baiyue.warehouse.entity.WarehouseResourceLockEntity;
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
public record WarehouseResourceLockResponse(
|
|
long lockId,
|
|
long customerId,
|
|
long warehouseId,
|
|
long palletId,
|
|
long locationId,
|
|
String businessType,
|
|
String businessId,
|
|
String reservationKey,
|
|
String status,
|
|
LocalDateTime lockedAt,
|
|
LocalDateTime releasedAt
|
|
) {
|
|
public static WarehouseResourceLockResponse from(WarehouseResourceLockEntity entity) {
|
|
return new WarehouseResourceLockResponse(entity.getId(), entity.getCustomerId(), entity.getWarehouseId(),
|
|
entity.getPalletId(), entity.getLocationId(), entity.getBusinessType(), entity.getBusinessId(),
|
|
entity.getReservationKey(), entity.getStatus(), entity.getLockedAt(), entity.getReleasedAt());
|
|
}
|
|
}
|