package com.eksad.masterdata.domain; import com.eksad.ddms.common.util.object.EntityObject; import com.eksad.ddms.common.util.status.DataStatus; import com.eksad.masterdata.common.listEnum.UnitOwnershipStatus; import jakarta.persistence.*; import javax.validation.constraints.NotNull; import java.util.Objects; @Entity @Table(name = "MST_CUSTOMERATTENDEE") public class CustomerAttendee implements EntityObject { @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "mst_customerattendee_gen") @SequenceGenerator(name = "mst_customerattendee_gen", sequenceName = "mst_customerattendee_seq", allocationSize = 1) Integer id; @Column(unique = true) @NotNull(message = "customerAttendeeID cannot be null") private String customerAttendeeID; @NotNull(message = "customer name cannot be null") private String customerName; @NotNull(message = "phone cannot be null") private String phone; private String sexID; private String noKtp; private String address; private String lastAddress; private String relationship; private String email; private String sosmed; private String city; private String kecamatan; private String kelurahan; private String postalCode; private String provinceName; private String provinceID; private String kabkotID; private String kecamatanID; private String kelurahanID; private String dealerID; @Enumerated(EnumType.STRING) private UnitOwnershipStatus unitOwnership; @Enumerated(EnumType.STRING) @NotNull(message = "customerAttendeeStatus cannot be null") private DataStatus customerAttendeeStatus; @Embedded private CreationalSpecification customerAttendeeCreational; public CustomerAttendee() { } public CustomerAttendee(String customerAttendeeID, String sexID, String customerName, String noKtp, String phone, String address, String lastAddress, String relationship, String email, String sosmed, String city, String kecamatan, String kelurahan, String postalCode, UnitOwnershipStatus unitOwnership, DataStatus customerAttendeeStatus, CreationalSpecification customerAttendeeCreational) { this.customerAttendeeID = customerAttendeeID; this.sexID = sexID; this.customerName = customerName; this.noKtp = noKtp; this.phone = phone; this.address = address; this.lastAddress = lastAddress; this.relationship = relationship; this.email = email; this.sosmed = sosmed; this.city = city; this.kecamatan = kecamatan; this.kelurahan = kelurahan; this.postalCode = postalCode; this.unitOwnership = unitOwnership; this.customerAttendeeStatus = customerAttendeeStatus; this.customerAttendeeCreational = customerAttendeeCreational; } public CustomerAttendee(String customerAttendeeID, String customerName, String phone, String sexID, String noKtp, String address, String lastAddress, String relationship, String email, String sosmed, String city, String kecamatan, String kelurahan, String postalCode, String provinceName, String provinceID, String kabkotID, String kecamatanID, String kelurahanID, UnitOwnershipStatus unitOwnership, DataStatus customerAttendeeStatus, CreationalSpecification customerAttendeeCreational) { this.customerAttendeeID = customerAttendeeID; this.customerName = customerName; this.phone = phone; this.sexID = sexID; this.noKtp = noKtp; this.address = address; this.lastAddress = lastAddress; this.relationship = relationship; this.email = email; this.sosmed = sosmed; this.city = city; this.kecamatan = kecamatan; this.kelurahan = kelurahan; this.postalCode = postalCode; this.provinceName = provinceName; this.provinceID = provinceID; this.kabkotID = kabkotID; this.kecamatanID = kecamatanID; this.kelurahanID = kelurahanID; this.unitOwnership = unitOwnership; this.customerAttendeeStatus = customerAttendeeStatus; this.customerAttendeeCreational = customerAttendeeCreational; } public CustomerAttendee(String customerAttendeeID, String sexID, String customerName, String noKtp, String phone, String address, String lastAddress, String relationship, String email, String sosmed, String city, String kecamatan, String kelurahan, String postalCode, UnitOwnershipStatus unitOwnership, DataStatus customerAttendeeStatus, CreationalSpecification customerAttendeeCreational, String dealerID) { this.customerAttendeeID = customerAttendeeID; this.sexID = sexID; this.customerName = customerName; this.noKtp = noKtp; this.phone = phone; this.address = address; this.lastAddress = lastAddress; this.relationship = relationship; this.email = email; this.sosmed = sosmed; this.city = city; this.kecamatan = kecamatan; this.kelurahan = kelurahan; this.postalCode = postalCode; this.unitOwnership = unitOwnership; this.customerAttendeeStatus = customerAttendeeStatus; this.customerAttendeeCreational = customerAttendeeCreational; this.dealerID = dealerID; } public CustomerAttendee(String customerAttendeeID, String customerName, String phone, String sexID, String noKtp, String address, String lastAddress, String relationship, String email, String sosmed, String city, String kecamatan, String kelurahan, String postalCode, String provinceName, String provinceID, String kabkotID, String kecamatanID, String kelurahanID, UnitOwnershipStatus unitOwnership, DataStatus customerAttendeeStatus, CreationalSpecification customerAttendeeCreational, String dealerID) { this.customerAttendeeID = customerAttendeeID; this.customerName = customerName; this.phone = phone; this.sexID = sexID; this.noKtp = noKtp; this.address = address; this.lastAddress = lastAddress; this.relationship = relationship; this.email = email; this.sosmed = sosmed; this.city = city; this.kecamatan = kecamatan; this.kelurahan = kelurahan; this.postalCode = postalCode; this.provinceName = provinceName; this.provinceID = provinceID; this.kabkotID = kabkotID; this.kecamatanID = kecamatanID; this.kelurahanID = kelurahanID; this.unitOwnership = unitOwnership; this.customerAttendeeStatus = customerAttendeeStatus; this.customerAttendeeCreational = customerAttendeeCreational; this.dealerID = dealerID; } public String getDealerID() { return dealerID; } public void setDealerID(String dealerID) { this.dealerID = dealerID; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getCustomerAttendeeID() { return customerAttendeeID; } public void setCustomerAttendeeID(String customerAttendeeID) { this.customerAttendeeID = customerAttendeeID; } public String getSexID() { return sexID; } public void setSexID(String sexID) { this.sexID = sexID; } public String getCustomerName() { return customerName; } public void setCustomerName(String customerName) { this.customerName = customerName; } public String getNoKtp() { return noKtp; } public void setNoKtp(String noKtp) { this.noKtp = noKtp; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public String getLastAddress() { return lastAddress; } public void setLastAddress(String lastAddress) { this.lastAddress = lastAddress; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getCity() { return city; } public void setCity(String city) { this.city = city; } public String getKecamatan() { return kecamatan; } public void setKecamatan(String kecamatan) { this.kecamatan = kecamatan; } public String getKelurahan() { return kelurahan; } public void setKelurahan(String kelurahan) { this.kelurahan = kelurahan; } public String getPostalCode() { return postalCode; } public void setPostalCode(String postalCode) { this.postalCode = postalCode; } public String getRelationship() { return relationship; } public void setRelationship(String relationship) { this.relationship = relationship; } public String getSosmed() { return sosmed; } public void setSosmed(String sosmed) { this.sosmed = sosmed; } public DataStatus getCustomerAttendeeStatus() { return customerAttendeeStatus; } public void setCustomerAttendeeStatus(DataStatus customerAttendeeStatus) { this.customerAttendeeStatus = customerAttendeeStatus; } public CreationalSpecification getCustomerAttendeeCreational() { return customerAttendeeCreational; } public void setCustomerAttendeeCreational(CreationalSpecification customerAttendeeCreational) { this.customerAttendeeCreational = customerAttendeeCreational; } public String getProvinceName() { return provinceName; } public void setProvinceName(String provinceName) { this.provinceName = provinceName; } public String getProvinceID() { return provinceID; } public void setProvinceID(String provinceID) { this.provinceID = provinceID; } public String getKabkotID() { return kabkotID; } public void setKabkotID(String kabkotID) { this.kabkotID = kabkotID; } public String getKecamatanID() { return kecamatanID; } public void setKecamatanID(String kecamatanID) { this.kecamatanID = kecamatanID; } public String getKelurahanID() { return kelurahanID; } public void setKelurahanID(String kelurahanID) { this.kelurahanID = kelurahanID; } public UnitOwnershipStatus getUnitOwnership() { return unitOwnership; } public void setUnitOwnership(UnitOwnershipStatus unitOwnership) { this.unitOwnership = unitOwnership; } @Override public int hashCode() { int hash = 3; hash = 37 * hash + Objects.hashCode(this.customerAttendeeID); hash = 37 * hash + Objects.hashCode(this.customerName); hash = 37 * hash + Objects.hashCode(this.phone); hash = 37 * hash + Objects.hashCode(this.sexID); hash = 37 * hash + Objects.hashCode(this.noKtp); hash = 37 * hash + Objects.hashCode(this.address); hash = 37 * hash + Objects.hashCode(this.lastAddress); hash = 37 * hash + Objects.hashCode(this.relationship); hash = 37 * hash + Objects.hashCode(this.email); hash = 37 * hash + Objects.hashCode(this.sosmed); hash = 37 * hash + Objects.hashCode(this.city); hash = 37 * hash + Objects.hashCode(this.kecamatan); hash = 37 * hash + Objects.hashCode(this.kelurahan); hash = 37 * hash + Objects.hashCode(this.postalCode); hash = 37 * hash + Objects.hashCode(this.provinceName); hash = 37 * hash + Objects.hashCode(this.provinceID); hash = 37 * hash + Objects.hashCode(this.kabkotID); hash = 37 * hash + Objects.hashCode(this.kecamatanID); hash = 37 * hash + Objects.hashCode(this.kelurahanID); hash = 37 * hash + Objects.hashCode(this.unitOwnership); hash = 37 * hash + Objects.hashCode(this.customerAttendeeStatus); hash = 37 * hash + Objects.hashCode(this.customerAttendeeCreational); return hash; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final CustomerAttendee other = (CustomerAttendee) obj; if (!Objects.equals(this.id, other.id)) { return false; } return true; } @Override public boolean sameIdentityAs(CustomerAttendee t) { return this.equals(t); } }