Rev 24429 | Go to most recent revision | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed
package com.spice.profitmandi.dao.entity.user;import java.time.LocalDateTime;import java.time.format.DateTimeFormatter;import javax.persistence.Column;import javax.persistence.Convert;import javax.persistence.Entity;import javax.persistence.GeneratedValue;import javax.persistence.GenerationType;import javax.persistence.Id;import javax.persistence.Table;import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;@Entity@Table(name = "user.promoter", schema = "user")public class Promoter {@Id@Column(name = "id", unique = true, updatable = false)@GeneratedValue(strategy = GenerationType.IDENTITY)private int id;@Columnprivate String name;@Columnprivate String brand;@Column(name = "retailer_id")private int retailerId;@Column(length = 10, name = "mobile")private String mobile;@Column(name = "email", unique = true)private String email;@Convert(converter = LocalDateTimeAttributeConverter.class)@Column(name = "created_timestamp", updatable = false)private LocalDateTime createdTimestamp = LocalDateTime.now();public String getEmail() {return email;}public void setEmail(String email) {this.email = email;}public String getMobile() {return mobile;}public void setMobile(String mobile) {this.mobile = mobile;}public int getId() {return id;}public void setId(int id) {this.id = id;}public String getName() {return name;}public void setName(String name) {this.name = name;}public String getBrand() {return brand;}public void setBrand(String brand) {this.brand = brand;}public int getRetailerId() {return retailerId;}public void setRetailerId(int retailerId) {this.retailerId = retailerId;}public LocalDateTime getCreatedTimestamp() {return createdTimestamp;}public void setCreatedTimestamp(LocalDateTime createdTimestamp) {this.createdTimestamp = createdTimestamp;}public String getDate(LocalDateTime ldt) {DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy/MM/dd");String s = dtf.format(ldt);return s;}@Overridepublic String toString() {return "Promoter [id=" + id + ", name=" + name + ", brand=" + brand + ", retailerId=" + retailerId + ", email="+ email + ", mobile=" + mobile + ", createdTimestamp=" + createdTimestamp + "]";}}