-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustomer
45 lines (30 loc) · 822 Bytes
/
customer
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
45
package com.luv2code.springdemo.mvc;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
public class Customer {
private String firstName;
@NotNull(message="it can not be null")
private String lastName;
@Min(value=0 , message="bigger than zero")
@Max(value=10 , message="less than ten")
private int freePasses;
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public int getFreePasses() {
return freePasses;
}
public void setFreePasses(int freePasses) {
this.freePasses = freePasses;
}
}