API 1.0.55 training_plan next, ecto,endo extensions

This commit is contained in:
Tibor Bossanyi (Freelancer) 2022-04-15 11:11:01 +02:00
parent 357c9be0b7
commit 435ee0537c
7 changed files with 39 additions and 16 deletions

View File

@ -4,14 +4,14 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("org.springframework.boot") version "2.4.4"
id("io.spring.dependency-management") version "1.0.11.RELEASE"
kotlin("jvm") version "1.4.32"
kotlin("plugin.spring") version "1.5.0-M2"
kotlin("plugin.jpa") version "1.5.0-M2"
kotlin("plugin.serialization") version "1.5.0-M2"
kotlin("jvm") version "1.6.20"
kotlin("plugin.spring") version "1.6.20"
kotlin("plugin.jpa") version "1.6.20"
kotlin("plugin.serialization") version "1.6.20"
}
group = "com.aitrainer"
version = "1.0.54"
version = "1.0.55"
java.sourceCompatibility = JavaVersion.VERSION_1_8
repositories {
@ -30,21 +30,21 @@ dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.apache.logging.log4j:log4j-core:2.14.0")
implementation("org.apache.logging.log4j:log4j-api:2.14.0")
implementation("org.slf4j:slf4j-api:1.7.30")
implementation("org.slf4j:slf4j-api:1.7.36")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime:1.0-M1-1.4.0-rc") // JVM dependency
implementation("io.jsonwebtoken:jjwt:0.9.1")
implementation("org.yaml:snakeyaml:1.27")
implementation("com.google.code.gson:gson:2.8.6")
implementation("org.projectlombok:lombok:1.18.16")
implementation("org.jetbrains.kotlin:kotlin-reflect:1.4.32")
implementation("com.github.ulisesbocchio:jasypt-spring-boot-starter:3.0.3")
implementation("org.yaml:snakeyaml:1.30")
implementation("com.google.code.gson:gson:2.9.0")
implementation("org.projectlombok:lombok:1.18.22")
implementation("org.jetbrains.kotlin:kotlin-reflect:1.6.20")
implementation("com.github.ulisesbocchio:jasypt-spring-boot-starter:3.0.4")
runtimeOnly("mysql:mysql-connector-java")
testImplementation("org.springframework.boot:spring-boot-starter-test") {
exclude(group = "org.junit.vintage", module = "junit-vintage-engine")
}
testImplementation("junit:junit:4.13.1")
testImplementation("org.jetbrains.kotlin:kotlin-test-junit5:1.5.0-M2")
testImplementation("junit:junit:4.13.2")
testImplementation("org.jetbrains.kotlin:kotlin-test-junit5:1.6.20")
}

16
data/db/update_1_0_55.sql Normal file
View File

@ -0,0 +1,16 @@
START TRANSACTION;
ALTER TABLE `training_plan`
ADD COLUMN `next_training_plan_id` INT(11) NULL DEFAULT NULL AFTER `weeks`;
ALTER TABLE `training_plan_detail`
ADD COLUMN `ecto_repeats` INT(5) NULL DEFAULT NULL AFTER `day_id`,
ADD COLUMN `ecto_weight` DOUBLE NULL DEFAULT NULL AFTER `ecto_repeats`,
ADD COLUMN `endo_repeats` INT(5) NULL DEFAULT NULL AFTER `ecto_weight`,
ADD COLUMN `endo_weight` DOUBLE NULL DEFAULT NULL AFTER `endo_repeats`,
ADD COLUMN `round` INT(3) NULL DEFAULT NULL AFTER `endo_weight`,
ADD COLUMN `round_group` CHAR(50) NULL DEFAULT NULL AFTER `round`;
UPDATE configuration set config_value = "1.0.55", date_change=CURRENT_DATE WHERE config_key = "db_version";
COMMIT;

View File

@ -1,4 +1,4 @@
#aitrainer server API v1.0.14
#aitrainer server API v1.0.54
connects the MYSQL Database
provide a RESTful API for the mobile app

View File

@ -17,6 +17,7 @@ data class TrainingPlan (
@Expose var internalName: String?,
@Expose var free: Boolean?,
@Expose @get: NotBlank var active: Boolean = false,
@Expose var nextTrainingPlanId: Int?,
) {
@OneToMany(cascade = [(CascadeType.ALL)], fetch = FetchType.EAGER, mappedBy = "trainingPlan")
@Fetch(value = FetchMode.SUBSELECT)

View File

@ -18,6 +18,12 @@ data class TrainingPlanDetail (
@Expose var parallel: Boolean? = false,
@Expose var day: String? = null,
@Expose var dayId: Int? = 0,
@Expose var ectoRepeats: Int? = 0,
@Expose var ectoWeight: Double? = 0.0,
@Expose var endoRepeats: Int? = 0,
@Expose var endoWeight: Double? = 0.0,
@Expose var round: Int? = 0,
@Expose var roundGroup: String? = null,
) {

View File

@ -17,6 +17,6 @@ logging.config=classpath:logback-spring.xml
logging.file=logs
# if the database structure has been changed, increment this version number
application.version=1.0.54
application.version=1.0.55
jwt.secret=aitrainer

View File

@ -17,7 +17,7 @@ logging.config=classpath:logback-spring.xml
logging.file=logs
# if the database structure has been changed, increment this version number
application.version=1.0.54
application.version=1.0.55
jwt.secret=aitrainer
jasypt.encryptor.password=Tibor