-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
112 changed files
with
1,293 additions
and
703 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
common/src/main/java/com/nashtech/common/command/CreateShipmentCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.nashtech.common.command; | ||
|
||
import com.nashtech.common.model.User; | ||
import lombok.Builder; | ||
import lombok.Value; | ||
import org.axonframework.modelling.command.TargetAggregateIdentifier; | ||
|
||
@Value | ||
@Builder | ||
public class CreateShipmentCommand { | ||
@TargetAggregateIdentifier | ||
String shipmentId; | ||
String paymentId; | ||
String orderId; | ||
User user; | ||
String productId; | ||
Double subTotal; | ||
Double total; | ||
Float tax; | ||
Double basePrice; | ||
Integer quantity; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,5 +7,6 @@ | |
@Builder | ||
public class OrderShippedEvent { | ||
String orderId; | ||
|
||
String paymentId; | ||
String shipmentId; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
common/src/main/java/com/nashtech/common/event/ProductFailedEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.nashtech.common.event; | ||
|
||
import lombok.Builder; | ||
import lombok.Value; | ||
|
||
@Value | ||
@Builder | ||
public class ProductFailedEvent { | ||
String orderId; | ||
String productId; | ||
Integer quantity; | ||
String reasonToFailed; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
common/src/main/java/com/nashtech/common/event/ProductReserveFailedEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.nashtech.common.event; | ||
|
||
import lombok.Builder; | ||
import lombok.Value; | ||
|
||
@Value | ||
@Builder | ||
public class ProductReserveFailedEvent { | ||
String orderId; | ||
String userId; | ||
String productId; | ||
String reasonToFailed; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 8 additions & 5 deletions
13
common/src/main/java/com/nashtech/common/event/ShipmentCreatedEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
package com.nashtech.common.event; | ||
|
||
import com.nashtech.common.model.ShipmentStatus; | ||
import com.nashtech.common.model.User; | ||
import lombok.Builder; | ||
import lombok.Value; | ||
|
||
@Value | ||
@Builder | ||
public class ShipmentCreatedEvent { | ||
String shipmentId; | ||
String paymentId; | ||
String orderId; | ||
User user; | ||
String productId; | ||
Double subTotal; | ||
Double total; | ||
Float tax; | ||
Double basePrice; | ||
Integer quantity; | ||
Double price; | ||
String userId; | ||
String paymentId; | ||
ShipmentStatus shipmentStatus; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
package com.nashtech.common.model; | ||
|
||
import lombok.Builder; | ||
import lombok.Value; | ||
import lombok.Data; | ||
|
||
@Value | ||
@Data | ||
@Builder | ||
public class User { | ||
String firstName; | ||
String lastName; | ||
String userId; | ||
String address; | ||
private String userId; | ||
private String firstName; | ||
private String lastName; | ||
private String address; | ||
private String emailId; | ||
private String mobileNumber; | ||
|
||
} |
2 changes: 1 addition & 1 deletion
2
common/src/main/java/com/nashtech/common/utils/OrderStatus.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
package com.nashtech.common.utils; | ||
|
||
public enum OrderStatus { | ||
ORDER_CREATED, ORDER_APPROVED, ORDER_REJECTED | ||
ORDER_NOT_APPROVED,ORDER_PARTIALLY_APPROVED, ORDER_APPROVED, ORDER_PLACED | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
kind: ConfigMap | ||
apiVersion: v1 | ||
metadata: | ||
name: inventory-configmap | ||
data: | ||
# Configuration values can be set as key-value properties | ||
MYSQL_HOST: 35.231.178.113 | ||
AXON_HOST: 34.23.126.183:8124 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
apiVersion: external-secrets.io/v1beta1 | ||
kind: SecretStore | ||
metadata: | ||
name: car-demo-inventory-secretstore | ||
namespace: default | ||
spec: | ||
provider: | ||
gcpsm: | ||
auth: | ||
secretRef: | ||
secretAccessKeySecretRef: | ||
name: gcpsm-secret | ||
key: secret-access-credentials | ||
projectID: boreal-gravity-396810 | ||
--- | ||
apiVersion: external-secrets.io/v1beta1 | ||
kind: ExternalSecret | ||
metadata: | ||
name: car-demo-externalsecret | ||
namespace: default | ||
spec: | ||
secretStoreRef: | ||
name: car-demo-inventory-secretstore | ||
kind: SecretStore | ||
target: | ||
name: secret-to-be-created | ||
data: | ||
- secretKey: "mysql-db-username" | ||
remoteRef: | ||
key: car-demo-secret | ||
version: latest | ||
property: mysql-db-username | ||
- secretKey: "mysql-db-userpassword" | ||
remoteRef: | ||
key: car-demo-secret | ||
version: latest | ||
property: mysql-db-userpassword | ||
|
||
- secretKey: "MY_SQL_SECRETS" | ||
remoteRef: | ||
key: car-demo-secret | ||
version: latest |
Oops, something went wrong.