chore: copy kept Tastefully modules and portals into Co-Lite
Backend modules from tastefully 8bd93d15: core-libs, core-session, api-gateway, mobile-api, services-auth, services-system, services-counter, services-member, services-log, services-email. solvway-admin-portal from babyboo f64d096ea, solvway-customer-portal from tastefully 8bd93d15. Copied as tracked files only. Literal secrets replaced with environment placeholders: - services-email: SMTP_PASSWORD, MAILGUN_API_KEY, SENDGRID_API_KEY, MAILJET_API_KEY, MAILJET_SECRET_KEY (optional, empty default) - services-system: JUMIO_TOKEN, JUMIO_SECRET (optional) - services-auth: USER_AUTH_API_SECRET (required); commented JWT secret removed - core-libs: JWT_TOKEN default removed (required), XXL_JOB_TOKEN default removed, ipgeolocation key read from IPGEOLOCATION_API_KEY - services-system EkycAppConfig: commented Jumio credentials removed Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
This commit is contained in:
1 parent
e396568cc3
commit
5ee51d1913
2918 files changed
+302373
-3
No files matched your search
@@ -0,0 +1,89 @@
|
||||
package com.solvway.services.email.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonBackReference;
|
||||
import com.solvway.core.enums.EmailEnum.AttachmentStatusType;
|
||||
import jakarta.persistence.*;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Entity
|
||||
public class Attachment implements Cloneable{
|
||||
@Setter
|
||||
@Getter
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
@Setter
|
||||
@Getter
|
||||
private String fileName;
|
||||
@Setter
|
||||
@Getter
|
||||
private String fileType;
|
||||
@Setter
|
||||
@Getter
|
||||
@Transient
|
||||
private byte[] data;
|
||||
@Setter
|
||||
@Getter
|
||||
@Transient
|
||||
private String base;
|
||||
@Setter
|
||||
@Getter
|
||||
private LocalDateTime datetime;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@NotNull
|
||||
@Enumerated(EnumType.STRING)
|
||||
private AttachmentStatusType status = AttachmentStatusType.Y;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "template_id", referencedColumnName = "id", insertable = false, updatable = false)
|
||||
private EmailTemplate template;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@Column(name = "template_id")
|
||||
private Long templateId;
|
||||
|
||||
@JsonBackReference(value="email-attachment")
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "email_id", referencedColumnName = "id", insertable = false, updatable = false)
|
||||
private Email email;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@Column(name = "email_id")
|
||||
private Long emailId;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
private String bucketFileId;
|
||||
|
||||
|
||||
public Attachment() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public Attachment(Long id, String fileName, String fileType, byte[] data,String base,LocalDateTime datetime, AttachmentStatusType status) {
|
||||
super();
|
||||
this.id = id;
|
||||
this.fileName = fileName;
|
||||
this.fileType = fileType;
|
||||
this.data = data;
|
||||
this.base = base;
|
||||
this.datetime = datetime;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
|
||||
public Object clone() throws CloneNotSupportedException
|
||||
{
|
||||
return super.clone();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.solvway.services.email.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonManagedReference;
|
||||
import com.solvway.services.email.constants.EmailConstant;
|
||||
import com.solvway.core.enums.EmailEnum.StatusType;
|
||||
import jakarta.persistence.*;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@Entity
|
||||
public class Email implements Cloneable{
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private String sender = EmailConstant.EMAIL_SENDER;
|
||||
private String subject;
|
||||
private String body;
|
||||
@Column(updatable = false)
|
||||
private LocalDateTime datetime = LocalDateTime.now();
|
||||
|
||||
|
||||
@NotNull
|
||||
@Enumerated(EnumType.STRING)
|
||||
private StatusType status;
|
||||
|
||||
private Integer resend;
|
||||
|
||||
@JsonManagedReference(value="email-recipient")
|
||||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "email")
|
||||
private List<Recipient> recipients;
|
||||
|
||||
@JsonManagedReference(value="email-attachment")
|
||||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "email")
|
||||
private List<Attachment> attachment;
|
||||
|
||||
@Transient
|
||||
private List<Long> attachmentId = new ArrayList<>();
|
||||
|
||||
@Transient
|
||||
private Boolean isResend;
|
||||
|
||||
public Object clone() throws CloneNotSupportedException
|
||||
{
|
||||
return super.clone();
|
||||
}
|
||||
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
package com.solvway.services.email.model;
|
||||
|
||||
import com.solvway.core.enums.EmailEnum.TemplateStatusType;
|
||||
import jakarta.persistence.*;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@Entity
|
||||
@Table(name="template")
|
||||
public class EmailTemplate {
|
||||
|
||||
public enum Lang {
|
||||
CN("CN"),ZH("ZH"),EN("EN"),MY("MY"),ID("ID");
|
||||
private final String lang;
|
||||
Lang(String lang) {
|
||||
this.lang=lang;
|
||||
}
|
||||
public String getFileLang() {
|
||||
return this.lang;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private String subject;
|
||||
private String name;
|
||||
private String description;
|
||||
private String body;
|
||||
private String doneBy;
|
||||
private LocalDateTime createDateTime;
|
||||
|
||||
@OneToMany(mappedBy = "template")
|
||||
private List<Attachment> attachment;
|
||||
|
||||
@Transient
|
||||
private List<Long> attachmentId = new ArrayList<>();
|
||||
|
||||
@NotNull
|
||||
@Enumerated(EnumType.STRING)
|
||||
private TemplateStatusType status;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private Lang lang;
|
||||
|
||||
@Transient
|
||||
private Object obj;
|
||||
|
||||
|
||||
}
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
package com.solvway.services.email.model;
|
||||
|
||||
import com.solvway.core.enums.EmailEnum.TemplateStatusType;
|
||||
import jakarta.persistence.*;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@Entity
|
||||
@Table(name="template")
|
||||
public class EmailTemplateWithoutAttachment {
|
||||
|
||||
|
||||
public enum Lang {
|
||||
CN("CN"),ZH("ZH"),EN("EN"),MY("MY"),ID("ID");
|
||||
private final String lang;
|
||||
Lang(String lang) {
|
||||
this.lang=lang;
|
||||
}
|
||||
public String getFileLang() {
|
||||
return this.lang;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private String subject;
|
||||
private String name;
|
||||
private String description;
|
||||
private String body;
|
||||
|
||||
@NotNull
|
||||
@Enumerated(EnumType.STRING)
|
||||
private TemplateStatusType status;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private Lang lang;
|
||||
|
||||
@Transient
|
||||
private Object obj;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.solvway.services.email.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonBackReference;
|
||||
import com.solvway.core.enums.EmailEnum.RecipientType;
|
||||
import jakarta.persistence.*;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Setter
|
||||
@Entity
|
||||
public class Recipient implements Cloneable{
|
||||
|
||||
@Getter
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
@Getter
|
||||
@NotNull
|
||||
private String recipient;
|
||||
@Getter
|
||||
@NotNull
|
||||
@Enumerated(EnumType.STRING)
|
||||
private RecipientType type;
|
||||
|
||||
@JsonBackReference(value="email-recipient")
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "email_id", referencedColumnName = "id")
|
||||
private Email email;
|
||||
|
||||
|
||||
public Object clone() throws CloneNotSupportedException {
|
||||
return super.clone();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.solvway.services.email.model;
|
||||
|
||||
import com.solvway.core.converter.ListToJsonColumnConverter;
|
||||
import com.solvway.core.enums.SmsEnum;
|
||||
import com.solvway.core.utils.SnowflakeIdWorker;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@Entity
|
||||
public class Sms {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
@Column(updatable = false)
|
||||
private String uuid = SnowflakeIdWorker.getUUIDStr();
|
||||
private LocalDateTime datetime=LocalDateTime.now();
|
||||
private String recipient;
|
||||
private String content;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private SmsEnum.SmsStatus status=SmsEnum.SmsStatus.P;
|
||||
private int resend;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private SmsEnum.SmsProvider provider = SmsEnum.SmsProvider.SMSS360;
|
||||
@Convert(converter = ListToJsonColumnConverter.class)
|
||||
private List<String> providerResponse = new ArrayList<>();
|
||||
}
|
||||
Reference in new issue
Block a user