-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from PET-foundation/developer
Developer
- Loading branch information
Showing
46 changed files
with
2,179 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
src/main/java/com/pet/foundation/pataamiga/domain/email/Email.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.pet.foundation.pataamiga.domain.email; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.Data; | ||
|
||
import java.io.Serializable; | ||
import java.time.LocalDateTime; | ||
import java.util.UUID; | ||
|
||
@Entity | ||
@Table(name = "email") | ||
@Data | ||
public class Email implements Serializable { | ||
private static final Long serialVersionUID = 1L; | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.AUTO) | ||
private UUID uuid; | ||
|
||
private String ownerRef; | ||
|
||
private String emailTo; | ||
|
||
private String emailFrom; | ||
|
||
private String subject; | ||
|
||
@Column(columnDefinition = "TEXT") | ||
private String text; | ||
|
||
private LocalDateTime sendDataEmail; | ||
|
||
private StatusEmail statusEmail; | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/java/com/pet/foundation/pataamiga/domain/email/StatusEmail.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.pet.foundation.pataamiga.domain.email; | ||
|
||
public enum StatusEmail { | ||
SENT, | ||
ERROR | ||
} |
18 changes: 18 additions & 0 deletions
18
src/main/java/com/pet/foundation/pataamiga/domain/email/dto/EmailDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.pet.foundation.pataamiga.domain.email.dto; | ||
|
||
import lombok.Builder; | ||
import lombok.Data; | ||
|
||
@Data | ||
@Builder | ||
public class EmailDTO { | ||
private String ownerRef; | ||
|
||
private String emailTo; | ||
|
||
private String emailFrom; | ||
|
||
private String subject; | ||
private String text; | ||
private MailType mailType; | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/java/com/pet/foundation/pataamiga/domain/email/dto/MailType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.pet.foundation.pataamiga.domain.email.dto; | ||
|
||
public enum MailType { | ||
CREATE_USER, | ||
CHANGE_PASSWORD, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
src/main/java/com/pet/foundation/pataamiga/domain/user/dto/LoginGoogleDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.pet.foundation.pataamiga.domain.user.dto; | ||
|
||
public record LoginGoogleDTO( | ||
String token | ||
) { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/main/java/com/pet/foundation/pataamiga/mapper/email/EmailMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.pet.foundation.pataamiga.mapper.email; | ||
|
||
import com.pet.foundation.pataamiga.domain.email.Email; | ||
import com.pet.foundation.pataamiga.domain.email.dto.EmailDTO; | ||
import org.mapstruct.Mapper; | ||
import org.mapstruct.factory.Mappers; | ||
|
||
@Mapper(componentModel = "spring") | ||
public interface EmailMapper { | ||
|
||
EmailMapper INSTANCE = Mappers.getMapper(EmailMapper.class); | ||
|
||
Email toEntity(EmailDTO emailDTO); | ||
} |
9 changes: 9 additions & 0 deletions
9
src/main/java/com/pet/foundation/pataamiga/repositories/EmailRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.pet.foundation.pataamiga.repositories; | ||
|
||
import com.pet.foundation.pataamiga.domain.email.Email; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
import java.util.UUID; | ||
|
||
public interface EmailRepository extends JpaRepository<Email, UUID> { | ||
} |
14 changes: 0 additions & 14 deletions
14
src/main/java/com/pet/foundation/pataamiga/requests/ChatMessage.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/main/java/com/pet/foundation/pataamiga/service/EmailService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.pet.foundation.pataamiga.service; | ||
|
||
import com.pet.foundation.pataamiga.domain.email.dto.EmailDTO; | ||
|
||
public interface EmailService { | ||
void sendEmail(EmailDTO emailDTO); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.