API 1.0.52 customer.phone

This commit is contained in:
Tibor Bossanyi (Freelancer) 2021-10-05 17:48:45 +02:00
parent 77c7e17d4a
commit ca0312746e
7 changed files with 17 additions and 3 deletions

View File

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

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

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

View File

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

View File

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

View File

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