Merge branch 'tibor' into 'master'

API 1.0.53 customer.life_long

See merge request bossanyit/aitrainer_server!77
This commit is contained in:
Bossányi Tibor 2021-11-05 17:56:29 +00:00
commit 32bebdc590
7 changed files with 17 additions and 3 deletions

View File

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

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

@ -0,0 +1,10 @@
START TRANSACTION;
ALTER TABLE `customer`
ADD COLUMN `life_long` TINYINT NULL DEFAULT NULL AFTER `phone`;
UPDATE configuration set config_value = "1.0.53", date_change=CURRENT_DATE WHERE config_key = "db_version";
COMMIT;

View File

@ -31,6 +31,7 @@ data class Customer (
@Expose var firebaseRegToken: String? = null,
@Expose var lang: String? = null,
@Expose var phone: String? = null,
@Expose var lifeLong: Int? = 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.52
application.version=1.0.53
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.52
application.version=1.0.53
jwt.secret=aitrainer
jasypt.encryptor.password=Tibor

View File

@ -77,6 +77,7 @@ class AppCustomerPackageTest {
assertEquals(customer.firebaseRegToken, "123456789asdfghjkl")
assertEquals(customer.lang!!.uppercase(), "HU")
assertEquals(customer.phone, "123456")
assertEquals(customer.lifeLong, 1)
}
record[0] == Exercises::class.simpleName -> {
val exercisesJson: String = record[1]

View File

@ -116,6 +116,7 @@ class CustomerTests {
customer.sportId = 2
customer.firebaseRegToken = "123456789asdfghjkl"
customer.phone = "123456"
customer.lifeLong = 1
var updatedCustomer = customerRepository.save(customer)
@ -128,6 +129,7 @@ class CustomerTests {
assertEquals(updatedCustomer.emailSubscription, 1)
assertEquals(updatedCustomer.firebaseRegToken, "123456789asdfghjkl")
assertEquals(updatedCustomer.phone, "123456")
assertEquals(updatedCustomer.lifeLong, 1)
customer.email = "sw@andio.biz"