model customer.java
package com.customerapp.practice.model;
import jakarta.persistence.*;
@Entity
public class Customer {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String name;
private String email;
private String phone;
// Constructors
public Customer() {}
public Customer(String name, String email, String phone) {
this.name = name;
this.email = email;
this.phone = phone;
}
// Getters & Setters
public Long getId() { return id; }
public void setId(Long id) { this.id = id; }
public String getName() { return name; }
public void setName(String name) { this.name = name; }
public String getEmail() { return email; }
public void setEmail(String email) { this.email = email; }
public String getPhone() { return phone; }
public void setPhone(Strin
g phone) { this.phone = phone; }
}
Comments
Post a Comment