Added message database support in repo

Started on history fetching with getMapping
This commit is contained in:
Zhongheng Liu 2024-01-02 17:31:58 +02:00
commit f2d3c948bf
No known key found for this signature in database
4 changed files with 35 additions and 9 deletions

View file

@ -1,9 +1,22 @@
package me.imsonmia.epqapi.model;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
@Entity
@Table(name = "message")
public class Message {
@GeneratedValue
@Id
private Long id;
private String from;
private String to;
private String content;
public Long getId() {
return id;
}
public String getFrom() {
return this.from;
}