API 1.0.51 customer.lang

This commit is contained in:
Tibor Bossanyi (Freelancer) 2021-10-04 17:40:41 +02:00
parent 254bc6c5ff
commit 77c7e17d4a
6 changed files with 16 additions and 3 deletions

View File

@ -11,7 +11,7 @@ plugins {
}
group = "com.aitrainer"
version = "1.0.50"
version = "1.0.51"
java.sourceCompatibility = JavaVersion.VERSION_1_8
repositories {

10
data/db/update_1_0_51.sql Normal file
View File

@ -0,0 +1,10 @@
START TRANSACTION;
ALTER TABLE `customer`
ADD COLUMN `lang` CHAR(5) NULL DEFAULT NULL AFTER `firebase_reg_token`;
UPDATE configuration set config_value = "1.0.51", date_change=CURRENT_DATE WHERE config_key = "db_version";
COMMIT;

View File

@ -29,6 +29,7 @@ data class Customer (
@Expose var syncedDate: String? = null,
@Expose var trialDate: String? = null,
@Expose var firebaseRegToken: String? = null,
@Expose var lang: String? = null,
@Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Expose var customerId: Long = 0,
)

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.50
application.version=1.0.51
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.50
application.version=1.0.51
jwt.secret=aitrainer
jasypt.encryptor.password=Tibor

View File

@ -42,6 +42,7 @@ class AppCustomerPackageTest {
@Autowired
private lateinit var customerTrainingPlanRepository: CustomerTrainingPlanRepository
@OptIn(ExperimentalStdlibApi::class)
@Test
fun customerPackageTest() {
val gson = Gson()
@ -74,6 +75,7 @@ class AppCustomerPackageTest {
assertEquals(customer.trialDate, "2021-08-07 08:00:00")
assertEquals(customer.syncedDate, "2021-08-06 08:00:00")
assertEquals(customer.firebaseRegToken, "123456789asdfghjkl")
assertEquals(customer.lang!!.uppercase(), "HU")
}
record[0] == Exercises::class.simpleName -> {
val exercisesJson: String = record[1]