Changes in / [6626008:e6b2246]
- Location:
- src/main/java/com/example/moviezone/model
- Files:
-
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/com/example/moviezone/model/Categories.java
r6626008 re6b2246 1 1 package com.example.moviezone.model; 2 2 3 import jakarta.persistence. *;3 import jakarta.persistence.Entity; 4 4 import lombok.Getter; 5 5 import lombok.Setter; 6 6 import lombok.ToString; 7 8 import java.util.Objects;9 7 10 8 @Getter … … 13 11 @Entity 14 12 public class Categories { 15 @Id16 @Column(name = "id_category", nullable = false)17 @GeneratedValue(strategy = GenerationType.IDENTITY)18 private Long id_category;19 String name;20 Integer extra_amount;21 22 public Categories(String name, Integer extra_amount) {23 this.name = name;24 this.extra_amount = extra_amount;25 }26 27 public Categories() {28 29 }30 31 @Override32 public boolean equals(Object o) {33 if (this == o) return true;34 if (o == null || getClass() != o.getClass()) return false;35 Categories that = (Categories) o;36 return Objects.equals(id_category, that.id_category) && Objects.equals(name, that.name) && Objects.equals(extra_amount, that.extra_amount);37 }38 39 @Override40 public int hashCode() {41 return Objects.hash(id_category, name, extra_amount);42 }43 13 }
Note:
See TracChangeset
for help on using the changeset viewer.