| /** |
| * Licensed to the Apache Software Foundation (ASF) under one |
| * or more contributor license agreements. See the NOTICE file |
| * distributed with this work for additional information |
| * regarding copyright ownership. The ASF licenses this file |
| * to you under the Apache License, Version 2.0 (the |
| * "License"); you may not use this file except in compliance |
| * with the License. You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, |
| * software distributed under the License is distributed on an |
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| * KIND, either express or implied. See the License for the |
| * specific language governing permissions and limitations |
| * under the License. |
| */ |
| package org.apache.fineract.spm.domain; |
| |
| import org.apache.fineract.portfolio.client.domain.Client; |
| import org.apache.fineract.useradministration.domain.AppUser; |
| import org.springframework.data.jpa.domain.AbstractPersistable; |
| |
| import javax.persistence.*; |
| import java.util.Date; |
| |
| @Entity |
| @Table(name = "m_survey_scorecards") |
| public class Scorecard extends AbstractPersistable<Long> { |
| |
| @ManyToOne(fetch = FetchType.LAZY) |
| @JoinColumn(name = "survey_id") |
| private Survey survey; |
| |
| @ManyToOne(fetch = FetchType.LAZY) |
| @JoinColumn(name = "question_id") |
| private Question question; |
| |
| @ManyToOne(fetch = FetchType.LAZY) |
| @JoinColumn(name = "response_id") |
| private Response response; |
| |
| @ManyToOne(fetch = FetchType.LAZY) |
| @JoinColumn(name = "user_id") |
| private AppUser appUser; |
| |
| @ManyToOne(fetch = FetchType.LAZY) |
| @JoinColumn(name = "client_id") |
| private Client client; |
| |
| @Column(name = "created_on") |
| @Temporal(value = TemporalType.TIMESTAMP) |
| @OrderBy("createdOn DESC") |
| private Date createdOn; |
| |
| @Column(name = "a_value", precision = 4) |
| private Integer value; |
| |
| public Scorecard() { |
| super(); |
| } |
| |
| public Survey getSurvey() { |
| return survey; |
| } |
| |
| public void setSurvey(Survey survey) { |
| this.survey = survey; |
| } |
| |
| public Question getQuestion() { |
| return question; |
| } |
| |
| public void setQuestion(Question question) { |
| this.question = question; |
| } |
| |
| public Response getResponse() { |
| return response; |
| } |
| |
| public void setResponse(Response response) { |
| this.response = response; |
| } |
| |
| public AppUser getAppUser() { |
| return appUser; |
| } |
| |
| public void setAppUser(AppUser appUser) { |
| this.appUser = appUser; |
| } |
| |
| public Client getClient() { |
| return client; |
| } |
| |
| public void setClient(Client client) { |
| this.client = client; |
| } |
| |
| public Date getCreatedOn() { |
| return createdOn; |
| } |
| |
| public void setCreatedOn(Date createdOn) { |
| this.createdOn = createdOn; |
| } |
| |
| public Integer getValue() { |
| return value; |
| } |
| |
| public void setValue(Integer value) { |
| this.value = value; |
| } |
| } |