-
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
1 parent
a62b1cd
commit c0e981e
Showing
14 changed files
with
247 additions
and
5 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
18 changes: 18 additions & 0 deletions
18
services/contracts/src/main/java/com/workup/contracts/commands/EvaluateMilestoneCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.workup.contracts.commands; | ||
|
||
import com.workup.shared.commands.contracts.requests.EvaluateMilestoneRequest; | ||
|
||
import com.workup.shared.commands.contracts.responses.EvaluateMilestoneResponse; | ||
|
||
public class EvaluateMilestoneCommand | ||
extends ContractCommand<EvaluateMilestoneRequest, EvaluateMilestoneResponse> { | ||
|
||
@Override | ||
public EvaluateMilestoneResponse Run(EvaluateMilestoneRequest request) { | ||
// First we will get the milestones and add them to the database first, | ||
// This will allow us to have their IDs for when we insert the contract. | ||
|
||
return null; | ||
|
||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
services/contracts/src/main/java/com/workup/contracts/commands/GetContractCommand.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,20 @@ | ||
package com.workup.contracts.commands; | ||
|
||
import com.workup.shared.commands.contracts.requests.EvaluateMilestoneRequest; | ||
|
||
import com.workup.shared.commands.contracts.requests.GetContractRequest; | ||
import com.workup.shared.commands.contracts.responses.EvaluateMilestoneResponse; | ||
import com.workup.shared.commands.contracts.responses.GetContractResponse; | ||
|
||
public class GetContractCommand | ||
extends ContractCommand<GetContractRequest, GetContractResponse> { | ||
|
||
@Override | ||
public GetContractResponse Run(GetContractRequest request) { | ||
// First we will get the milestones and add them to the database first, | ||
// This will allow us to have their IDs for when we insert the contract. | ||
|
||
return null; | ||
|
||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
services/contracts/src/main/java/com/workup/contracts/commands/GetMilestoneCommand.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,22 @@ | ||
package com.workup.contracts.commands; | ||
|
||
import com.workup.shared.commands.contracts.requests.EvaluateMilestoneRequest; | ||
|
||
import com.workup.shared.commands.contracts.requests.GetContractRequest; | ||
import com.workup.shared.commands.contracts.requests.GetMilestoneRequest; | ||
import com.workup.shared.commands.contracts.responses.EvaluateMilestoneResponse; | ||
import com.workup.shared.commands.contracts.responses.GetContractResponse; | ||
import com.workup.shared.commands.contracts.responses.GetMilestoneResponse; | ||
|
||
public class GetMilestoneCommand | ||
extends ContractCommand<GetMilestoneRequest, GetMilestoneResponse> { | ||
|
||
@Override | ||
public GetMilestoneResponse Run(GetMilestoneRequest request) { | ||
// First we will get the milestones and add them to the database first, | ||
// This will allow us to have their IDs for when we insert the contract. | ||
|
||
return null; | ||
|
||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
.../contracts/src/main/java/com/workup/contracts/commands/GetPendingTerminationsCommand.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,24 @@ | ||
package com.workup.contracts.commands; | ||
|
||
import com.workup.shared.commands.contracts.requests.EvaluateMilestoneRequest; | ||
|
||
import com.workup.shared.commands.contracts.requests.GetContractRequest; | ||
import com.workup.shared.commands.contracts.requests.GetMilestoneRequest; | ||
import com.workup.shared.commands.contracts.requests.GetPendingTerminationsRequest; | ||
import com.workup.shared.commands.contracts.responses.EvaluateMilestoneResponse; | ||
import com.workup.shared.commands.contracts.responses.GetContractResponse; | ||
import com.workup.shared.commands.contracts.responses.GetMilestoneResponse; | ||
import com.workup.shared.commands.contracts.responses.GetPendingTerminationsResponse; | ||
|
||
public class GetPendingTerminationsCommand | ||
extends ContractCommand<GetPendingTerminationsRequest, GetPendingTerminationsResponse> { | ||
|
||
@Override | ||
public GetPendingTerminationsResponse Run(GetPendingTerminationsRequest request) { | ||
// First we will get the milestones and add them to the database first, | ||
// This will allow us to have their IDs for when we insert the contract. | ||
|
||
return null; | ||
|
||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
services/contracts/src/main/java/com/workup/contracts/commands/ProgressMilestoneCommand.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,20 @@ | ||
package com.workup.contracts.commands; | ||
|
||
import com.workup.shared.commands.contracts.requests.EvaluateMilestoneRequest; | ||
|
||
import com.workup.shared.commands.contracts.requests.ProgressMilestoneRequest; | ||
import com.workup.shared.commands.contracts.responses.EvaluateMilestoneResponse; | ||
import com.workup.shared.commands.contracts.responses.ProgressMilestoneResponse; | ||
|
||
public class ProgressMilestoneCommand | ||
extends ContractCommand<ProgressMilestoneRequest, ProgressMilestoneResponse> { | ||
|
||
@Override | ||
public ProgressMilestoneResponse Run(ProgressMilestoneRequest request) { | ||
// First we will get the milestones and add them to the database first, | ||
// This will allow us to have their IDs for when we insert the contract. | ||
|
||
return null; | ||
|
||
} | ||
} |
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
15 changes: 15 additions & 0 deletions
15
shared/src/main/java/com/workup/shared/commands/contracts/requests/GetContractRequest.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,15 @@ | ||
package com.workup.shared.commands.contracts.requests; | ||
|
||
import com.workup.shared.commands.CommandRequest; | ||
import com.workup.shared.enums.contracts.TerminationRequestStatus; | ||
import lombok.Getter; | ||
import lombok.experimental.SuperBuilder; | ||
import lombok.extern.jackson.Jacksonized; | ||
|
||
// PURPOSE : To fulfill the need for the read of CRUD for our contract repository | ||
@Getter | ||
@SuperBuilder(setterPrefix = "with") | ||
@Jacksonized | ||
public class GetContractRequest extends CommandRequest { | ||
private final String contractId; | ||
} |
16 changes: 16 additions & 0 deletions
16
shared/src/main/java/com/workup/shared/commands/contracts/requests/GetMilestoneRequest.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,16 @@ | ||
package com.workup.shared.commands.contracts.requests; | ||
|
||
import com.workup.shared.commands.CommandRequest; | ||
import com.workup.shared.enums.contracts.TerminationRequestStatus; | ||
import lombok.Getter; | ||
import lombok.experimental.SuperBuilder; | ||
import lombok.extern.jackson.Jacksonized; | ||
|
||
// PURPOSE : To fulfill the need for the read of CRUD for our milestone repository | ||
@Getter | ||
@SuperBuilder(setterPrefix = "with") | ||
@Jacksonized | ||
public class GetMilestoneRequest extends CommandRequest { | ||
|
||
private final String milestoneId; | ||
} |
15 changes: 15 additions & 0 deletions
15
...ain/java/com/workup/shared/commands/contracts/requests/GetPendingTerminationsRequest.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,15 @@ | ||
package com.workup.shared.commands.contracts.requests; | ||
|
||
import com.workup.shared.commands.CommandRequest; | ||
import com.workup.shared.enums.contracts.TerminationRequestStatus; | ||
import lombok.Getter; | ||
import lombok.experimental.SuperBuilder; | ||
import lombok.extern.jackson.Jacksonized; | ||
|
||
// PURPOSE : To fulfill the need for the read of CRUD for our terminations repository | ||
@Getter | ||
@SuperBuilder(setterPrefix = "with") | ||
@Jacksonized | ||
public class GetPendingTerminationsRequest extends CommandRequest { | ||
private final String contractId; | ||
} |
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
26 changes: 26 additions & 0 deletions
26
shared/src/main/java/com/workup/shared/commands/contracts/responses/GetContractResponse.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,26 @@ | ||
package com.workup.shared.commands.contracts.responses; | ||
|
||
import com.workup.shared.commands.CommandResponse; | ||
import com.workup.shared.enums.contracts.ContractState; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import lombok.experimental.SuperBuilder; | ||
import lombok.extern.jackson.Jacksonized; | ||
|
||
import java.util.List; | ||
import java.util.UUID; | ||
|
||
@Getter | ||
@SuperBuilder(setterPrefix = "with") | ||
@Jacksonized | ||
public class GetContractResponse extends CommandResponse { | ||
private final String contractId; | ||
private String jobTitle; | ||
private String jobId; | ||
private String proposalId; | ||
private String freelancerId; | ||
private String clientId; | ||
private List<String> milestonesIds; | ||
private ContractState status; | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
...ed/src/main/java/com/workup/shared/commands/contracts/responses/GetMilestoneResponse.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.workup.shared.commands.contracts.responses; | ||
|
||
import com.workup.shared.commands.CommandResponse; | ||
import com.workup.shared.commands.contracts.Milestone; | ||
import lombok.Getter; | ||
import lombok.experimental.SuperBuilder; | ||
import lombok.extern.jackson.Jacksonized; | ||
|
||
@Getter | ||
@SuperBuilder(setterPrefix = "with") | ||
@Jacksonized | ||
public class GetMilestoneResponse extends CommandResponse { | ||
private final Milestone milestone; | ||
} |
24 changes: 24 additions & 0 deletions
24
...n/java/com/workup/shared/commands/contracts/responses/GetPendingTerminationsResponse.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,24 @@ | ||
package com.workup.shared.commands.contracts.responses; | ||
|
||
import com.workup.shared.commands.CommandResponse; | ||
import com.workup.shared.commands.contracts.Milestone; | ||
import com.workup.shared.enums.contracts.TerminationRequestStatus; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import lombok.experimental.SuperBuilder; | ||
import lombok.extern.jackson.Jacksonized; | ||
|
||
import java.util.UUID; | ||
|
||
@Getter | ||
@SuperBuilder(setterPrefix = "with") | ||
@Jacksonized | ||
public class GetPendingTerminationsResponse extends CommandResponse { | ||
private String requestId; | ||
|
||
private String contractId; | ||
private String requesterId; | ||
private String reason; | ||
|
||
private TerminationRequestStatus status; | ||
} |