Subversion Repositories SmartDukaan

Rev

Rev 21693 | Rev 21924 | 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.dtr;

import java.io.Serializable;
import java.time.LocalDateTime;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import com.spice.profitmandi.dao.enumuration.dtr.Gender;
import com.spice.profitmandi.dao.enumuration.dtr.SocialType;

/**
 * This class basically contains social user details
 * 
 * @author ashikali
 *
 */
@Entity
@Table(name="dtr.social_user", schema = "dtr")

public class SocialUser implements Serializable{
        
        private static final long serialVersionUID = 1L;
        
        public SocialUser() {
        }
        
        @Id
        @Column(name="id", unique=true, updatable=false)
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        private int id;
        
        @Column(name = "name")
        private String name;
        
        @Column(name = "email_id", unique = true)
        private String emailId;
        
        @Column(name = "gender")
        @Enumerated(EnumType.STRING)
        private Gender gender;
        
        @Column(name="type")
    @Enumerated(EnumType.STRING)
    private SocialType type;
        
        @Column(name="create_timestamp", updatable = false)
        private LocalDateTime createTimestamp = LocalDateTime.now();
        
        @Column(name="update_timestamp")
        private LocalDateTime updateTimestamp = LocalDateTime.now();
        
        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 getEmailId() {
                return emailId;
        }
        public void setEmailId(String emailId) {
                this.emailId = emailId;
        }
        
        public SocialType getType() {
                return type;
        }
        public void setType(SocialType type) {
                this.type = type;
        }
    
        public void setGender(Gender gender) {
                this.gender = gender;
        }
        public Gender getGender() {
                return gender;
        }
        
    public void setCreateTimestamp(LocalDateTime createTimestamp) {
                this.createTimestamp = createTimestamp;
        }
    public LocalDateTime getCreateTimestamp() {
                return createTimestamp;
        }
    public LocalDateTime getUpdateTimestamp() {
                return updateTimestamp;
        }
    public void setUpdateTimestamp(LocalDateTime updateTimestamp) {
                this.updateTimestamp = updateTimestamp;
        }
        @Override
        public String toString() {
                return "SocialUser [id=" + id + ", name=" + name + ", emailId=" + emailId + ", type=" + type
                                + ", createTimestamp=" + createTimestamp + ", updateTimestamp=" + updateTimestamp + "]";
        }
        
        
    
}