-
Notifications
You must be signed in to change notification settings - Fork 98
Expand file tree
/
Copy pathCustomer.java
More file actions
44 lines (35 loc) · 880 Bytes
/
Customer.java
File metadata and controls
44 lines (35 loc) · 880 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package com.booleanuk.api.cinema.models;
import jakarta.persistence.*;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;
import java.time.OffsetDateTime;
@Getter
@Setter
@NoArgsConstructor
@Entity
@Table(name = "customers")
public class Customer {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private int id;
@Column
private String name;
@Column
private String email;
@Column
private String phone;
@CreationTimestamp
@Column
private OffsetDateTime createdAt;
@UpdateTimestamp
@Column
private OffsetDateTime updatedAt;
public Customer(String name, String email, String phone) {
this.name = name;
this.email = email;
this.phone = phone;
}
}