added login with otp and verify otp

This commit is contained in:
Lincpay Tech
2025-11-26 17:17:04 +05:30
parent 985f6eecfd
commit 6f53dedbe1
18 changed files with 595 additions and 5 deletions
@@ -0,0 +1,51 @@
package com.billpaymentservice.bbps.dto.auth;
import com.billpaymentservice.bbps.dto.auth.UserDto;
public class AuthResponse {
private boolean success;
private String message;
private boolean userExists;
private UserDto user;
public AuthResponse() {}
public AuthResponse(boolean success, String message, boolean userExists, UserDto user) {
this.success = success;
this.message = message;
this.userExists = userExists;
this.user = user;
}
public boolean isSuccess() {
return success;
}
public void setSuccess(boolean success) {
this.success = success;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public boolean isUserExists() {
return userExists;
}
public void setUserExists(boolean userExists) {
this.userExists = userExists;
}
public UserDto getUser() {
return user;
}
public void setUser(UserDto user) {
this.user = user;
}
}
@@ -0,0 +1,19 @@
package com.billpaymentservice.bbps.dto.auth;
public class LoginRequest {
private String mobile;
public LoginRequest() {}
public LoginRequest(String mobile) {
this.mobile = mobile;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
}
@@ -0,0 +1,29 @@
package com.billpaymentservice.bbps.dto.auth;
public class OtpSendResponse {
private boolean success;
private String message;
public OtpSendResponse() {}
public OtpSendResponse(boolean success, String message) {
this.success = success;
this.message = message;
}
public boolean isSuccess() {
return success;
}
public void setSuccess(boolean success) {
this.success = success;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
@@ -0,0 +1,14 @@
package com.billpaymentservice.bbps.dto.auth;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class RegisterRequest {
private String mobile;
private String name;
private String email;
private int age;
}
@@ -0,0 +1,20 @@
package com.billpaymentservice.bbps.dto.auth;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class UserDto {
private Long id;
private String mobile;
private String name;
private String email;
private int age;
}
@@ -0,0 +1,30 @@
package com.billpaymentservice.bbps.dto.auth;
public class VerifyOtpRequest {
private String mobile;
private String otp;
public VerifyOtpRequest() {
}
public VerifyOtpRequest(String mobile, String otp) {
this.mobile = mobile;
this.otp = otp;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public String getOtp() {
return otp;
}
public void setOtp(String otp) {
this.otp = otp;
}
}
@@ -0,0 +1,5 @@
package com.billpaymentservice.bbps.dto.request;
public class TransactionHistory {
}