98 lines
2.1 KiB
Plaintext
98 lines
2.1 KiB
Plaintext
package com.healthcare.ohctech.entity;
|
|
|
|
import jakarta.persistence.*;
|
|
import jakarta.validation.constraints.NotBlank;
|
|
import jakarta.validation.constraints.NotNull;
|
|
import org.hibernate.annotations.UpdateTimestamp;
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
@Entity
|
|
@Table(name = "nutrient_master")
|
|
public class NutrientMaster {
|
|
|
|
@Id
|
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
@Column(name = "nutrient_id")
|
|
private Long id;
|
|
|
|
@NotBlank(message = "Nutrient name should not be null or blank")
|
|
@Column(name = "nutrient_name")
|
|
private String nutrientName;
|
|
|
|
@Column(name = "nutrient_code")
|
|
private String nutrientCode;
|
|
|
|
@Column(name = "remark")
|
|
private String remark;
|
|
|
|
@UpdateTimestamp
|
|
@Column(name = "last_modified")
|
|
private LocalDateTime lastModified;
|
|
|
|
@Column(name = "modified_by")
|
|
private Long modifiedBy;
|
|
|
|
@ManyToOne
|
|
@JoinColumn(name = "unit_id", referencedColumnName = "id")
|
|
private UnitMaster unitMaster;
|
|
|
|
// Getters and setters
|
|
|
|
public Long getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(Long id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public String getNutrientName() {
|
|
return nutrientName;
|
|
}
|
|
|
|
public void setNutrientName(String nutrientName) {
|
|
this.nutrientName = nutrientName;
|
|
}
|
|
|
|
public String getNutrientCode() {
|
|
return nutrientCode;
|
|
}
|
|
|
|
public void setNutrientCode(String nutrientCode) {
|
|
this.nutrientCode = nutrientCode;
|
|
}
|
|
|
|
public String getRemark() {
|
|
return remark;
|
|
}
|
|
|
|
public void setRemark(String remark) {
|
|
this.remark = remark;
|
|
}
|
|
|
|
public LocalDateTime getLastModified() {
|
|
return lastModified;
|
|
}
|
|
|
|
public void setLastModified(LocalDateTime lastModified) {
|
|
this.lastModified = lastModified;
|
|
}
|
|
|
|
public Long getModifiedBy() {
|
|
return modifiedBy;
|
|
}
|
|
|
|
public void setModifiedBy(Long modifiedBy) {
|
|
this.modifiedBy = modifiedBy;
|
|
}
|
|
|
|
public UnitMaster getUnitMaster() {
|
|
return unitMaster;
|
|
}
|
|
|
|
public void setUnitMaster(UnitMaster unitMaster) {
|
|
this.unitMaster = unitMaster;
|
|
}
|
|
}
|