123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- /*
- * Copyright (c) Andrew Grant of Carrick Software 19/03/2025, 01:34. All rights reserved.
- *
- */
- package scot.carricksoftware.grants.domains.census;
- import jakarta.persistence.*;
- import scot.carricksoftware.grants.BaseEntity;
- import scot.carricksoftware.grants.domains.people.Person;
- import scot.carricksoftware.grants.enums.censusentry.CensusEntryRelationship;
- @Entity
- public class CensusEntry extends BaseEntity {
- private String name;
- @SuppressWarnings("JpaDataSourceORMInspection")
- @ManyToOne
- @JoinColumn(name = "censusEntry_census_id")
- private Census census;
- @SuppressWarnings("JpaDataSourceORMInspection")
- @ManyToOne
- @JoinColumn(name = "person_id")
- private Person person;
- @Enumerated(EnumType.STRING)
- private CensusEntryRelationship relationship;
- public Person getPerson() {
- return person;
- }
- public void setPerson(Person person) {
- this.person = person;
- }
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
- public Census getCensus() {
- return census;
- }
- public void setCensus(Census census) {
- this.census = census;
- }
- public String toString() {
- return census.toString();
- }
- public CensusEntryRelationship getRelationship() {
- return relationship;
- }
- public void setRelationship(CensusEntryRelationship relationship) {
- this.relationship = relationship;
- }
- }
|