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
+21
@@ -0,0 +1,21 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@Entity
|
||||
public class AaStresstest {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private LocalDateTime createDateTime = LocalDateTime.now();
|
||||
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.hibernate.annotations.Fetch;
|
||||
import org.hibernate.annotations.FetchMode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@Entity
|
||||
@Table(name="orders")
|
||||
public class ApproveSalesOrderListing extends OrdersGeneral implements Serializable{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
//MappedBy OrdersDetails.order
|
||||
@OneToMany( fetch = FetchType.EAGER, cascade = {CascadeType.PERSIST, CascadeType.MERGE})
|
||||
@JoinColumn(name = "order_uuid", referencedColumnName = "uuid")
|
||||
@Fetch(value = FetchMode.SUBSELECT)
|
||||
private List<OrdersDetails> details;
|
||||
|
||||
@OneToMany(fetch = FetchType.EAGER, cascade = {CascadeType.PERSIST, CascadeType.MERGE})
|
||||
@JoinColumn(name = "order_uuid", referencedColumnName = "uuid")
|
||||
@Fetch(value = FetchMode.SUBSELECT)
|
||||
private List<OrdersPayments> payments;
|
||||
|
||||
public static long getSerialversionuid() {
|
||||
return serialVersionUID;
|
||||
}
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
public class BeFitInvoiceDto {
|
||||
private String documentNo;
|
||||
private LocalDate transactionDate;
|
||||
private String countryCode;
|
||||
private double grandTotal;
|
||||
private String buyerCode;
|
||||
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.solvway.core.enums.OrderEnum.CreditNoteTrxType;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.hibernate.annotations.Fetch;
|
||||
import org.hibernate.annotations.FetchMode;
|
||||
import org.hibernate.annotations.NotFound;
|
||||
import org.hibernate.annotations.NotFoundAction;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@Entity
|
||||
@Table(name = "credit_note")
|
||||
public class BonusCreditNote{
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private String uuid;
|
||||
private String countryCode;
|
||||
private String branchCode;
|
||||
private String documentNo;
|
||||
private LocalDate bonusDate;
|
||||
private LocalDateTime transactionDateTime;
|
||||
private String bonusDateRemark;
|
||||
//Default to StockReturn as BE mostly use StockReturn not VoidSales
|
||||
@Enumerated(EnumType.STRING)
|
||||
private CreditNoteTrxType trxType = CreditNoteTrxType.SR;
|
||||
private String creditNoteRemarks;
|
||||
private Long stockReturnId;
|
||||
// @Column(name = "order_id")
|
||||
// private Long orderId;
|
||||
private String currencySymbol;
|
||||
private double currencyRate;
|
||||
private double totalAmount;
|
||||
private double roundingAdjustment;
|
||||
private double adminFee;
|
||||
private double grandTotal;
|
||||
private double totalBv;
|
||||
private double totalSv;
|
||||
private LocalDateTime createDateTime;
|
||||
|
||||
//Unidirectional Mapping
|
||||
// @OneToMany(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST, CascadeType.MERGE})
|
||||
// @JoinColumn(name = "credit_note_uuid", referencedColumnName = "uuid")
|
||||
// @NotFound(action = NotFoundAction.IGNORE)
|
||||
// @Fetch(value = FetchMode.SUBSELECT)
|
||||
// private List<CreditNoteTaxation> taxations;
|
||||
@ManyToOne(fetch = FetchType.EAGER)
|
||||
@JoinColumn(name = "order_id", referencedColumnName = "id")
|
||||
@NotFound(action = NotFoundAction.IGNORE)
|
||||
@Fetch(value = FetchMode.SELECT)
|
||||
private BonusOrders order;
|
||||
|
||||
|
||||
}
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.solvway.core.enums.GeneralEnum.CmsPlatform;
|
||||
import com.solvway.core.enums.GeneralEnum.FlagYesNo;
|
||||
import com.solvway.core.enums.OrderEnum.OrderStatus;
|
||||
import com.solvway.core.enums.OrderEnum.TrxType;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@Entity
|
||||
@Table(name = "orders")
|
||||
public class BonusOrders implements Serializable{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private String uuid;
|
||||
private LocalDateTime transactionDateTime;
|
||||
private LocalDate bonusDate;
|
||||
private String countryCode;
|
||||
private String branchCode;
|
||||
private String documentNo;
|
||||
private Long buyerId;
|
||||
private String buyerCode;
|
||||
private double totalAmount;
|
||||
private double totalBv;
|
||||
private double totalSv;
|
||||
private double roundingAdjustment;
|
||||
private double shippingCost;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private TrxType trxType;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private OrderStatus status = OrderStatus.P;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private FlagYesNo voidedFlag = FlagYesNo.N;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private CmsPlatform sourcePlatform = CmsPlatform.BO;
|
||||
|
||||
public static long getSerialversionuid() {
|
||||
return serialVersionUID;
|
||||
}
|
||||
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@Entity
|
||||
@Table(name="orders_details")
|
||||
public class BonusOrdersDetails implements Serializable {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -779692121188489135L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
@Column(name="order_uuid")
|
||||
private String orderUuid;
|
||||
private int qty;
|
||||
// @Convert(converter = JSONColumnConverter.class)
|
||||
// private JSONObject variation;
|
||||
private String virtualProductCode;
|
||||
|
||||
// public JSONObject getVariation() {
|
||||
// return variation;
|
||||
// }
|
||||
//
|
||||
// public void setVariation(JSONObject variation) {
|
||||
// this.variation = variation;
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Entity
|
||||
public class Cart {
|
||||
@Setter
|
||||
@Getter
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
@Setter
|
||||
@Getter
|
||||
private String memberId;
|
||||
@Setter
|
||||
@Getter
|
||||
private String variationId;
|
||||
@Setter
|
||||
@Getter
|
||||
private int quantity;
|
||||
private boolean isSalesKit;
|
||||
@Setter
|
||||
@Getter
|
||||
private LocalDateTime createDateTime;
|
||||
|
||||
public boolean isSalesKit() {
|
||||
return isSalesKit;
|
||||
}
|
||||
public void setSalesKit(boolean isSalesKit) {
|
||||
this.isSalesKit = isSalesKit;
|
||||
}
|
||||
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
public class ChangeDeliveryAddress {
|
||||
private String uuid;
|
||||
private String deliveryGeoLocationId;
|
||||
private String postcode;
|
||||
private String addressDetails;
|
||||
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.solvway.core.enums.GeneralEnum;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
public class CheckInBooth implements Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private long memberUuid;
|
||||
private long eventUuid;
|
||||
private long stockistUuid;
|
||||
private LocalDateTime checkInDateTime = LocalDateTime.now();
|
||||
private LocalDate checkInDate = LocalDate.now();
|
||||
@Enumerated(EnumType.STRING)
|
||||
private GeneralEnum.FlagYesNo enabled = GeneralEnum.FlagYesNo.Y;
|
||||
@Column(updatable = false)
|
||||
private String createBy;
|
||||
private String doneBy;
|
||||
@Column(updatable = false)
|
||||
private LocalDateTime createDateTime = LocalDateTime.now();
|
||||
@Column(updatable = false, insertable = false)
|
||||
private LocalDateTime lastModify = LocalDateTime.now();
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.solvway.core.enums.GeneralEnum;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
public class CheckInEvent {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private long memberUuid;
|
||||
private long eventUuid;
|
||||
private LocalDateTime checkInDateTime = LocalDateTime.now();
|
||||
private LocalDate checkInDate = LocalDate.now();
|
||||
@Enumerated(EnumType.STRING)
|
||||
private GeneralEnum.FlagYesNo enabled = GeneralEnum.FlagYesNo.Y;
|
||||
@Column(updatable = false)
|
||||
private String createBy;
|
||||
private String doneBy;
|
||||
@Column(updatable = false)
|
||||
private LocalDateTime createDateTime = LocalDateTime.now();
|
||||
@Column(updatable = false, insertable = false)
|
||||
private LocalDateTime lastModify = LocalDateTime.now();
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.solvway.core.enums.HierarchyEnum.ConfigCountryType;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
public class ConfigCountry implements Serializable{
|
||||
private static final long serialVersionUID = 1L;
|
||||
private Long id;
|
||||
|
||||
|
||||
private List<TaxationSetup> taxationSetupList = new ArrayList<>();
|
||||
|
||||
private ConfigCountryType type;
|
||||
|
||||
}
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.solvway.core.enums.OrderEnum.CreditNoteTrxType;
|
||||
import com.solvway.core.model.StockReturn;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.hibernate.annotations.Fetch;
|
||||
import org.hibernate.annotations.FetchMode;
|
||||
import org.hibernate.annotations.NotFound;
|
||||
import org.hibernate.annotations.NotFoundAction;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@Entity
|
||||
public class CreditNote implements Serializable{
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private String uuid;
|
||||
private String effectiveBuyerCode;
|
||||
private String countryCode;
|
||||
private String branchCode;
|
||||
private String documentNo;
|
||||
private LocalDate bonusDate;
|
||||
private LocalDateTime transactionDateTime;
|
||||
private String bonusDateRemark;
|
||||
|
||||
//Default to StockReturn as BE mostly use StockReturn not VoidSales
|
||||
@Enumerated(EnumType.STRING)
|
||||
private CreditNoteTrxType trxType = CreditNoteTrxType.SR;
|
||||
private String creditNoteRemarks;
|
||||
@ManyToOne(fetch = FetchType.EAGER)
|
||||
@JoinColumn(name = "order_id", referencedColumnName = "id")
|
||||
@NotFound(action = NotFoundAction.IGNORE)
|
||||
@Fetch(value = FetchMode.SELECT)
|
||||
private Orders order;
|
||||
private Long stockReturnId;
|
||||
private String currencySymbol;
|
||||
private double currencyRate;
|
||||
private double shippingCost;
|
||||
private double totalAmount;
|
||||
private double roundingAdjustment;
|
||||
private double adminFee;
|
||||
private double grandTotal;
|
||||
private double totalBv;
|
||||
private double totalSv;
|
||||
private String doneBy;
|
||||
private String createBy;
|
||||
private LocalDateTime createDateTime;
|
||||
private int printCount;
|
||||
|
||||
//Unidirectional Mapping
|
||||
@OneToMany(fetch = FetchType.EAGER, cascade = {CascadeType.PERSIST, CascadeType.MERGE})
|
||||
@JoinColumn(name = "credit_note_uuid", referencedColumnName = "uuid")
|
||||
@Fetch(value = FetchMode.SUBSELECT)
|
||||
private List<CreditNoteTaxation> taxations;
|
||||
|
||||
@Transient
|
||||
private StockReturn stockReturn;
|
||||
|
||||
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.solvway.core.enums.GeneralEnum.FlagYesNo;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@Entity
|
||||
public class CreditNoteTaxation {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
@Column(name="credit_note_uuid")
|
||||
private String creditNoteUuid;
|
||||
// public Orders getOrder() {
|
||||
// return order;
|
||||
// }
|
||||
// public void setOrder(Orders order) {
|
||||
// this.order = order;
|
||||
// }
|
||||
//@ManyToOne(targetEntity = Orders.class, fetch = FetchType.EAGER)
|
||||
// @ManyToOne(targetEntity = Orders.class)
|
||||
// @JoinColumn(name = "order_uuid", referencedColumnName = "uuid")
|
||||
// @JsonBackReference
|
||||
// private Orders order;
|
||||
private double taxAmount;
|
||||
private String messageTag;
|
||||
private double percentage;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private FlagYesNo inclusive = FlagYesNo.N;
|
||||
private String doneBy;
|
||||
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.hibernate.annotations.Fetch;
|
||||
import org.hibernate.annotations.FetchMode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@Entity
|
||||
@Table(name="orders")
|
||||
public class DailyCollectionReport extends OrdersGeneral implements Serializable{
|
||||
private static final long serialVersionUID = 1L;
|
||||
@OneToMany(fetch = FetchType.EAGER, cascade = {CascadeType.REFRESH})
|
||||
@JoinColumn(name = "order_uuid", referencedColumnName = "uuid")
|
||||
@Fetch(value = FetchMode.SUBSELECT)
|
||||
private List<OrdersPayments> payments;
|
||||
|
||||
public static long getSerialversionuid() {
|
||||
return serialVersionUID;
|
||||
}
|
||||
|
||||
}
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.solvway.core.enums.DeliveryOrderEnum.DeliveryChargesStatus;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
public class DeliveryCharges {
|
||||
|
||||
private long id;
|
||||
|
||||
private String countryFrom;
|
||||
private String countryTo;
|
||||
|
||||
private LocalDateTime effectiveDate;
|
||||
|
||||
private String description;
|
||||
private String courierName;
|
||||
private String currencySymbol;
|
||||
private boolean freeDeliveryCharges;
|
||||
private DeliveryChargesStatus status;
|
||||
|
||||
private boolean useFlatRate;
|
||||
private DeliveryFlatRateCharges flatRateCharges;
|
||||
|
||||
private boolean useWeight;
|
||||
private DeliveryWeightCharges weightCharges;
|
||||
|
||||
private boolean useVolume;
|
||||
private DeliveryVolumeCharges volumeCharges;
|
||||
|
||||
private boolean usePackaging;
|
||||
private DeliveryPackagingCharges packagingCharges;
|
||||
|
||||
private List<DeliveryChargesZone> zones;
|
||||
private List<PickupPointType> types;
|
||||
|
||||
private String createby;
|
||||
private LocalDateTime createDateTime;
|
||||
|
||||
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
public class DeliveryChargesCampaign {
|
||||
|
||||
private long id;
|
||||
private LocalDateTime effectiveDateFrom;
|
||||
private LocalDateTime effectiveDateTo;
|
||||
private String geoLocationId;
|
||||
private double priceApply;
|
||||
private double discountRate;
|
||||
private String status;
|
||||
private LocalDateTime createDateTime;
|
||||
private String createBy;
|
||||
|
||||
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.solvway.core.enums.DeliveryOrderEnum.DeliveryChargesStatus;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
public class DeliveryChargesZone {
|
||||
|
||||
|
||||
private long id;
|
||||
private String geoLocationId;
|
||||
private DeliveryChargesStatus status;
|
||||
|
||||
private DeliveryCharges deliveryCharges;
|
||||
|
||||
public DeliveryChargesZone() {
|
||||
|
||||
}
|
||||
|
||||
public DeliveryChargesZone(DeliveryCharges deliveryCharges) {
|
||||
this.deliveryCharges = deliveryCharges;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
public class DeliveryFlatRateCharges {
|
||||
|
||||
|
||||
private long id;
|
||||
|
||||
private DeliveryCharges deliveryCharges;
|
||||
|
||||
@Getter
|
||||
public enum FlatRateBaseType{
|
||||
B("BV"),S("SV"), P("PRICE");
|
||||
private final String type;
|
||||
FlatRateBaseType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private FlatRateBaseType flatRateBaseType;
|
||||
private double onlyApplyToAmountBelow;
|
||||
private double flatRateCharges;
|
||||
|
||||
public DeliveryFlatRateCharges() {
|
||||
|
||||
}
|
||||
|
||||
public DeliveryFlatRateCharges(DeliveryCharges deliveryCharges) {
|
||||
this.deliveryCharges = deliveryCharges;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.solvway.core.enums.DeliveryOrderEnum.DeliveryChargesStatus;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
public class DeliveryPackagingCharges {
|
||||
|
||||
|
||||
private long id;
|
||||
|
||||
private DeliveryCharges deliveryCharges;
|
||||
|
||||
private List<DeliveryPackagingChargesRange> deliveryPackagingChargesRange;
|
||||
|
||||
private DeliveryChargesStatus status;
|
||||
|
||||
public DeliveryPackagingCharges() {
|
||||
|
||||
}
|
||||
|
||||
public DeliveryPackagingCharges(DeliveryCharges deliveryCharges) {
|
||||
this.setDeliveryCharges(deliveryCharges);
|
||||
}
|
||||
|
||||
public void addDeliveryPackagingChargesRange(DeliveryPackagingChargesRange... deliveryPackagingChargesRange) {
|
||||
|
||||
if(this.deliveryPackagingChargesRange == null) {
|
||||
this.deliveryPackagingChargesRange = new ArrayList<>();
|
||||
}
|
||||
|
||||
this.deliveryPackagingChargesRange.addAll(Stream.of(deliveryPackagingChargesRange).collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
public class DeliveryPackagingChargesRange {
|
||||
|
||||
|
||||
private long id;
|
||||
private double rangeFrom;
|
||||
private double rangeTo;
|
||||
private double charges;
|
||||
|
||||
private DeliveryPackagingCharges deliveryPackagingCharges;
|
||||
|
||||
|
||||
public DeliveryPackagingChargesRange() {}
|
||||
|
||||
public DeliveryPackagingChargesRange(DeliveryPackagingCharges deliveryPackagingCharges) {
|
||||
this.deliveryPackagingCharges = deliveryPackagingCharges;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import jakarta.persistence.EnumType;
|
||||
import jakarta.persistence.Enumerated;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
public class DeliveryVolumeCharges {
|
||||
|
||||
private long id;
|
||||
private DeliveryCharges deliveryCharges;
|
||||
|
||||
/**
|
||||
* Type 1 is only apply when hit certain Volume
|
||||
* <br>
|
||||
* Type 2 is first certain Volume, and subsequent Volume charge
|
||||
*/
|
||||
@Getter
|
||||
public enum VolumeType{
|
||||
T1("TYPE1"), T2("TYPE2");
|
||||
private final String type;
|
||||
VolumeType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private VolumeType volumeType;
|
||||
|
||||
// for type 1
|
||||
private double onlyApplyToVolumeMoreThan;
|
||||
private double chargesType1;
|
||||
|
||||
// for type 2
|
||||
private double firstVolume;
|
||||
private double firstVolumeCharges;
|
||||
private double subSequentVolume;
|
||||
private double subSequentVolumeCharges;
|
||||
|
||||
public DeliveryVolumeCharges() {
|
||||
|
||||
}
|
||||
public DeliveryVolumeCharges(DeliveryCharges deliveryCharges) {
|
||||
this.deliveryCharges = deliveryCharges;
|
||||
}
|
||||
|
||||
public VolumeType getVolume() {
|
||||
return volumeType;
|
||||
}
|
||||
public void setVolume(VolumeType volumeType) {
|
||||
this.volumeType = volumeType;
|
||||
}
|
||||
|
||||
}
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
public class DeliveryWeightCharges {
|
||||
|
||||
private long id;
|
||||
|
||||
private DeliveryCharges deliveryCharges;
|
||||
|
||||
/**
|
||||
* Type 1 is only apply when hit certain weight
|
||||
* <br>
|
||||
* Type 2 is first certain weight, and subsequent weight charge
|
||||
*/
|
||||
@Getter
|
||||
public enum WeightType{
|
||||
T1("TYPE1"), T2("TYPE2");
|
||||
private final String type;
|
||||
WeightType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
|
||||
private WeightType weightType;
|
||||
|
||||
// for type 1
|
||||
private double onlyApplyToWeightMoreThan;
|
||||
private double chargesType1;
|
||||
|
||||
// for type 2
|
||||
private double firstWeight;
|
||||
private double firstWeightCharges;
|
||||
private double subSequentWeight;
|
||||
private double subSequentWeightCharges;
|
||||
|
||||
|
||||
public DeliveryWeightCharges() {
|
||||
|
||||
}
|
||||
|
||||
public DeliveryWeightCharges(DeliveryCharges deliveryCharges) {
|
||||
this.setDeliveryCharges(deliveryCharges);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.solvway.core.enums.OrderEnum.CreditNoteTrxType;
|
||||
import com.solvway.core.model.StockReturn;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.data.annotation.Id;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
public class DocCreditNote {
|
||||
@Id
|
||||
private String id;
|
||||
private String uuid;
|
||||
private String effectiveBuyerCode;
|
||||
private String documentNo;
|
||||
private LocalDate bonusDate;
|
||||
private LocalDateTime transactionDateTime;
|
||||
private LocalDateTime createDateTime = LocalDateTime.now();
|
||||
private DocOrder order;
|
||||
private StockReturn stockReturn;
|
||||
//Default to StockReturn as BE mostly use StockReturn not VoidSales
|
||||
private CreditNoteTrxType trxType = CreditNoteTrxType.SR;
|
||||
private String creditNoteRemarks;
|
||||
private String doneBy;
|
||||
private String createBy;
|
||||
|
||||
private String currencySymbol;
|
||||
private double currencyRate;
|
||||
private double shippingCost;
|
||||
private double totalAmount;
|
||||
private double roundingAdjustment;
|
||||
private double adminFee;
|
||||
private double grandTotal;
|
||||
private double totalBv;
|
||||
private double totalSv;
|
||||
|
||||
private List<Object> taxations;
|
||||
|
||||
public String getCurrencySymbolDisplay() {
|
||||
if(StringUtils.isEmpty(this.currencySymbol)) {
|
||||
return "";
|
||||
}else {
|
||||
return " ("+this.currencySymbol+")";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+125
@@ -0,0 +1,125 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import com.solvway.core.enums.GeneralEnum.CmsPlatform;
|
||||
import com.solvway.core.enums.GeneralEnum.FlagYesNo;
|
||||
import com.solvway.core.enums.OrderEnum;
|
||||
import com.solvway.core.enums.OrderEnum.BuyerType;
|
||||
import com.solvway.core.enums.OrderEnum.TrxType;
|
||||
import com.solvway.core.enums.PaymentEnum.PaymentTerm;
|
||||
import com.solvway.core.model.Buyer;
|
||||
import com.solvway.core.model.PickupPointOsn;
|
||||
import com.solvway.services.counter.util.converter.PickupPointOsnColumnConverter;
|
||||
import jakarta.persistence.Convert;
|
||||
import jakarta.persistence.EnumType;
|
||||
import jakarta.persistence.Enumerated;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.data.annotation.Id;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
public class DocOrder implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
private String id;
|
||||
private String uuid;
|
||||
private LocalDateTime transactionDateTime;
|
||||
private LocalDate bonusDate;
|
||||
private String countryCode;
|
||||
private String branchCode;
|
||||
private String invoicePrefix;
|
||||
private String documentNo;
|
||||
private String currencySymbol;
|
||||
private double currencyRate;
|
||||
private double totalAmount;
|
||||
private double totalDiscount;
|
||||
|
||||
private double grandTotal;
|
||||
|
||||
private double totalBv;
|
||||
private double totalSv;
|
||||
private double roundingAdjustment;
|
||||
private Long buyerId;
|
||||
private String buyerCode;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private BuyerType buyerType = BuyerType.G;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private TrxType trxType;
|
||||
private LocalDateTime createDate = LocalDateTime.now();
|
||||
private LocalDateTime createDateTime = LocalDateTime.now();
|
||||
//@Convert(converter = JSONColumnConverter.class)
|
||||
private String location;
|
||||
private List<Object> details;
|
||||
private List<Object> payments;
|
||||
private List<Object> taxations;
|
||||
private Buyer buyer;
|
||||
private String buyerAddress="";
|
||||
|
||||
private String selfServiceId;
|
||||
private String doneBy;
|
||||
private String createBy;
|
||||
private String remark;
|
||||
private String paymentRemark;
|
||||
private String paymentReference;
|
||||
private String prvNo;
|
||||
private String invoiceHeader;
|
||||
private String invoiceFooter;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private PaymentTerm paymentTerm = PaymentTerm.PF;
|
||||
//For Void Sales
|
||||
@Enumerated(EnumType.STRING)
|
||||
private FlagYesNo voidedFlag = FlagYesNo.N;
|
||||
private String voidedReason="";
|
||||
private String voidedBy;
|
||||
private LocalDateTime voidedDateTime;
|
||||
private List<JsonObject> backOrderSummary;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private CmsPlatform sourcePlatform = CmsPlatform.BO;
|
||||
|
||||
//for delivery & pickup
|
||||
private double shippingCost;
|
||||
private double totalWeight;
|
||||
private boolean deliveryOption;
|
||||
private String receiver;
|
||||
private String contactNo;
|
||||
private String deliveryGeoLocationId;
|
||||
private String addressDetails;
|
||||
private String postcode;
|
||||
private boolean pickupOption;
|
||||
private String pickupPoint;
|
||||
private String pickupPointLocation;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private FlagYesNo fromEmrm = FlagYesNo.N;
|
||||
private String town;
|
||||
@Convert(converter = PickupPointOsnColumnConverter.class)
|
||||
private PickupPointOsn pickupPointOsn;
|
||||
private LocalDate pickupDate;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private OrderEnum.OsnPickupSlot pickupSlot = OrderEnum.OsnPickupSlot.NA;
|
||||
private int pickupPointOption;
|
||||
|
||||
//STOCKIST
|
||||
private double stockistDepositBalance;
|
||||
|
||||
private String copy;
|
||||
|
||||
private String promotionCode;
|
||||
|
||||
public String getCurrencySymbolDisplay() {
|
||||
if(StringUtils.isEmpty(this.currencySymbol)) {
|
||||
return "";
|
||||
}else {
|
||||
return " ("+this.currencySymbol+")";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.solvway.core.enums.GeneralEnum;
|
||||
import com.solvway.core.utils.SnowflakeIdWorker;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Entity
|
||||
@Getter
|
||||
@Setter
|
||||
public class Event implements Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
@Column(updatable = false)
|
||||
private long uuid = SnowflakeIdWorker.getUUID();
|
||||
private String name;
|
||||
private String location;
|
||||
private LocalDateTime dateStart;
|
||||
private LocalDateTime dateEnd;
|
||||
private String uploadFloorPlan;
|
||||
private String uploadStageActivities;
|
||||
private String uploadLuckyDraw;
|
||||
private String uploadTasteRewards;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private GeneralEnum.FlagYesNo enabled = GeneralEnum.FlagYesNo.Y;
|
||||
@Column(updatable = false)
|
||||
private String createBy;
|
||||
private String doneBy;
|
||||
@Column(updatable = false)
|
||||
private LocalDateTime createDateTime = LocalDateTime.now();
|
||||
@Column(updatable = false, insertable = false)
|
||||
private LocalDateTime lastModify = LocalDateTime.now();
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.solvway.core.enums.OrderEnum;
|
||||
import com.solvway.core.utils.SnowflakeIdWorker;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
public class EventAttendance {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
@Column(updatable = false)
|
||||
private BigInteger uuid = SnowflakeIdWorker.getUUIDBi();
|
||||
private BigInteger ownerUuid;
|
||||
private long eventUuid;
|
||||
private LocalDateTime actionDateTime = LocalDateTime.now();
|
||||
@Enumerated(EnumType.STRING)
|
||||
private OrderEnum.EventAttendanceType attendanceType = OrderEnum.EventAttendanceType.NA;
|
||||
@Column(updatable = false)
|
||||
private String createBy;
|
||||
private String doneBy;
|
||||
@Column(updatable = false)
|
||||
private LocalDateTime createDateTime = LocalDateTime.now();
|
||||
@Column(updatable = false, insertable = false)
|
||||
private LocalDateTime lastModify = LocalDateTime.now();
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.solvway.core.enums.GeneralEnum;
|
||||
import com.solvway.core.utils.SnowflakeIdWorker;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
public class EventBooth {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
@Column(updatable = false)
|
||||
private long uuid = SnowflakeIdWorker.getUUID();
|
||||
@Column(updatable = false)
|
||||
private long eventUuid;
|
||||
@Column(updatable = false)
|
||||
private long stockistUuid;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private GeneralEnum.FlagYesNo welcomeGift = GeneralEnum.FlagYesNo.Y;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private GeneralEnum.FlagYesNo welcomeGiftDailyBasis = GeneralEnum.FlagYesNo.Y;
|
||||
private int welcomeGiftMaxPerUser=0;
|
||||
private int welcomeGiftDailyCap=0;
|
||||
private int welcomeGiftEventCap=0;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private GeneralEnum.FlagYesNo enabled = GeneralEnum.FlagYesNo.Y;
|
||||
@Column(updatable = false)
|
||||
private String createBy;
|
||||
private String doneBy;
|
||||
@Column(updatable = false)
|
||||
private LocalDateTime createDateTime = LocalDateTime.now();
|
||||
@Column(updatable = false, insertable = false)
|
||||
private LocalDateTime lastModify = LocalDateTime.now();
|
||||
|
||||
@Transient
|
||||
private String stockistName;
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.solvway.core.enums.GeneralEnum;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Entity
|
||||
@Getter
|
||||
@Setter
|
||||
public class EventGiftWithPurchase {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private long eventUuid;
|
||||
private long memberUuid;
|
||||
private int redeemedCount;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private GeneralEnum.FlagYesNo enabled = GeneralEnum.FlagYesNo.Y;
|
||||
@Column(updatable = false)
|
||||
private String createBy;
|
||||
private String doneBy;
|
||||
@Column(updatable = false)
|
||||
private LocalDateTime createDateTime = LocalDateTime.now();
|
||||
@Column(updatable = false, insertable = false)
|
||||
private LocalDateTime lastModify = LocalDateTime.now();
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.solvway.core.enums.GeneralEnum;
|
||||
import com.solvway.core.utils.SnowflakeIdWorker;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Entity
|
||||
@Getter
|
||||
@Setter
|
||||
public class EventLuckyDrawTicket {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
@Column(updatable = false)
|
||||
private long uuid = SnowflakeIdWorker.getUUID();
|
||||
private Long eventUuid;
|
||||
private Long receiptUuid;
|
||||
private Long memberUuid;
|
||||
private String memberCode;
|
||||
private String ticketNumber;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private GeneralEnum.FlagYesNo enabled = GeneralEnum.FlagYesNo.Y;
|
||||
@Column(updatable = false)
|
||||
private String createBy;
|
||||
private String doneBy;
|
||||
@Column(updatable = false)
|
||||
private LocalDateTime createDateTime = LocalDateTime.now();
|
||||
@Column(updatable = false, insertable = false)
|
||||
private LocalDateTime lastModify = LocalDateTime.now();
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.solvway.core.enums.GeneralEnum;
|
||||
import com.solvway.core.utils.SnowflakeIdWorker;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
public class EventProduct {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
@Column(updatable = false)
|
||||
private BigInteger uuid = SnowflakeIdWorker.getUUIDBi();
|
||||
private BigInteger eventUuid;
|
||||
private String displayName;
|
||||
private String uploadPath;
|
||||
private double costAmount;
|
||||
private String addOnCostLabel;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private GeneralEnum.FlagYesNo enabled = GeneralEnum.FlagYesNo.Y;
|
||||
@Column(updatable = false)
|
||||
private String createBy;
|
||||
private String doneBy;
|
||||
@Column(updatable = false)
|
||||
private LocalDateTime createDateTime = LocalDateTime.now();
|
||||
@Column(updatable = false, insertable = false)
|
||||
private LocalDateTime lastModify = LocalDateTime.now();
|
||||
// Computed available stock (ledger balance − frozen) for the store feed.
|
||||
// Not persisted; populated only on the store-facing findByEventUuid path.
|
||||
@Transient
|
||||
private int stockBalance;
|
||||
}
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.solvway.core.converter.ListToJsonColumnConverter;
|
||||
import com.solvway.core.enums.OrderEnum;
|
||||
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;
|
||||
|
||||
@Entity
|
||||
@Getter
|
||||
@Setter
|
||||
public class EventReceipt {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
@Column(updatable = false)
|
||||
private long uuid = SnowflakeIdWorker.getUUID();
|
||||
private long eventUuid;
|
||||
private long memberUuid;
|
||||
private String memberCode;
|
||||
private LocalDateTime uploadDateTime;
|
||||
@Convert(converter = ListToJsonColumnConverter.class)
|
||||
private List<String> uploadPath = new ArrayList<>();
|
||||
private double purchaseAmount;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private OrderEnum.EventReceiptReviewStatus reviewStatus = OrderEnum.EventReceiptReviewStatus.P;
|
||||
private String reviewRemarks;
|
||||
private String reviewedBy;
|
||||
private LocalDateTime reviewedDateTime;
|
||||
@Column(updatable = false)
|
||||
private String createBy;
|
||||
private String doneBy;
|
||||
@Column(updatable = false)
|
||||
private LocalDateTime createDateTime = LocalDateTime.now();
|
||||
@Column(updatable = false, insertable = false)
|
||||
private LocalDateTime lastModify = LocalDateTime.now();
|
||||
|
||||
@Transient
|
||||
private String displayEventName;
|
||||
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.solvway.core.enums.GeneralEnum;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Entity
|
||||
@Setter
|
||||
@Getter
|
||||
public class EventReceiptDetail {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private BigInteger uuid;
|
||||
private BigInteger eventUuid;
|
||||
private BigInteger memberUuid;
|
||||
private BigInteger eventReceiptUuid;
|
||||
private BigInteger stockistUuid;
|
||||
private String stockistName;
|
||||
private double amount;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private GeneralEnum.FlagYesNo enabled = GeneralEnum.FlagYesNo.Y;
|
||||
@Column(updatable = false)
|
||||
private LocalDateTime createDateTime = LocalDateTime.now();
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.solvway.core.enums.OrderEnum;
|
||||
import com.solvway.core.utils.SnowflakeIdWorker;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Entity
|
||||
@Getter
|
||||
@Setter
|
||||
public class EventRedeemCode implements Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
@Column(updatable = false)
|
||||
private long uuid = SnowflakeIdWorker.getUUID();
|
||||
private long eventUuid;
|
||||
private long stockistUuid;
|
||||
private long memberUuid;
|
||||
private String redeemCode;
|
||||
private String name;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private OrderEnum.EventRedeemCodeStatus redeemStatus = OrderEnum.EventRedeemCodeStatus.Y;
|
||||
private LocalDateTime redeemedDateTime;
|
||||
private LocalDateTime expiryDateTime;
|
||||
@Column(updatable = false)
|
||||
private String createBy;
|
||||
private String doneBy;
|
||||
@Column(updatable = false)
|
||||
private LocalDateTime createDateTime = LocalDateTime.now();
|
||||
@Column(updatable = false, insertable = false)
|
||||
private LocalDateTime lastModify = LocalDateTime.now();
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.solvway.core.utils.SnowflakeIdWorker;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
public class EventRewardPlus {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
@Column(updatable = false)
|
||||
private BigInteger uuid = SnowflakeIdWorker.getUUIDBi();
|
||||
private BigInteger ownerUuid;
|
||||
private BigInteger eventUuid;
|
||||
private LocalDateTime transactionDateTime;
|
||||
private double totalAmount;
|
||||
@Column(updatable = false)
|
||||
private String createBy;
|
||||
private String doneBy;
|
||||
@Column(updatable = false)
|
||||
private LocalDateTime createDateTime = LocalDateTime.now();
|
||||
@Column(updatable = false, insertable = false)
|
||||
private LocalDateTime lastModify = LocalDateTime.now();
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.solvway.core.utils.SnowflakeIdWorker;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.math.BigInteger;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
public class EventRewardPlusDetail {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
@Column(updatable = false)
|
||||
private BigInteger uuid = SnowflakeIdWorker.getUUIDBi();
|
||||
private BigInteger parentUuid;
|
||||
private BigInteger productUuid;
|
||||
private String productJson;
|
||||
private int quantity;
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@Entity
|
||||
public class HistoryBuyer {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private String orderId;
|
||||
private String documentNo;
|
||||
private String uuid;
|
||||
private String buyerId;
|
||||
private String buyerCode;
|
||||
private String newBuyerId;
|
||||
private String newBuyerCode;
|
||||
private String newBuyer;
|
||||
private String doneBy;
|
||||
private LocalDateTime createDateTime;
|
||||
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@Entity
|
||||
public class HistoryCreditNoteBonusDate {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private String orderId;
|
||||
private String documentNo;
|
||||
private String orderDocumentNo;
|
||||
private String uuid;
|
||||
private LocalDate oldBonusDate;
|
||||
private LocalDate newBonusDate;
|
||||
private String doneBy;
|
||||
private LocalDateTime createDateTime;
|
||||
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.solvway.core.converter.JSONColumnConverter;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@Entity
|
||||
public class HistoryOrderBonusDate {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private String orderId;
|
||||
private String documentNo;
|
||||
private String uuid;
|
||||
private LocalDate oldBonusDate;
|
||||
private LocalDate newBonusDate;
|
||||
private String bonusDateRemark;
|
||||
private String doneBy;
|
||||
private LocalDateTime createDateTime;
|
||||
@Convert(converter = JSONColumnConverter.class)
|
||||
private JSONObject buyer;
|
||||
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@Entity
|
||||
public class HistoryOrderSalesStatus {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private String orderId;
|
||||
private String documentNo;
|
||||
private String uuid;
|
||||
private String doneBy;
|
||||
private String oldStatus;
|
||||
private String newStatus;
|
||||
private String statusRemark;
|
||||
private LocalDateTime createDateTime;
|
||||
private String buyerId;
|
||||
private String buyerCode;
|
||||
private String buyerName;
|
||||
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@Entity
|
||||
public class HistoryOrderTransactionDateTime {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private String orderId;
|
||||
private String uuid;
|
||||
private LocalDateTime transactionDateTime;
|
||||
private LocalDateTime newTransactionDateTime;
|
||||
private String remarks;
|
||||
private LocalDateTime createDateTime;
|
||||
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonBackReference;
|
||||
import com.solvway.core.converter.JSONColumnConverter;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@Entity
|
||||
@Table(name="orders_details")
|
||||
public class IssueDoDetailsListing {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
//@ManyToOne(targetEntity = Orders.class, fetch = FetchType.EAGER)
|
||||
@ManyToOne(targetEntity = IssueDoListing.class)
|
||||
@JoinColumn(name = "order_uuid", referencedColumnName = "uuid")
|
||||
@JsonBackReference
|
||||
// @Fetch(value = FetchMode.JOIN)
|
||||
private IssueDoListing order;
|
||||
|
||||
@Convert(converter = JSONColumnConverter.class)
|
||||
@Column(name="variation")
|
||||
private JSONObject variation;
|
||||
|
||||
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonBackReference;
|
||||
import com.solvway.core.converter.JSONColumnConverter;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@Entity
|
||||
@Table(name="orders_details")
|
||||
public class IssueDoDetailsListingWithDetails {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
//@ManyToOne(targetEntity = Orders.class, fetch = FetchType.EAGER)
|
||||
@ManyToOne(targetEntity = IssueDoListingWithDetails.class)
|
||||
@JoinColumn(name = "order_uuid", referencedColumnName = "uuid")
|
||||
@JsonBackReference
|
||||
// @Fetch(value = FetchMode.JOIN)
|
||||
private IssueDoListingWithDetails order;
|
||||
|
||||
@Convert(converter = JSONColumnConverter.class)
|
||||
@Column(name="variation")
|
||||
private JSONObject variation;
|
||||
private int qty;
|
||||
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.solvway.core.converter.JSONColumnConverter;
|
||||
import com.solvway.core.enums.GeneralEnum.CmsPlatform;
|
||||
import com.solvway.core.enums.GeneralEnum.FlagYesNo;
|
||||
import com.solvway.core.enums.OrderEnum.OrderStatus;
|
||||
import com.solvway.core.enums.OrderEnum.TrxType;
|
||||
import com.solvway.services.counter.model.Orders.DeliveryOrderStatus;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@Entity
|
||||
@Table(name="orders")
|
||||
public class IssueDoListing implements Serializable{
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -1532039841311264838L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private String uuid;
|
||||
private String documentNo;
|
||||
private String buyerCode;
|
||||
@Convert(converter = JSONColumnConverter.class)
|
||||
private JSONObject buyer;
|
||||
private LocalDateTime transactionDateTime;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private OrderStatus status = OrderStatus.P;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private DeliveryOrderStatus deliveryOrderStatus = DeliveryOrderStatus.PE;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private FlagYesNo voidedFlag;
|
||||
private String countryCode;
|
||||
private String branchCode;
|
||||
private String location;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private TrxType trxType;
|
||||
private String doneBy;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private FlagYesNo stockistSalesApproval = FlagYesNo.N;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private CmsPlatform sourcePlatform = CmsPlatform.BO;
|
||||
|
||||
private String deliveryGeoLocationId;
|
||||
private String postcode;
|
||||
|
||||
// @Fetch(value = FetchMode.JOIN)
|
||||
@OneToMany(cascade = CascadeType.ALL,mappedBy = "order",fetch = FetchType.LAZY)
|
||||
@JsonIgnore
|
||||
private List<IssueDoDetailsListing> details;
|
||||
|
||||
|
||||
}
|
||||
+86
@@ -0,0 +1,86 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.solvway.core.converter.JSONColumnConverter;
|
||||
import com.solvway.core.enums.GeneralEnum.CmsPlatform;
|
||||
import com.solvway.core.enums.GeneralEnum.FlagYesNo;
|
||||
import com.solvway.core.enums.OrderEnum.OrderStatus;
|
||||
import com.solvway.core.enums.OrderEnum.TrxType;
|
||||
import com.solvway.services.counter.model.Orders.DeliveryOrderStatus;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Entity
|
||||
@Table(name="orders")
|
||||
public class IssueDoListingWithDetails implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -1532039841311264838L;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
@Setter
|
||||
@Getter
|
||||
private String uuid;
|
||||
@Setter
|
||||
@Getter
|
||||
private String documentNo;
|
||||
@Setter
|
||||
@Getter
|
||||
private String buyerCode;
|
||||
@Setter
|
||||
@Getter
|
||||
@Convert(converter = JSONColumnConverter.class)
|
||||
private JSONObject buyer;
|
||||
@Setter
|
||||
@Getter
|
||||
private LocalDateTime transactionDateTime;
|
||||
@Setter
|
||||
@Getter
|
||||
@Enumerated(EnumType.STRING)
|
||||
private OrderStatus status = OrderStatus.P;
|
||||
@Setter
|
||||
@Getter
|
||||
@Enumerated(EnumType.STRING)
|
||||
private DeliveryOrderStatus deliveryOrderStatus = DeliveryOrderStatus.PE;
|
||||
@Setter
|
||||
@Getter
|
||||
@Enumerated(EnumType.STRING)
|
||||
private FlagYesNo voidedFlag;
|
||||
@Setter
|
||||
@Getter
|
||||
private String countryCode;
|
||||
@Setter
|
||||
@Getter
|
||||
private String branchCode;
|
||||
@Setter
|
||||
@Getter
|
||||
private String location;
|
||||
@Setter
|
||||
@Getter
|
||||
@Enumerated(EnumType.STRING)
|
||||
private TrxType trxType;
|
||||
@Setter
|
||||
@Getter
|
||||
private String doneBy;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private final FlagYesNo stockistSalesApproval = FlagYesNo.N;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private final CmsPlatform sourcePlatform = CmsPlatform.BO;
|
||||
|
||||
// @Fetch(value = FetchMode.JOIN)
|
||||
@Setter
|
||||
@Getter
|
||||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "order", fetch = FetchType.LAZY)
|
||||
private List<IssueDoDetailsListingWithDetails> details;
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
public class MTDSalesAnalysis {
|
||||
|
||||
private LinkedHashMap<String, MonthlySalesRpt> salesRptMap = new LinkedHashMap<>();
|
||||
private List<String> countryCodeKey;
|
||||
private List<String> dateKey;
|
||||
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@Entity
|
||||
public class MainCart {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private String countryId;
|
||||
private String memberId;
|
||||
private String buyerCode;
|
||||
private String buyerId;
|
||||
private String trxnType;
|
||||
private String prvNo;
|
||||
private LocalDateTime createDateTime;
|
||||
|
||||
}
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.solvway.core.enums.GeneralEnum.FlagYesNo;
|
||||
import com.solvway.core.utils.SnowflakeIdWorker;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Entity
|
||||
@Getter
|
||||
@Setter
|
||||
public class MemberVoucher implements Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
@Column(updatable = false)
|
||||
private long uuid = SnowflakeIdWorker.getUUID();
|
||||
private String name;
|
||||
private String description;
|
||||
private String currencySymbol = "RM";
|
||||
/** Stored image path for the voucher; presigned before reaching members. Optional/nullable. */
|
||||
private String uploadPath;
|
||||
private double amount;
|
||||
/** Total redemptions allowed across all members. Null means unlimited. */
|
||||
private Integer redemptionLimit;
|
||||
/**
|
||||
* How many members have redeemed this voucher. Display-only and never a column: the number is
|
||||
* derived by counting redemption rows, and only findAll() fills it in.
|
||||
*/
|
||||
@Transient
|
||||
private int redeemedCount;
|
||||
private LocalDateTime effectiveFrom;
|
||||
private LocalDateTime effectiveTo;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private FlagYesNo active = FlagYesNo.Y;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private FlagYesNo requireCompleteProfile = FlagYesNo.Y;
|
||||
@Column(updatable = false)
|
||||
private String createBy;
|
||||
private String doneBy;
|
||||
@Column(updatable = false)
|
||||
private LocalDateTime createDateTime = LocalDateTime.now();
|
||||
@Column(updatable = false, insertable = false)
|
||||
private LocalDateTime lastModify = LocalDateTime.now();
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.solvway.core.utils.SnowflakeIdWorker;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Entity
|
||||
@Table(uniqueConstraints = @UniqueConstraint(
|
||||
name = "uk_member_voucher_redemption_voucher_member",
|
||||
columnNames = {"voucher_uuid", "member_uuid"}))
|
||||
@Getter
|
||||
@Setter
|
||||
public class MemberVoucherRedemption implements Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
@Column(updatable = false)
|
||||
private long uuid = SnowflakeIdWorker.getUUID();
|
||||
@Column(updatable = false)
|
||||
private long voucherUuid;
|
||||
@Column(updatable = false)
|
||||
private long memberUuid;
|
||||
private LocalDateTime redeemedDateTime = LocalDateTime.now();
|
||||
private String doneBy;
|
||||
private String channel;
|
||||
@Column(updatable = false)
|
||||
private String createBy;
|
||||
@Column(updatable = false)
|
||||
private LocalDateTime createDateTime = LocalDateTime.now();
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
public class Message implements Serializable{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -3156617923281222274L;
|
||||
private long id;
|
||||
private String code;
|
||||
private String content;
|
||||
private String description;
|
||||
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.springframework.data.annotation.Id;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
public class MongoConnection {
|
||||
@Id
|
||||
private String id;
|
||||
private LocalDateTime transactionDateTime;
|
||||
|
||||
public MongoConnection() {
|
||||
this.transactionDateTime = LocalDateTime.now();
|
||||
}
|
||||
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
public class MonthlySMPBOSalesRpt {
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
public class SmpBoSalesRpt {
|
||||
private String country;
|
||||
private String branch;
|
||||
private String salesItemCode;
|
||||
private String description;
|
||||
private int totalQty;
|
||||
private double unitPrice;
|
||||
private double bv;
|
||||
private double sv;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
public class SmpBoDeliveryFeeRpt {
|
||||
private String country;
|
||||
private String branch;
|
||||
private double totalBv;
|
||||
private double totalSv;
|
||||
private double deliveryFee;
|
||||
private double totalPrice;
|
||||
|
||||
}
|
||||
|
||||
List<SmpBoSalesRpt> tradingSalesRpt;
|
||||
List<SmpBoSalesRpt> prvSalesRpt;
|
||||
List<SmpBoSalesRpt> nonTradingSalesRpt;
|
||||
List<SmpBoDeliveryFeeRpt> deliveryFeeRpt;
|
||||
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
public class MonthlySalesRpt {
|
||||
private double totalBv;
|
||||
private double totalSv;
|
||||
private double grandTotal;
|
||||
private int mbrCount;
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
public class MonthlySalesSummary {
|
||||
|
||||
private LinkedHashMap<String, MonthlySalesRpt> salesRptMap = new LinkedHashMap<>();
|
||||
private List<String> countryCodeKey;
|
||||
private List<String> dateKey;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.hibernate.annotations.Fetch;
|
||||
import org.hibernate.annotations.FetchMode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@Entity
|
||||
public class Orders extends OrdersGeneral implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Getter
|
||||
public enum DeliveryOrderStatus{
|
||||
PE("PENDING"), PA("PARTIAL"), CO("COMPLETE"), SS("SELF_SERVICE");
|
||||
private final String name;
|
||||
DeliveryOrderStatus(String name) {
|
||||
this.name=name;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//MappedBy OrdersDetails.order
|
||||
@OneToMany( fetch = FetchType.EAGER, cascade = {CascadeType.PERSIST, CascadeType.MERGE})
|
||||
@JoinColumn(name = "order_uuid", referencedColumnName = "uuid")
|
||||
@Fetch(value = FetchMode.SUBSELECT)
|
||||
private List<OrdersDetails> details;
|
||||
|
||||
//MappedBy OrdersPayments.order
|
||||
// @OneToMany(mappedBy = "order", fetch = FetchType.EAGER, cascade = {CascadeType.PERSIST, CascadeType.MERGE})
|
||||
@OneToMany(fetch = FetchType.EAGER, cascade = {CascadeType.PERSIST, CascadeType.MERGE})
|
||||
@JoinColumn(name = "order_uuid", referencedColumnName = "uuid")
|
||||
@Fetch(value = FetchMode.SUBSELECT)
|
||||
private List<OrdersPayments> payments;
|
||||
|
||||
public void addDetail(OrdersDetails detail) {
|
||||
if(this.details==null) {
|
||||
this.details = new ArrayList<>();
|
||||
}
|
||||
this.details.add(detail);
|
||||
}
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.solvway.core.converter.JSONColumnConverter;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.hibernate.annotations.Fetch;
|
||||
import org.hibernate.annotations.FetchMode;
|
||||
import org.hibernate.annotations.NotFound;
|
||||
import org.hibernate.annotations.NotFoundAction;
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
@Getter
|
||||
@Entity
|
||||
public class OrdersDetails {
|
||||
@Setter
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
//@ManyToOne(targetEntity = Orders.class, fetch = FetchType.EAGER)
|
||||
// @ManyToOne(targetEntity = Orders.class,fetch = FetchType.LAZY)
|
||||
// @JoinColumn(name = "order_uuid", referencedColumnName = "uuid")
|
||||
// @Fetch(value = FetchMode.SELECT)
|
||||
// @JsonBackReference
|
||||
@Setter
|
||||
@Transient
|
||||
private Orders order;
|
||||
|
||||
@Setter
|
||||
private int qty;
|
||||
//MappedBy OrdersDetailsPricing.details
|
||||
@OneToOne(mappedBy = "details", fetch = FetchType.EAGER, cascade = {CascadeType.PERSIST, CascadeType.MERGE})
|
||||
@JoinColumn(name = "order_details_id", referencedColumnName = "id")
|
||||
@NotFound(action = NotFoundAction.IGNORE)
|
||||
@Fetch(value = FetchMode.SELECT)
|
||||
private OrdersDetailsPricing pricing;
|
||||
|
||||
@Setter
|
||||
@Convert(converter = JSONColumnConverter.class)
|
||||
private JSONObject variation;
|
||||
|
||||
public void setPricing(OrdersDetailsPricing pricing) {
|
||||
this.pricing = pricing;
|
||||
this.pricing.setDetails(this);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+150
@@ -0,0 +1,150 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonBackReference;
|
||||
import com.solvway.core.enums.ProductEnum.PricingStatus;
|
||||
import jakarta.persistence.*;
|
||||
import org.hibernate.annotations.Fetch;
|
||||
import org.hibernate.annotations.FetchMode;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
|
||||
@Entity
|
||||
public class OrdersDetailsPricing {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
//
|
||||
@OneToOne(targetEntity = OrdersDetails.class, fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "order_details_id")
|
||||
@Fetch(value = FetchMode.SELECT)
|
||||
@JsonBackReference
|
||||
private OrdersDetails details;
|
||||
private Long pPricingId;
|
||||
private String pVariationId;
|
||||
private String pPriceType;
|
||||
private String pCountry;
|
||||
private String pRegion;
|
||||
private double pPrice;
|
||||
private double pBv;
|
||||
private double pSv;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private PricingStatus pStatus = PricingStatus.Y;
|
||||
private String pDoneBy;
|
||||
private String pUpdateBy ;
|
||||
private LocalDateTime pCreateTime ;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public OrdersDetails getDetails() {
|
||||
return details;
|
||||
}
|
||||
|
||||
public void setDetails(OrdersDetails details) {
|
||||
this.details = details;
|
||||
}
|
||||
|
||||
public Long getpPricingId() {
|
||||
return pPricingId;
|
||||
}
|
||||
|
||||
public void setpPricingId(Long pPricingId) {
|
||||
this.pPricingId = pPricingId;
|
||||
}
|
||||
|
||||
public String getpVariationId() {
|
||||
return pVariationId;
|
||||
}
|
||||
|
||||
public void setpVariationId(String pVariationId) {
|
||||
this.pVariationId = pVariationId;
|
||||
}
|
||||
|
||||
public String getpPriceType() {
|
||||
return pPriceType;
|
||||
}
|
||||
|
||||
public void setpPriceType(String pPriceType) {
|
||||
this.pPriceType = pPriceType;
|
||||
}
|
||||
|
||||
public String getpCountry() {
|
||||
return pCountry;
|
||||
}
|
||||
|
||||
public void setpCountry(String pCountry) {
|
||||
this.pCountry = pCountry;
|
||||
}
|
||||
|
||||
public String getpRegion() {
|
||||
return pRegion;
|
||||
}
|
||||
|
||||
public void setpRegion(String pRegion) {
|
||||
this.pRegion = pRegion;
|
||||
}
|
||||
|
||||
public double getpPrice() {
|
||||
return pPrice;
|
||||
}
|
||||
|
||||
public void setpPrice(double pPrice) {
|
||||
this.pPrice = pPrice;
|
||||
}
|
||||
|
||||
public double getpBv() {
|
||||
return pBv;
|
||||
}
|
||||
|
||||
public void setpBv(double pBv) {
|
||||
this.pBv = pBv;
|
||||
}
|
||||
|
||||
public double getpSv() {
|
||||
return pSv;
|
||||
}
|
||||
|
||||
public void setpSv(double pSv) {
|
||||
this.pSv = pSv;
|
||||
}
|
||||
|
||||
public PricingStatus getpStatus() {
|
||||
return pStatus;
|
||||
}
|
||||
|
||||
public void setpStatus(PricingStatus pStatus) {
|
||||
this.pStatus = pStatus;
|
||||
}
|
||||
|
||||
public String getpDoneBy() {
|
||||
return pDoneBy;
|
||||
}
|
||||
|
||||
public void setpDoneBy(String pDoneBy) {
|
||||
this.pDoneBy = pDoneBy;
|
||||
}
|
||||
|
||||
public String getpUpdateBy() {
|
||||
return pUpdateBy;
|
||||
}
|
||||
|
||||
public void setpUpdateBy(String pUpdateBy) {
|
||||
this.pUpdateBy = pUpdateBy;
|
||||
}
|
||||
|
||||
public LocalDateTime getpCreateTime() {
|
||||
return pCreateTime;
|
||||
}
|
||||
|
||||
public void setpCreateTime(LocalDateTime pCreateTime) {
|
||||
this.pCreateTime = pCreateTime;
|
||||
}
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonBackReference;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
//@Entity
|
||||
@Setter
|
||||
@Getter
|
||||
public class OrdersDetailsProduct {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private Long pId;
|
||||
private String productSub;
|
||||
private String productCode;
|
||||
private String productName;
|
||||
private String productType;
|
||||
private String productBrand;
|
||||
private String productCategory;
|
||||
private String productComponent;
|
||||
private String productSicategory;
|
||||
|
||||
@OneToOne(targetEntity = OrdersDetailsVariation.class)
|
||||
@JoinColumn(name = "orders_details_variation_id")
|
||||
@JsonBackReference
|
||||
private OrdersDetailsVariation variation;
|
||||
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonBackReference;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
//@Entity
|
||||
@Setter
|
||||
@Getter
|
||||
public class OrdersDetailsProductSku implements Serializable{
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
private int qty;
|
||||
private int qtyFoc;
|
||||
private int qtyLeft;
|
||||
private int qtyFocLeft;
|
||||
|
||||
|
||||
@Id
|
||||
@ManyToOne(targetEntity = OrdersDetailsVariation.class)
|
||||
@JoinColumn(name = "orders_details_variation_id")
|
||||
@JsonBackReference
|
||||
private OrdersDetailsVariation variation;
|
||||
|
||||
@Id
|
||||
@OneToOne(targetEntity = OrdersDetailsSkuVariation.class, cascade=CascadeType.PERSIST)
|
||||
@JoinColumn(name = "orders_details_sku_variation_id")
|
||||
private OrdersDetailsSkuVariation skuVariation;
|
||||
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonBackReference;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
//@Entity
|
||||
@Setter
|
||||
@Getter
|
||||
public class OrdersDetailsSku {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private Long skuId;
|
||||
private String skuSub;
|
||||
private String skuCode;
|
||||
private String skuName;
|
||||
private String skuBrand;
|
||||
private String skuCategory;
|
||||
private String skuMainitem;
|
||||
|
||||
@OneToOne(targetEntity = OrdersDetailsSkuVariation.class)
|
||||
@JoinColumn(name = "orders_details_sku_variation_id")
|
||||
@JsonBackReference
|
||||
private OrdersDetailsSkuVariation skuVariation;
|
||||
|
||||
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
//@Entity
|
||||
@Setter
|
||||
@Getter
|
||||
public class OrdersDetailsSkuVariation {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private Long svId;
|
||||
private String svPrefix;
|
||||
private String svVariant;
|
||||
private String svVariantName;
|
||||
|
||||
@OneToOne(mappedBy = "skuVariation", fetch = FetchType.EAGER, cascade=CascadeType.PERSIST)
|
||||
private OrdersDetailsSku sku;
|
||||
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.hibernate.annotations.NotFound;
|
||||
import org.hibernate.annotations.NotFoundAction;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
//@Entity
|
||||
@Setter
|
||||
@Getter
|
||||
public class OrdersDetailsVariation {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private Long vId;
|
||||
private String vPrefix;
|
||||
private String vVariant;
|
||||
private String vVariantName;
|
||||
private Long ordersDetailsId;
|
||||
|
||||
@OneToOne(mappedBy = "variation", fetch = FetchType.EAGER, cascade=CascadeType.PERSIST)
|
||||
private OrdersDetailsProduct product;
|
||||
|
||||
@OneToMany(mappedBy = "variation", fetch = FetchType.EAGER, cascade=CascadeType.PERSIST)
|
||||
@NotFound(action = NotFoundAction.IGNORE)
|
||||
private List<OrdersDetailsProductSku> productSku;
|
||||
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.solvway.core.converter.JSONColumnConverter;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@Entity
|
||||
@Table(name="orders_details")
|
||||
public class OrdersDetailsWithDetails implements Serializable {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -779692121188489135L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
private int qty;
|
||||
@Convert(converter = JSONColumnConverter.class)
|
||||
private JSONObject variation;
|
||||
|
||||
|
||||
}
|
||||
+176
@@ -0,0 +1,176 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.solvway.core.converter.JSONColumnConverter;
|
||||
import com.solvway.core.enums.GeneralEnum.CmsPlatform;
|
||||
import com.solvway.core.enums.GeneralEnum.FlagYesNo;
|
||||
import com.solvway.core.enums.OrderEnum;
|
||||
import com.solvway.core.enums.OrderEnum.BuyerType;
|
||||
import com.solvway.core.enums.OrderEnum.OrderStatus;
|
||||
import com.solvway.core.enums.OrderEnum.TrxType;
|
||||
import com.solvway.core.enums.PaymentEnum.PaymentTerm;
|
||||
import com.solvway.core.model.PickupPointOsn;
|
||||
import com.solvway.services.counter.model.Orders.DeliveryOrderStatus;
|
||||
import com.solvway.services.counter.util.converter.PickupPointOsnColumnConverter;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.hibernate.annotations.Fetch;
|
||||
import org.hibernate.annotations.FetchMode;
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@MappedSuperclass
|
||||
public class OrdersGeneral {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private String uuid;
|
||||
private LocalDateTime transactionDateTime;
|
||||
private LocalDate bonusDate;
|
||||
private String countryCode;
|
||||
private String branchCode;
|
||||
private String invoicePrefix;
|
||||
private String documentNo;
|
||||
//Registration Sales havent generate memberCode, refer to memberId
|
||||
private Long buyerId;
|
||||
private String buyerCode;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private BuyerType buyerType = BuyerType.G;
|
||||
private int printCount = 0;
|
||||
private int deliveryPrintCount = 0;
|
||||
|
||||
private String currencySymbol;
|
||||
private double currencyRate;
|
||||
|
||||
private double grandTotal;
|
||||
private double totalAmount;
|
||||
private double totalDiscount;
|
||||
private double totalBv;
|
||||
private double totalSv;
|
||||
private double roundingAdjustment;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private OrderStatus status = OrderStatus.P;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private DeliveryOrderStatus deliveryOrderStatus = DeliveryOrderStatus.PE;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private TrxType trxType;
|
||||
@Convert(converter = JSONColumnConverter.class)
|
||||
private JSONObject buyer;
|
||||
|
||||
private String location;
|
||||
private String statusRemark;
|
||||
private String bonusDateRemark;
|
||||
//Unidirectional Mapping
|
||||
@OneToMany(fetch = FetchType.EAGER, cascade = {CascadeType.PERSIST, CascadeType.MERGE})
|
||||
@JoinColumn(name = "order_uuid", referencedColumnName = "uuid")
|
||||
@Fetch(value = FetchMode.SUBSELECT)
|
||||
private List<OrdersTaxation> taxations;
|
||||
|
||||
// @Convert(converter = ListToJsonColumnConverter.class)
|
||||
// private List<PaymentProcess> payments;
|
||||
|
||||
//Use OrderStatus.N and OrderStatus.Y as flag for indicate the order stock returned.
|
||||
@Enumerated(EnumType.STRING)
|
||||
private OrderStatus stockReturn = OrderStatus.N;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private PaymentTerm paymentTerm = PaymentTerm.PF;
|
||||
|
||||
// for inventory issue stock
|
||||
@Transient
|
||||
private String warehouseId;
|
||||
|
||||
private String selfServiceId;
|
||||
private String doneBy;
|
||||
private String createBy;
|
||||
private LocalDateTime createDate;
|
||||
private String remark;
|
||||
private String paymentRemark;
|
||||
private String paymentReference;
|
||||
private String prvNo;
|
||||
private String invoiceHeader;
|
||||
private String invoiceFooter;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private CmsPlatform sourcePlatform = CmsPlatform.BO;
|
||||
|
||||
//For Void Sales
|
||||
@Enumerated(EnumType.STRING)
|
||||
private FlagYesNo voidedFlag = FlagYesNo.N;
|
||||
private String voidedReason="";
|
||||
private String voidedBy;
|
||||
private LocalDateTime voidedDateTime;
|
||||
|
||||
//for delivery
|
||||
private double shippingCost;
|
||||
private double totalWeight;
|
||||
private double totalVolume;
|
||||
private boolean deliveryOption;
|
||||
private String receiver;
|
||||
private String contactNo;
|
||||
private String deliveryGeoLocationId;
|
||||
private String addressDetails;
|
||||
private String postcode;
|
||||
private boolean pickupOption;
|
||||
private String pickupPoint;
|
||||
private String pickupPointLocation;
|
||||
private String town;
|
||||
@Convert(converter = PickupPointOsnColumnConverter.class)
|
||||
private PickupPointOsn pickupPointOsn;
|
||||
private LocalDate pickupDate;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private OrderEnum.OsnPickupSlot pickupSlot = OrderEnum.OsnPickupSlot.NA;
|
||||
|
||||
private int volumeDivideRate;
|
||||
private double weightMarkupRate;
|
||||
private double volumeMarkupRate;
|
||||
|
||||
private String trackingNo;
|
||||
|
||||
//STOCKIST Sales Approval
|
||||
@Enumerated(EnumType.STRING)
|
||||
private FlagYesNo stockistSalesApproval = FlagYesNo.N;
|
||||
private String stockistSalesApprovedBy;
|
||||
private LocalDateTime stockistSalesApprovalDateTime;
|
||||
private double stockistDepositBalance;
|
||||
|
||||
//for birthday treat flag
|
||||
private boolean containBirthdayTreatItem;
|
||||
private boolean containNewRetention;
|
||||
|
||||
private String locale = "en_US";
|
||||
private String ref1;
|
||||
private String userAgent;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private FlagYesNo fromEmrm = FlagYesNo.N;
|
||||
|
||||
private String parentOrderUuid;
|
||||
|
||||
private String promotionCode;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private FlagYesNo requiredApproval = FlagYesNo.N;
|
||||
|
||||
|
||||
// public List<PaymentProcess> getPayments() {
|
||||
// return payments;
|
||||
// }
|
||||
//
|
||||
// public void setPayments(List<PaymentProcess> payments) {
|
||||
// this.payments = payments;
|
||||
// }
|
||||
|
||||
public void addTaxation(OrdersTaxation taxation) {
|
||||
if(this.taxations==null) {
|
||||
this.taxations= new ArrayList<>();
|
||||
}
|
||||
this.taxations.add(taxation);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Table;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Entity
|
||||
@Table(name="orders")
|
||||
public class OrdersListing extends OrdersGeneral implements Serializable{
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.solvway.core.enums.PaymentEnum.PaymentProcessStatus;
|
||||
import com.solvway.core.enums.PaymentEnum.PaymentType;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@Entity
|
||||
public class OrdersPayments {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
// @ManyToOne(targetEntity = Orders.class)
|
||||
// @JoinColumn(name = "order_uuid", referencedColumnName = "uuid")
|
||||
// @JsonBackReference
|
||||
// private Orders order;
|
||||
@Transient
|
||||
private String orderUuid;
|
||||
private String buyerCode;
|
||||
// public Orders getOrder() {
|
||||
// return order;
|
||||
// }
|
||||
//
|
||||
// public void setOrder(Orders order) {
|
||||
// this.order = order;
|
||||
// }
|
||||
private double totalAmount;
|
||||
private Long paymentMethodId;
|
||||
private String messageTag;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private PaymentType paymentType = PaymentType.PC;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private PaymentProcessStatus status = PaymentProcessStatus.P;
|
||||
private String message;
|
||||
private String remarks;
|
||||
private String doneBy;
|
||||
|
||||
//Define information to be stored in the Ref field
|
||||
/**
|
||||
* For PaymentGateway
|
||||
* ref1 = OnlinePaymentType or FPX
|
||||
ref2 = PaymentGatewayRef
|
||||
ref3 = CardNo
|
||||
ref4 = ApprovalCode
|
||||
ref5 = Solvway Ref
|
||||
* **/
|
||||
|
||||
|
||||
//Card Type
|
||||
private String ref1="";
|
||||
|
||||
private String ref2="";
|
||||
//Card No
|
||||
private String ref3="";
|
||||
|
||||
private String ref4="";
|
||||
|
||||
private String ref5="";
|
||||
|
||||
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.solvway.core.enums.GeneralEnum.FlagYesNo;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@Entity
|
||||
public class OrdersTaxation {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
// public Orders getOrder() {
|
||||
// return order;
|
||||
// }
|
||||
// public void setOrder(Orders order) {
|
||||
// this.order = order;
|
||||
// }
|
||||
//@ManyToOne(targetEntity = Orders.class, fetch = FetchType.EAGER)
|
||||
// @ManyToOne(targetEntity = Orders.class)
|
||||
// @JoinColumn(name = "order_uuid", referencedColumnName = "uuid")
|
||||
// @JsonBackReference
|
||||
// private Orders order;
|
||||
private double taxAmount;
|
||||
private String messageTag;
|
||||
private double percentage;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private FlagYesNo inclusive = FlagYesNo.N;
|
||||
private String doneBy;
|
||||
|
||||
}
|
||||
+140
@@ -0,0 +1,140 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.solvway.core.converter.JSONColumnConverter;
|
||||
import com.solvway.core.enums.GeneralEnum.CmsPlatform;
|
||||
import com.solvway.core.enums.GeneralEnum.FlagYesNo;
|
||||
import com.solvway.core.enums.OrderEnum.BuyerType;
|
||||
import com.solvway.core.enums.OrderEnum.OrderStatus;
|
||||
import com.solvway.core.enums.OrderEnum.TrxType;
|
||||
import com.solvway.core.enums.PaymentEnum.PaymentTerm;
|
||||
import com.solvway.services.counter.model.Orders.DeliveryOrderStatus;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.hibernate.annotations.Fetch;
|
||||
import org.hibernate.annotations.FetchMode;
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@Entity
|
||||
@Table(name="orders")
|
||||
public class OrdersWithDetails implements Serializable {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 8079806628624322784L;
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private String uuid;
|
||||
private LocalDateTime transactionDateTime;
|
||||
private LocalDate bonusDate;
|
||||
private String countryCode;
|
||||
private String branchCode;
|
||||
private String invoicePrefix;
|
||||
private String documentNo;
|
||||
//Registration Sales havent generate memberCode, refer to memberId
|
||||
private Long buyerId;
|
||||
private String buyerCode;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private BuyerType buyerType = BuyerType.G;
|
||||
private int printCount = 0;
|
||||
|
||||
private String currencySymbol;
|
||||
private double currencyRate;
|
||||
|
||||
private double grandTotal;
|
||||
private double totalAmount;
|
||||
private double totalBv;
|
||||
private double totalSv;
|
||||
private double roundingAdjustment;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private OrderStatus status = OrderStatus.P;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private DeliveryOrderStatus deliveryOrderStatus = DeliveryOrderStatus.PE;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private TrxType trxType;
|
||||
@Convert(converter = JSONColumnConverter.class)
|
||||
private JSONObject buyer;
|
||||
|
||||
private String location;
|
||||
private String statusRemark;
|
||||
private String bonusDateRemark;
|
||||
|
||||
// @Convert(converter = ListToJsonColumnConverter.class)
|
||||
// private List<PaymentProcess> payments;
|
||||
|
||||
//Use OrderStatus.N and OrderStatus.Y as flag for indicate the order stock returned.
|
||||
@Enumerated(EnumType.STRING)
|
||||
private OrderStatus stockReturn = OrderStatus.N;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private PaymentTerm paymentTerm = PaymentTerm.PF;
|
||||
|
||||
// for inventory issue stock
|
||||
@Transient
|
||||
private String warehouseId;
|
||||
|
||||
private String selfServiceId;
|
||||
private String doneBy;
|
||||
private String createBy;
|
||||
private LocalDateTime createDate;
|
||||
private String remark;
|
||||
private String paymentRemark;
|
||||
private String paymentReference;
|
||||
private String prvNo;
|
||||
private String invoiceHeader;
|
||||
private String invoiceFooter;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private CmsPlatform sourcePlatform = CmsPlatform.BO;
|
||||
|
||||
//For Void Sales
|
||||
@Enumerated(EnumType.STRING)
|
||||
private FlagYesNo voidedFlag = FlagYesNo.N;
|
||||
private String voidedReason="";
|
||||
private String voidedBy;
|
||||
private LocalDateTime voidedDateTime;
|
||||
|
||||
//for delivery
|
||||
private double shippingCost;
|
||||
private double totalWeight;
|
||||
private double totalVolume;
|
||||
private boolean deliveryOption;
|
||||
private String receiver;
|
||||
private String contactNo;
|
||||
private String deliveryGeoLocationId;
|
||||
private String addressDetails;
|
||||
private String postcode;
|
||||
private boolean pickupOption;
|
||||
private String pickupPoint;
|
||||
private String pickupPointLocation;
|
||||
|
||||
private int volumeDivideRate;
|
||||
private double weightMarkupRate;
|
||||
private double volumeMarkupRate;
|
||||
|
||||
//STOCKIST Sales Approval
|
||||
@Enumerated(EnumType.STRING)
|
||||
private FlagYesNo stockistSalesApproval = FlagYesNo.N;
|
||||
private String stockistSalesApprovedBy;
|
||||
private LocalDateTime stockistSalesApprovalDateTime;
|
||||
|
||||
//for birthday treat flag
|
||||
private boolean containBirthdayTreatItem;
|
||||
|
||||
private String locale = "en_US";
|
||||
|
||||
@OneToMany( fetch = FetchType.EAGER, cascade = {CascadeType.PERSIST, CascadeType.MERGE})
|
||||
@JoinColumn(name = "order_uuid", referencedColumnName = "uuid")
|
||||
@Fetch(value = FetchMode.SUBSELECT)
|
||||
private List<OrdersDetailsWithDetails> details;
|
||||
|
||||
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.solvway.core.enums.PaymentEnum.PaymentProcessStatus;
|
||||
import com.solvway.core.enums.PaymentEnum.PaymentType;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
public class PaymentProcess {
|
||||
|
||||
private Long orderId;
|
||||
private String uuid;
|
||||
private String buyerCode;
|
||||
private double totalAmount;
|
||||
private Long paymentMethodId;
|
||||
private PaymentType paymentType;
|
||||
private PaymentProcessStatus status = PaymentProcessStatus.P;
|
||||
private String message;
|
||||
private String remarks;
|
||||
private String doneBy;
|
||||
|
||||
//Define information to be stored in the Ref field
|
||||
//Card Type
|
||||
private String ref1="";
|
||||
|
||||
private String ref2="";
|
||||
//Card No
|
||||
private String ref3="";
|
||||
|
||||
private String ref4="";
|
||||
|
||||
private String ref5="";
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
public class PickupPointLocation {
|
||||
|
||||
private long id;
|
||||
private String code;
|
||||
private String name;
|
||||
private String address;
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
public class PickupPointType {
|
||||
|
||||
private long id;
|
||||
private String code;
|
||||
private String name;
|
||||
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.solvway.core.enums.GeneralEnum.FlagYesNo;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@Entity
|
||||
public class PromotionCode {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private String code;
|
||||
private int limited;
|
||||
private boolean forItem;
|
||||
private Long productId;
|
||||
private int quantityRequired;
|
||||
private Long freeProductId;
|
||||
private int freeQuantity;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private FlagYesNo active;
|
||||
private LocalDateTime effectiveFrom;
|
||||
private LocalDateTime effectiveTo;
|
||||
private String createBy;
|
||||
private LocalDateTime createDateTime;
|
||||
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@Entity
|
||||
public class PromotionCodeUse {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private String promotionCode;
|
||||
private Long memberId;
|
||||
private int limited;
|
||||
private int used;
|
||||
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
public class PurchaseConfirmationEmailTemplate {
|
||||
private String memberName;
|
||||
private String memberID;
|
||||
private String orderDate;
|
||||
private String orderDoc;
|
||||
private String currencyAmt;
|
||||
|
||||
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
public class SalesSubmission {
|
||||
|
||||
private Long id;
|
||||
private String stockistCode;
|
||||
private double salesSubmissionRatio;
|
||||
private double salesSubmissionValue;
|
||||
private double salesSubmissionTaken;
|
||||
private double salesSubmissionBalance;
|
||||
private String doneBy;
|
||||
private LocalDateTime createDateTime;
|
||||
|
||||
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.solvway.core.enums.WalletEnum.WalletTrxnStatus;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@Entity
|
||||
@Table(name = "sales_submission_wallet_trxn")
|
||||
public class SalesSubmissionTrxn {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private String stockistCode;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private WalletTrxnStatus status;
|
||||
private double amtIn;
|
||||
private double amtOut;
|
||||
private String trxnType;
|
||||
private String remark;
|
||||
private String doneBy;
|
||||
private LocalDateTime createDateTime;
|
||||
private String orderUuid;
|
||||
private LocalDate trxnDate;
|
||||
private LocalTime trxnTime;
|
||||
private String orderDocumentNo;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.solvway.core.enums.ProductEnum.SkuStatus;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
public class Sku implements Serializable{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -3156617923281222274L;
|
||||
private long id;
|
||||
private String skuCode;
|
||||
private String skuOldCode;
|
||||
private String skuName;
|
||||
private String skuType;
|
||||
private String skuCountry;
|
||||
private String skuMainitem;
|
||||
private String skuCategory;
|
||||
private String skuBrand;
|
||||
private String skuSub;
|
||||
private String skuDoneBy;
|
||||
private SkuStatus skuStatus = SkuStatus.Y;
|
||||
private List<SkuVariation> variations;
|
||||
private Timestamp skuTransactionTime;
|
||||
private String skuCr8Si;
|
||||
private String skuBatchGenerate;
|
||||
|
||||
private String skuShortName;
|
||||
private String skuOriginCountry;
|
||||
private String skuColor;
|
||||
private String skuStype;
|
||||
private String skuSbrand;
|
||||
private String skuGender;
|
||||
private double skuWeight;
|
||||
private double skuVolume;
|
||||
|
||||
public static long getSerialversionuid() {
|
||||
return serialVersionUID;
|
||||
}
|
||||
|
||||
public void addVariation(SkuVariation variant) {
|
||||
this.variations.add(variant);
|
||||
}
|
||||
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonBackReference;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.sql.Timestamp;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
public class SkuVariation implements Serializable {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 6605598237047297260L;
|
||||
|
||||
private long id;
|
||||
|
||||
private String svPrefix;
|
||||
|
||||
private String svVariant;
|
||||
|
||||
private String svVariantName;
|
||||
|
||||
private Timestamp svTransactiontime;
|
||||
|
||||
@JsonBackReference
|
||||
private Sku sku;
|
||||
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.solvway.services.counter.model;
|
||||
|
||||
import com.solvway.core.enums.GeneralEnum.FlagYesNo;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
public class TaxationSetup {
|
||||
private Long id;
|
||||
private String messageTag;
|
||||
private String displayText;
|
||||
private String description;
|
||||
private double percentage;
|
||||
private FlagYesNo inclusive = FlagYesNo.N;
|
||||
private String doneBy;
|
||||
private LocalDateTime createDateTime;
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user