23 lines
492 B
Java
23 lines
492 B
Java
|
|
package com.gcsc.guide.dto;
|
||
|
|
|
||
|
|
import com.gcsc.guide.entity.LoginHistory;
|
||
|
|
|
||
|
|
import java.time.LocalDateTime;
|
||
|
|
|
||
|
|
public record LoginHistoryResponse(
|
||
|
|
Long id,
|
||
|
|
LocalDateTime loginAt,
|
||
|
|
String ipAddress,
|
||
|
|
String userAgent
|
||
|
|
) {
|
||
|
|
|
||
|
|
public static LoginHistoryResponse from(LoginHistory history) {
|
||
|
|
return new LoginHistoryResponse(
|
||
|
|
history.getId(),
|
||
|
|
history.getLoginAt(),
|
||
|
|
history.getIpAddress(),
|
||
|
|
history.getUserAgent()
|
||
|
|
);
|
||
|
|
}
|
||
|
|
}
|