mirror of
https://github.com/slhaf/Partner.git
synced 2026-05-12 16:53:04 +08:00
refactor(chat): migrate Message from Java POJO to Kotlin data class
This commit is contained in:
@@ -1,22 +1,14 @@
|
|||||||
package work.slhaf.partner.api.chat.pojo;
|
package work.slhaf.partner.api.chat.pojo
|
||||||
|
|
||||||
import lombok.*;
|
import work.slhaf.partner.api.common.entity.PersistableObject
|
||||||
import work.slhaf.partner.api.common.entity.PersistableObject;
|
import java.io.Serial
|
||||||
|
|
||||||
import java.io.Serial;
|
data class Message(
|
||||||
|
val role: String,
|
||||||
@EqualsAndHashCode(callSuper = true)
|
val content: String
|
||||||
@Builder
|
) : PersistableObject() {
|
||||||
@Data
|
companion object {
|
||||||
@AllArgsConstructor
|
@Serial
|
||||||
@NoArgsConstructor
|
private const val serialVersionUID = 1L
|
||||||
public class Message extends PersistableObject {
|
}
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@NonNull
|
|
||||||
private String role;
|
|
||||||
@NonNull
|
|
||||||
private String content;
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user