Subversion Repositories SmartDukaan

Rev

Rev 31860 | 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 com.fasterxml.jackson.annotation.JsonProperty;

import javax.persistence.*;
import java.time.LocalDateTime;
import java.util.Objects;

@Entity
@Table(name = "dtr.banner_listing_detail")
public class BannerListingDetail {

        private static final long serialVersionUID = 1L;

        @Id
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        private int id;

        @Column(name = "banner_listing_id")
        private int bannerListingId;

        @Column(name = "banner_url")
        private String bannerUrl;

        @Column(name = "target_url")
        private String targetUrl;

        @Column(name = "media_type")
        private String mediaType;

        @Column(name = "created_timestamp")
        private LocalDateTime createdTimestamp;

        public LocalDateTime getCreatedTimestamp() {
                return createdTimestamp;
        }

        public void setCreatedTimestamp(LocalDateTime createdTimestamp) {
                this.createdTimestamp = createdTimestamp;
        }

        public String getMediaType() {
                return mediaType;
        }

        public void setMediaType(String mediaType) {
                this.mediaType = mediaType;
        }

        @JsonProperty(defaultValue = "0")
        @Column(name = "rank")
        private int rank;

        public int getId() {
                return id;
        }

        public void setId(int id) {
                this.id = id;
        }

        public int getBannerListingId() {
                return bannerListingId;
        }

        public void setBannerListingId(int bannerListingId) {
                this.bannerListingId = bannerListingId;
        }

        @Override
        public boolean equals(Object o) {
                if (this == o) return true;
                if (o == null || getClass() != o.getClass()) return false;
                BannerListingDetail that = (BannerListingDetail) o;
                return id == that.id && bannerListingId == that.bannerListingId && rank == that.rank && Objects.equals(bannerUrl, that.bannerUrl) && Objects.equals(targetUrl, that.targetUrl) && Objects.equals(mediaType, that.mediaType) && Objects.equals(createdTimestamp, that.createdTimestamp);
        }

        @Override
        public int hashCode() {
                return Objects.hash(id, bannerListingId, bannerUrl, targetUrl, mediaType, createdTimestamp, rank);
        }

        public String getBannerUrl() {
                return bannerUrl;
        }

        public String getTargetUrl() {
                return targetUrl;
        }

        public void setBannerUrl(String bannerUrl) {
                this.bannerUrl = bannerUrl;
        }

        public void setTargetUrl(String targetUrl) {
                this.targetUrl = targetUrl;
        }

        public int getRank() {
                return rank;
        }

        public void setRank(int rank) {
                this.rank = rank;
        }

        @Override
        public String toString() {
                return "BannerListingDetail [id=" + id + ", bannerListingId=" + bannerListingId + ", bannerUrl=" + bannerUrl
                                + ", targetUrl=" + targetUrl + ", rank=" + rank + "]";
        }

}