started to add the service and model for notes. service will be put on hold until i do the JPA class

This commit is contained in:
2026-01-01 23:05:52 +00:00
parent 8959e3e9b3
commit 1d38428f7f
2 changed files with 60 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
package org.zaine.app.model;
import java.sql.Date;
public class Notes {
private String content;
private String authorName;
private Date createdAt;
private Long id;
public Notes() {
this.createdAt = new Date(System.currentTimeMillis());
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getAuthorName() {
return authorName;
}
public void setAuthorName(String authorName) {
this.authorName = authorName;
}
public Date getCreatedAt() {
return createdAt;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
}

View File

@@ -0,0 +1,17 @@
package org.zaine.app.service;
import java.util.ArrayList;
import java.util.List;
import org.springframework.stereotype.Service;
import org.zaine.app.model.Notes;
@Service
public class NotesService {
private static List<Notes> notesList = new ArrayList<>();
public List<Notes> getAllNotes() {
return notesList;
}
}