forked from FITER1/fineract-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #202 from fiterlatam/feature/PrequalificationLogs
Add logs to prequalification
- Loading branch information
Showing
7 changed files
with
222 additions
and
4 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
...he/fineract/organisation/prequalification/domain/PreQualificationStatusLogRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* 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.organisation.prequalification.domain; | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.JpaSpecificationExecutor; | ||
|
||
public interface PreQualificationStatusLogRepository | ||
extends JpaRepository<PrequalificationStatusLog, Long>, JpaSpecificationExecutor<PrequalificationStatusLog> { | ||
// no behaviour | ||
} |
76 changes: 76 additions & 0 deletions
76
...a/org/apache/fineract/organisation/prequalification/domain/PrequalificationStatusLog.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/** | ||
* 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.organisation.prequalification.domain; | ||
|
||
import lombok.Getter; | ||
import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; | ||
import org.apache.fineract.infrastructure.core.service.DateUtils; | ||
import org.apache.fineract.useradministration.domain.AppUser; | ||
|
||
import javax.persistence.Column; | ||
import javax.persistence.Entity; | ||
import javax.persistence.JoinColumn; | ||
import javax.persistence.ManyToOne; | ||
import javax.persistence.Table; | ||
import java.time.LocalDate; | ||
|
||
@Entity | ||
@Table(name = "m_prequalification_status_log") | ||
@Getter | ||
public class PrequalificationStatusLog extends AbstractPersistableCustom { | ||
|
||
@ManyToOne | ||
@JoinColumn(name = "prequalification_id") | ||
private PrequalificationGroup prequalificationGroup; | ||
|
||
@ManyToOne | ||
@JoinColumn(name = "updatedby_id", nullable = false) | ||
private AppUser addedBy; | ||
|
||
@Column(name = "from_status", nullable = false) | ||
private Integer fromStatus; | ||
|
||
@Column(name = "to_status", nullable = false) | ||
private Integer toStatus; | ||
|
||
@Column(name = "date_created", nullable = false) | ||
private LocalDate dateCreated; | ||
|
||
@Column(name = "comments", nullable = false) | ||
private String comments; | ||
|
||
protected PrequalificationStatusLog() { | ||
// | ||
} | ||
|
||
private PrequalificationStatusLog(final AppUser appUser, final Integer fromStatus, final Integer toStatus, final String comments, | ||
final PrequalificationGroup group) { | ||
this.dateCreated = DateUtils.getLocalDateOfTenant(); | ||
this.fromStatus = fromStatus; | ||
this.toStatus = toStatus; | ||
this.prequalificationGroup = group; | ||
this.comments = comments; | ||
this.addedBy = appUser; | ||
} | ||
|
||
public static PrequalificationStatusLog fromJson(final AppUser appUser, final Integer fromStatus, final Integer toStatus, final String comments, | ||
final PrequalificationGroup group) { | ||
return new PrequalificationStatusLog(appUser, fromStatus, toStatus, comments, group); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.