Эх сурвалжийг харах

Notes added to census entry domain

Andrew Grant 7 сар өмнө
parent
commit
3aedc94603

+ 12 - 0
src/main/java/scot/carricksoftware/grants/domains/census/CensusEntry.java

@@ -71,6 +71,10 @@ public class CensusEntry extends BaseEntity {
     @Column(name = "`personal_occupation`")
     private String personalOccupation;
 
+    @SuppressWarnings("JpaDataSourceORMInspection")
+    @Column(name = "`notes`")
+    private String notes;
+
     public Person getPerson() {
         return person;
     }
@@ -178,4 +182,12 @@ public class CensusEntry extends BaseEntity {
     public void setPersonalOccupation(String occupation) {
         this.personalOccupation = occupation;
     }
+
+    public String getNotes() {
+        return notes;
+    }
+
+    public void setNotes(String notes) {
+        this.notes = notes;
+    }
 }

+ 1 - 1
src/main/resources/application.properties

@@ -2,7 +2,7 @@ spring.application.name=grants
 server.port=8086
 server.servlet.context-path=/grants
 spring.mvc.format.date=dd-MM-yyyy
-spring.profiles.active=uat
+spring.profiles.active=dev
 logging.level.scot.carricksoftware=trace
 
 

+ 12 - 0
src/test/java/scot/carricksoftware/grants/domains/census/CensusEntryTest.java

@@ -137,5 +137,17 @@ class CensusEntryTest {
         assertEquals(occupation, entry.getPersonalOccupation());
     }
 
+    @Test
+    void getNotesTest() {
+        assertNull(entry.getNotes());
+    }
+
+    @Test
+    void setNotesTest() {
+        String notes = GetRandomString();
+        entry.setNotes(notes);
+        assertEquals(notes, entry.getNotes());
+    }
+
 
 }