generated from CDCgov/template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CreatedBy and UpdatedBy Info Into Response (#404)
Per discussion, this will include the user and org info in the responses for templates if it is set.
- Loading branch information
Showing
3 changed files
with
29 additions
and
15 deletions.
There are no files selected for viewing
25 changes: 13 additions & 12 deletions
25
backend/src/main/java/gov/cdc/ReportVision/models/ApiUser.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 |
---|---|---|
@@ -1,27 +1,28 @@ | ||
package gov.cdc.ReportVision.models; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.ManyToOne; | ||
import lombok.Getter; | ||
|
||
import java.util.UUID; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
@Entity | ||
public class ApiUser extends BaseEntity { | ||
|
||
@Id | ||
@GeneratedValue(generator = "UUID4") | ||
@Column(updatable = false, nullable = false) | ||
private UUID id; | ||
@Id | ||
@GeneratedValue(generator = "UUID4") | ||
@Column(updatable = false, nullable = false) | ||
private UUID id; | ||
|
||
@JsonProperty private String name; | ||
@JsonProperty private String email; | ||
|
||
private String name; | ||
private String email; | ||
private String password; // Should be hashed and salted | ||
@JsonIgnore private String password; // Should be hashed and salted | ||
|
||
@ManyToOne | ||
private Organization organization; | ||
} | ||
@ManyToOne private Organization organization; | ||
} |
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