-
-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Renaming foreign key from ID to UID #880
- Loading branch information
Showing
42 changed files
with
1,971 additions
and
1,893 deletions.
There are no files selected for viewing
1,886 changes: 943 additions & 943 deletions
1,886
...t-starter-api-graphql/autoconfigure/src/test/resources/db/test/core/complete-database.sql
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
55 changes: 55 additions & 0 deletions
55
...ain/java/tech/cassandre/trading/bot/strategy/internal/CassandreStrategyConfiguration.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,55 @@ | ||
package tech.cassandre.trading.bot.strategy.internal; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Value; | ||
import tech.cassandre.trading.bot.dto.strategy.StrategyDTO; | ||
import tech.cassandre.trading.bot.strategy.BasicCassandreStrategy; | ||
import tech.cassandre.trading.bot.strategy.BasicTa4jCassandreStrategy; | ||
|
||
import static lombok.AccessLevel.PRIVATE; | ||
|
||
/** | ||
* CassandreStrategyConfiguration contains the configuration of the strategy. | ||
* <p> | ||
* These are the classes used to manage a position. | ||
* - CassandreStrategyInterface list the methods a strategy type must implement to be able to interact with the Cassandre framework. | ||
* - CassandreStrategyConfiguration contains the configuration of the strategy. | ||
* - CassandreStrategyDependencies contains all the dependencies required by a strategy and provided by the Cassandre framework. | ||
* - CassandreStrategyImplementation is the default implementation of CassandreStrategyInterface, this code manages the interaction between Cassandre framework and a strategy. | ||
* - CassandreStrategy (class) is the class that every strategy used by user ({@link BasicCassandreStrategy} or {@link BasicTa4jCassandreStrategy}) must extend. It contains methods to access data and manage orders, trades, positions. | ||
* - CassandreStrategy (interface) is the annotation allowing you Cassandre to recognize a user strategy. | ||
* - BasicCassandreStrategy - User inherits this class this one to make a basic strategy. | ||
* - BasicCassandreStrategy - User inherits this class this one to make a strategy with ta4j. | ||
*/ | ||
@Value | ||
@Builder | ||
@AllArgsConstructor(access = PRIVATE) | ||
@SuppressWarnings("checkstyle:VisibilityModifier") | ||
public class CassandreStrategyConfiguration { | ||
|
||
/** Strategy. */ | ||
StrategyDTO strategyDTO; | ||
|
||
/** Dry mode. */ | ||
boolean dryMode; | ||
|
||
/** | ||
* Returns strategy uid in database. | ||
* | ||
* @return strategy uid | ||
*/ | ||
long getStrategyUid() { | ||
return strategyDTO.getUid(); | ||
} | ||
|
||
/** | ||
* Returns strategy id in annotation. | ||
* | ||
* @return strategy id | ||
*/ | ||
String getStrategyId() { | ||
return strategyDTO.getStrategyId(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.