Subversion Repositories SmartDukaan

Rev

Rev 33888 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
33772 amit.gupta 1
package com.spice.profitmandi.dao.entity.catalog;
2
 
3
import javax.persistence.*;
4
import java.time.LocalDateTime;
5
import java.util.Objects;
6
 
7
@Entity
8
@Table(name = "catalog.catalog")
9
public class Catalog {
10
    @Id
11
    @GeneratedValue(strategy = GenerationType.IDENTITY)
12
    @Column(name = "id", columnDefinition = "int(11)")
13
    private int id;
14
 
15
    @Column(name="brand_id")
16
    private int brandId;
17
 
18
    @Column
19
    private String brand;
20
 
21
    @Column(name="model_number")
22
    private String modelNumber;
23
 
24
    @Column(name="model_name")
25
    private String modelName;
26
 
27
    @Column(name="created_by")
28
    private String createdBy;
29
 
30
    @Column
31
    private LocalDateTime created;
32
 
33
    public int getId() {
34
        return id;
35
    }
36
 
37
    public void setId(int id) {
38
        this.id = id;
39
    }
40
 
41
    public int getBrandId() {
42
        return brandId;
43
    }
44
 
45
    public void setBrandId(int brandId) {
46
        this.brandId = brandId;
47
    }
48
 
49
    public String getBrand() {
50
        return brand;
51
    }
52
 
53
    public void setBrand(String brand) {
54
        this.brand = brand;
55
    }
56
 
57
    public String getModelNumber() {
58
        return modelNumber;
59
    }
60
 
61
    public void setModelNumber(String modelNumber) {
62
        this.modelNumber = modelNumber;
63
    }
64
 
65
    public String getModelName() {
66
        return modelName;
67
    }
68
 
69
    public void setModelName(String modelName) {
70
        this.modelName = modelName;
71
    }
72
 
73
    public String getCreatedBy() {
74
        return createdBy;
75
    }
76
 
77
    public void setCreatedBy(String createdBy) {
78
        this.createdBy = createdBy;
79
    }
80
 
81
    public LocalDateTime getCreated() {
82
        return created;
83
    }
84
 
85
    public void setCreated(LocalDateTime created) {
86
        this.created = created;
87
    }
88
 
89
    @Override
90
    public boolean equals(Object o) {
91
        if (this == o) return true;
92
        if (o == null || getClass() != o.getClass()) return false;
93
        Catalog catalog = (Catalog) o;
94
        return id == catalog.id && brandId == catalog.brandId && Objects.equals(brand, catalog.brand) && Objects.equals(modelNumber, catalog.modelNumber) && Objects.equals(modelName, catalog.modelName) && Objects.equals(createdBy, catalog.createdBy) && Objects.equals(created, catalog.created);
95
    }
96
 
97
    @Override
98
    public String toString() {
99
        return "Catalog{" +
100
                "id=" + id +
101
                ", brandId=" + brandId +
102
                ", brand='" + brand + '\'' +
103
                ", modelNumber='" + modelNumber + '\'' +
104
                ", modelName='" + modelName + '\'' +
105
                ", createdBy='" + createdBy + '\'' +
106
                ", created=" + created +
107
                '}';
108
    }
109
 
110
    @Override
111
    public int hashCode() {
112
        return Objects.hash(id, brandId, brand, modelNumber, modelName, createdBy, created);
113
    }
114
}
115