Posts

Showing posts from September, 2024

Food Order System : Customer Service

  Domain  Customer package com.customer.Domain; import jakarta.persistence. Entity ; import jakarta.persistence.*; import jakarta.validation.constraints.*; import lombok. AllArgsConstructor ; import lombok. Data ; import lombok. NoArgsConstructor ; import lombok. ToString ; @Entity @Data @ToString @NoArgsConstructor @AllArgsConstructor public class Customer { @Id @GeneratedValue (strategy = GenerationType. AUTO ) private Integer customerId ; @NotNull (message = "firstName field should not be null" ) @Size (min = 3 ,max= 30 ,message = "name of min length should be 3 and max be 30" ) private String firstName ; @NotNull (message = "lastName field should not be null" ) @Size (min = 3 ,max= 30 ,message = "name of min length should be 3 and max be 30" ) private String lastname ; @NotNull (message = "age field should not be null" ) @Max ( 100 ) private Integer age ; @NotNull (message = "