commit d8a1fac678a38ba346efb24edbbb2e7b8dd9a382 Author: Jaka Ramdani Date: Mon May 11 20:01:23 2026 +0700 initial import diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b641777 --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +.gradle +.studio +*.ipr +*.iml +*.iws +build/* +deploy/* +modules/*/build/* +.idea/* +out +test-run \ No newline at end of file diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..576c21f --- /dev/null +++ b/build.gradle @@ -0,0 +1,202 @@ +buildscript { + ext.cubaVersion = '7.2.6' + repositories { + mavenLocal() + maven { + url 'https://repo.cuba-platform.com/content/groups/work' + credentials { + username(rootProject.hasProperty('repoUser') ? rootProject['repoUser'] : 'cuba') + password(rootProject.hasProperty('repoPass') ? rootProject['repoPass'] : 'cuba123') + } + } + + } + dependencies { + classpath "com.haulmont.gradle:cuba-plugin:$cubaVersion" + } +} + +def modulePrefix = 'tmsext' + +def globalModule = project(":${modulePrefix}-global") +def coreModule = project(":${modulePrefix}-core") +def webModule = project(":${modulePrefix}-web") + +def servletApi = 'javax.servlet:javax.servlet-api:3.1.0' + +apply(plugin: 'cuba') + +cuba { + artifact { + group = 'com.cmobile.unifiedtms.ext' + version = '0.2' + isSnapshot = false + } + tomcat { + dir = "$project.rootDir/deploy/tomcat" + } +} + +dependencies { + appComponent("com.haulmont.cuba:cuba-global:$cubaVersion") +} + +def postgres = 'org.postgresql:postgresql:42.2.9' + +configure([globalModule, coreModule, webModule]) { + apply(plugin: 'java') + apply(plugin: 'maven') + apply(plugin: 'cuba') + + dependencies { + testCompile('junit:junit:4.12') + } + + task sourceJar(type: Jar) { + from file('src') + classifier = 'sources' + } + + artifacts { + archives sourceJar + } +} + +configure(globalModule) { + dependencies { + if (!JavaVersion.current().isJava8()) { + runtime('javax.xml.bind:jaxb-api:2.3.1') + runtime('org.glassfish.jaxb:jaxb-runtime:2.3.1') + } + } + entitiesEnhancing { + main { + enabled = true + } + } + + jar { + manifest { + attributes('App-Component-Id': cuba.artifact.group) + attributes('App-Component-Version': cuba.artifact.version + (cuba.artifact.isSnapshot ? '-SNAPSHOT' : '')) + } + } +} + +configure(coreModule) { + + configurations { + jdbc + dbscripts + } + + dependencies { + compile(globalModule) + compileOnly(servletApi) + jdbc(postgres) + testRuntime(postgres) + compile('org.apache.poi:poi-ooxml:4.1.1') + } + + task cleanConf(description: 'Cleans up conf directory', type: Delete) { + delete "$cuba.appHome/${modulePrefix}-core/conf" + } + + task deploy(dependsOn: [assemble, cleanConf], type: CubaDeployment) { + appName = "${modulePrefix}-core" + appJars(modulePrefix + '-global', modulePrefix + '-core') + } + + task createDb(dependsOn: assembleDbScripts, description: 'Creates local database', type: CubaDbCreation) { + dbms = 'postgres' + host = 'localhost:5432' + dbName = 'tms' + dbUser = 'postgres' + dbPassword = 'postgres' + } + + task updateDb(dependsOn: assembleDbScripts, description: 'Updates local database', type: CubaDbUpdate) { + dbms = 'postgres' + host = 'localhost:5432' + dbName = 'tms' + dbUser = 'postgres' + dbPassword = 'postgres' + } +} + + +configure(webModule) { + configurations { + webcontent + } + + dependencies { + compileOnly(servletApi) + compile(globalModule) + } + + + task webArchive(type: Zip) { + from file("$buildDir/web") + from file('web') + classifier = 'web' + } + + artifacts { + archives webArchive + } + + task deployConf(type: Copy) { + from file('src') + include "/com/cmobile/unifiedtms/ext/**" + into "$cuba.appHome/${modulePrefix}/conf" + } + + task clearMessagesCache(type: CubaClearMessagesCache) { + appName = "${modulePrefix}" + } + deployConf.dependsOn clearMessagesCache + + task cleanConf(description: 'Cleans up conf directory', type: Delete) { + delete "$cuba.appHome/${modulePrefix}/conf" + } + + task deploy(dependsOn: [assemble, cleanConf], type: CubaDeployment) { + appName = "${modulePrefix}" + appJars(modulePrefix + '-global', modulePrefix + '-web') + } + + task buildScssThemes(type: CubaWebScssThemeCreation) + + task deployThemes(type: CubaDeployThemeTask, dependsOn: buildScssThemes) + + assemble.dependsOn buildScssThemes + + task themesJar(type: Jar) { + from file('themes') + classifier = 'themes' + } + + artifacts { + archives themesJar + } +} + + +task undeploy(type: Delete, dependsOn: ":${modulePrefix}-web:cleanConf") { + delete("$cuba.tomcat.dir/shared") + delete("$cuba.tomcat.dir/webapps/${modulePrefix}-core") + delete("$cuba.tomcat.dir/webapps/${modulePrefix}") +} + +task restart(dependsOn: ['stop', ":${modulePrefix}-core:deploy", ":${modulePrefix}-web:deploy"], description: 'Redeploys applications and restarts local Tomcat') { + doLast { + ant.waitfor(maxwait: 6, maxwaitunit: 'second', checkevery: 2, checkeveryunit: 'second') { + not { + socket(server: 'localhost', port: '8787') + } + } + } +} +restart.finalizedBy start + diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..5c2d1cf Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..5028f28 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100644 index 0000000..83f2acf --- /dev/null +++ b/gradlew @@ -0,0 +1,188 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..9618d8d --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,100 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/modules/core/.classpath b/modules/core/.classpath new file mode 100644 index 0000000..c72a432 --- /dev/null +++ b/modules/core/.classpath @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/core/.project b/modules/core/.project new file mode 100644 index 0000000..6e6a66f --- /dev/null +++ b/modules/core/.project @@ -0,0 +1,18 @@ + + + tms-core + + + + org.eclipse.jdt.core.javanature + org.eclipse.jdt.groovy.core.groovyNature + + + + org.eclipse.jdt.core.javabuilder + + + + + + diff --git a/modules/core/.settings/org.eclipse.jdt.core.prefs b/modules/core/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..6f18724 --- /dev/null +++ b/modules/core/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,13 @@ +# +#Tue Feb 26 15:48:52 ICT 2019 +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error diff --git a/modules/core/db/init/hsql/10.create-db.sql b/modules/core/db/init/hsql/10.create-db.sql new file mode 100644 index 0000000..ee1b742 --- /dev/null +++ b/modules/core/db/init/hsql/10.create-db.sql @@ -0,0 +1,495 @@ +-- begin TMS_TERMINAL +create table TMS_TERMINAL ( + ID varchar(36) not null, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + TERMINAL_ID varchar(8) not null, + MERCHANT_ID varchar(15) not null, + MERCHANT_NAME1 varchar(20) not null, + MERCHANT_NAME2 varchar(20), + MERCHANT_NAME3 varchar(20), + MERCHANT_PASSWORD varchar(6), + ADMIN_PASSWORD varchar(6), + INITIALISE_PASSWORD varchar(6), + TIME_OF_SETTLEMENT integer, + SETTLE_TIME1 varchar(4), + SETTLE_TIME2 varchar(4), + SETTLE_TIME3 varchar(4), + PASSWORD_VOID boolean, + PASSWORD_ADJUST boolean, + PASSWORD_REFUND boolean, + PASSWORD_OFFLINE boolean, + PUSH_SETTLE_IN_DAYS integer, + SETTLE_MAX_TRX_COUNT integer, + SETTLE_PERIOD integer, + SETTLE_ATTEMPT integer, + PROFILE_ID varchar(36), + AUTO_SETTLE boolean, + TRACK2_TOP_UP_TUNAI varchar(40), + REDEMPTION boolean, + SMART_SPENDING boolean, + LOYALTY_PURSE_ID1 varchar(10), + LOYALTY_PURSE_ID2 varchar(10), + LOYALTY_PURSE_ID3 varchar(10), + EMV_INFORMATION boolean, + CVM_ONLINE_PIN_BYPASS boolean, + CVM_SIGN_PROMPT_PIN boolean, + AUTO_INIT boolean, + AUTO_INIT_NII varchar(255), + CALL_CENTER1 varchar(255), + CALL_CENTER2 varchar(255), + IMPORT_DEFAULT boolean, + -- + primary key (ID) +)^ +-- end TMS_TERMINAL + +-- begin TMS_APPLICATION +create table TMS_APPLICATION ( + ID varchar(36) not null, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + NAME varchar(50) not null, + PACKAGE_NAME varchar(100) not null, + APP_VERSION varchar(10), + DESCRIPTION varchar(255), + APK_ID varchar(36), + CHANGELOG longvarchar, + IMPORT_DEFAULT boolean, + -- + primary key (ID) +)^ +-- end TMS_APPLICATION + +-- begin TMS_CAPK +create table TMS_CAPK ( + ID varchar(36) not null, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + NAME varchar(50) not null, + IDX varchar(255) not null, + RID varchar(10) not null, + MODULUS longvarchar not null, + EXPONENT varchar(4) not null, + ALGO varchar(2) not null, + HASH longvarchar not null, + EXPIRY_DATE date, + REMARK varchar(100), + -- + primary key (ID) +)^ +-- end TMS_CAPK +-- begin TMS_AID +create table TMS_AID ( + ID varchar(36) not null, + VERSION integer not null, + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + CREATE_TS timestamp, + CREATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + NAME varchar(255) not null, + TXN_TYPE varchar(8) not null, + AID varchar(20) not null, + AID_VERSION varchar(4) not null, + TAC_DEFAULT varchar(10) not null, + TAC_DENIAL varchar(10) not null, + TAC_ONLINE varchar(10) not null, + THRESHOLD varchar(12) not null, + TARGET_PERCENTAGE varchar(4) not null, + MAX_TARGET_PERCENTAGE varchar(4) not null, + DDOL longvarchar not null, + TDOL longvarchar not null, + FLOOR_LIMIT varchar(8) not null, + APP_SELECT varchar(2) not null, + AID_PRIORITY varchar(2) not null, + TRX_TYPE9C varchar(2) not null, + CATEGORY_CODE varchar(2) not null, + CL_KERNEL_TO_USE varchar(4), + CL_OPTIONS varchar(8), + CL_TRX_LIMIT varchar(12), + CL_CVM_LIMIT varchar(12), + CL_FLOOR_LIMIT varchar(12), + REMARK varchar(100), + -- + primary key (ID) +)^ +-- end TMS_AID +-- begin TMS_CARD +create table TMS_CARD ( + ID varchar(36) not null, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + NAME varchar(100) not null, + BIN_RANGE_START varchar(10) not null, + BIN_RANGE_END varchar(10) not null, + CARD_NUM_LENGTH integer not null, + PAN_DIGIT_UNMASKING varchar(20) not null, + PRINT_CARDHOLDER_COPY boolean, + PRINT_MERCHANT_COPY boolean, + PRINT_BANK_COPY boolean, + PIN_LENGTH integer, + PIN_PROMPT boolean, + -- + primary key (ID) +)^ +-- end TMS_CARD +-- begin TMS_ISSUER +create table TMS_ISSUER ( + ID varchar(36) not null, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + NAME varchar(30) not null, + ISSUER_ID varchar(10) not null, + CAPTURE_TRANS boolean, + PRINT_RECEIPT boolean, + ACCOUNT_SELECT boolean, + PIN_ENTRY boolean, + CHECK_MOD10 boolean, + CHECK_EXP_DATE boolean, + MANUAL_PAN_ENTRY boolean, + ENABLE_OFFLINE boolean, + ENABLE_ADJUST boolean, + DISABLE_REFUND boolean, + DISABLE_CARD_VER boolean, + DISABLE_VOID boolean, + DISABLE_REWARD boolean, + DISABLE_INSTALLMENT boolean, + DISABLE_CASH boolean, + DISABLE_AUTH boolean, + DISABLE_BALANCE_INQUIRY boolean, + BALANCE_INQUIRY_SLIP boolean, + DISABLE_POINT_BAL_INQ boolean, + ENABLE_PRINT_POINT_BAL boolean, + AUTO_CALCULATION boolean, + ON_US boolean, + INQ_SALDO boolean, + CASH_WITHDRAWAL boolean, + TRANSFER_BNI boolean, + TRANSFER_ANTAR_BANK boolean, + REG_E_CHANNEL boolean, + PAYMENT_TELKOM boolean, + PULSA_TELKOMSEL boolean, + BPJS_KESEHATAN boolean, + BNI_CC_PAYMENT boolean, + TAPCASH_TOPUP boolean, + CASH_DEPOSIT boolean, + IMIGRASI boolean, + PAJAK_PNBP_BEA_CUKAI boolean, + INTEREST varchar(10), + FLOOR_LIMIT varchar(10), + TIP_ADJUST varchar(10), + DEFAULT_ACCOUNT varchar(2), + ACQUIRER_ID varchar(36), + -- + primary key (ID) +)^ +-- end TMS_ISSUER +-- begin TMS_ACQUIRER +create table TMS_ACQUIRER ( + ID varchar(36) not null, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + NAME varchar(30) not null, + HOST_ID varchar(3), + NUMBER_OF_PRINT integer, + RESP_TIMEOUT integer, + FORCE_SETTLE_DAYS integer, + FORCE_SETTLE_TM_COUNT integer, + ACQUIRER_ID varchar(2), + HOST_DESTINATION_ADDR varchar(100), + HOST_DESTINATION_PORT varchar(6), + SHOW_PRINT_EXP_DATE boolean, + TLE_ACQUIRER boolean, + TLE_SETTING_ID varchar(36), + MASTER_KEY_LOCATION varchar(4), + MASTER_KEY longvarchar, + WORKING_KEY longvarchar, + ACQUIRER_TYPE varchar(50) not null, + _TERMINAL_ID varchar(36), + BATCH_NUMBER varchar(6), + MERCHANT_ID varchar(15), + TERMINAL_ID varchar(8), + -- + primary key (ID) +)^ +-- end TMS_ACQUIRER +-- begin TMS_PROFILE +create table TMS_PROFILE ( + ID varchar(36) not null, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + CODE varchar(15) not null, + NAME varchar(30) not null, + TERMINAL_ID varchar(36), + NOTE varchar(30), + -- + primary key (ID) +)^ +-- end TMS_PROFILE +-- begin TMS_TLE_SETTING +create table TMS_TLE_SETTING ( + ID varchar(36) not null, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + TLE_EFT_SEC varchar(10) not null, + TLE_ID varchar(2) not null, + ACQUIRER_ID varchar(3) not null, + LTMK_AID varchar(3) not null, + VENDOR_ID varchar(8) not null, + TLE_VER varchar(1) not null, + KMS_SECURE_NII varchar(4), + EDC_SECURE_NII varchar(4), + CAPK_EXPONENT varchar(2), + CAPK_LENGTH integer, + CAPK_VALUE longvarchar, + AID_LENGTH integer, + AID_VALUE longvarchar, + FIELD_ENCRYPTED1 varchar(3), + FIELD_ENCRYPTED2 varchar(3), + FIELD_ENCRYPTED3 varchar(3), + FIELD_ENCRYPTED4 varchar(3), + FIELD_ENCRYPTED5 varchar(3), + FIELD_ENCRYPTED6 varchar(3), + -- + primary key (ID) +)^ +-- end TMS_TLE_SETTING +-- begin TMS_DEVICE +create table TMS_DEVICE ( + ID varchar(36) not null, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + IMEI varchar(40) not null, + SN varchar(40) not null, + BRAND varchar(100) not null, + MODEL varchar(50) not null, + MANUFACTURER varchar(255) not null, + IMPORT_DEFAULT boolean, + -- + primary key (ID) +)^ +-- end TMS_DEVICE +-- begin TMS_TERMINAL_USER +create table TMS_TERMINAL_USER ( + ID varchar(36) not null, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + TERMINAL_ID varchar(36), + USERNAME varchar(255) not null, + -- + primary key (ID) +)^ +-- end TMS_TERMINAL_USER +-- begin TMS_DEVICE_TERMINAL +create table TMS_DEVICE_TERMINAL ( + ID varchar(36) not null, + VERSION integer not null, + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + CREATE_TS timestamp, + CREATED_BY varchar(50), + -- + DEVICE_ID varchar(36) not null, + TERMINAL_ID varchar(36) not null, + -- + primary key (ID) +)^ +-- end TMS_DEVICE_TERMINAL +-- begin TMS_DEVICE_LOCATION +create table TMS_DEVICE_LOCATION ( + ID varchar(36) not null, + -- + DEVICE_ID varchar(36), + LAT double precision, + LON double precision, + LOG_TIME timestamp, + -- + primary key (ID) +)^ +-- end TMS_DEVICE_LOCATION +-- begin TMS_PUBLIC_KEY_SETTING +create table TMS_PUBLIC_KEY_SETTING ( + ID varchar(36) not null, + VERSION integer not null, + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + CREATE_TS timestamp, + CREATED_BY varchar(50), + -- + IDX varchar(5) not null, + RID varchar(10) not null, + MODULUS longvarchar not null, + EXPONENT varchar(2) not null, + HASH longvarchar not null, + ALGO varchar(2) not null, + -- + primary key (ID) +)^ +-- end TMS_PUBLIC_KEY_SETTING +-- begin TMS_APPLICATION_THIRD_PARTY +create table TMS_APPLICATION_THIRD_PARTY ( + ID varchar(36) not null, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + NAME varchar(50) not null, + PACKAGE_NAME varchar(100) not null, + APP_VERSION varchar(10), + DESCRIPTION varchar(255), + APK_ID varchar(36), + CHANGELOG longvarchar, + IMPORT_DEFAULT boolean, + -- + primary key (ID) +)^ +-- end TMS_APPLICATION_THIRD_PARTY +-- begin TMS_ISSUER_CARD_DELETE_HISTORY +create table TMS_ISSUER_CARD_DELETE_HISTORY ( + ID varchar(36) not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + -- + ISSUER_ID varchar(36) not null, + CARD_ID varchar(36) not null, + FLAG varchar(1) not null, + PIN_PROMPT boolean, + -- + primary key (ID) +)^ +-- end TMS_ISSUER_CARD_DELETE_HISTORY +-- begin TMS_APPLICATION_INTENT +create table TMS_APPLICATION_INTENT ( + ID varchar(36) not null, + VERSION integer not null, + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + CREATE_TS timestamp, + CREATED_BY varchar(50), + -- + NAME varchar(255) not null, + DESCRIPTION varchar(100), + APPLICATION_ID varchar(36), + ICON_ID varchar(36), + -- + primary key (ID) +)^ +-- end TMS_APPLICATION_INTENT +-- begin TMS_LAUNCHER_SETTING +create table TMS_LAUNCHER_SETTING ( + ID varchar(36) not null, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + CODE varchar(20) not null, + NAME varchar(50) not null, + GENERAL_PASSWORD varchar(20) not null, + ROOT_PASSWORD varchar(20) not null, + SHOW_MENU boolean not null, + MAIN_BANNER_IMAGE_ID varchar(36), + BACKGROUND_COLOR varchar(7), + TICKER_TEXT varchar(255), + -- + primary key (ID) +)^ +-- end TMS_LAUNCHER_SETTING +-- begin TMS_ISSUER_CARD_LINK +create table TMS_ISSUER_CARD_LINK ( + ISSUER_ID varchar(36) not null, + CARD_ID varchar(36) not null, + primary key (ISSUER_ID, CARD_ID) +)^ +-- end TMS_ISSUER_CARD_LINK +-- begin TMS_PROFILE_APPLICATION_THIRD_PARTY_LINK +create table TMS_PROFILE_APPLICATION_THIRD_PARTY_LINK ( + APPLICATION_THIRD_PARTY_ID varchar(36) not null, + PROFILE_ID varchar(36) not null, + primary key (APPLICATION_THIRD_PARTY_ID, PROFILE_ID) +)^ +-- end TMS_PROFILE_APPLICATION_THIRD_PARTY_LINK +-- begin TMS_PROFILE_APPLICATION_LINK +create table TMS_PROFILE_APPLICATION_LINK ( + APPLICATION_ID varchar(36) not null, + PROFILE_ID varchar(36) not null, + primary key (APPLICATION_ID, PROFILE_ID) +)^ +-- end TMS_PROFILE_APPLICATION_LINK +-- begin TMS_PROFILE_APPLICATION_INTENT_LINK +create table TMS_PROFILE_APPLICATION_INTENT_LINK ( + PROFILE_ID varchar(36) not null, + APPLICATION_INTENT_ID varchar(36) not null, + primary key (PROFILE_ID, APPLICATION_INTENT_ID) +)^ +-- end TMS_PROFILE_APPLICATION_INTENT_LINK diff --git a/modules/core/db/init/hsql/20.create-db.sql b/modules/core/db/init/hsql/20.create-db.sql new file mode 100644 index 0000000..44fca97 --- /dev/null +++ b/modules/core/db/init/hsql/20.create-db.sql @@ -0,0 +1,81 @@ +-- begin TMS_TERMINAL +alter table TMS_TERMINAL add constraint FK_TMS_TERMINAL_ON_PROFILE foreign key (PROFILE_ID) references TMS_PROFILE(ID)^ +create unique index IDX_TMS_TERMINAL_UNIQ_TERMINAL_ID on TMS_TERMINAL (TERMINAL_ID) ^ +create index IDX_TMS_TERMINAL_ON_PROFILE on TMS_TERMINAL (PROFILE_ID)^ +-- end TMS_TERMINAL +-- begin TMS_APPLICATION +alter table TMS_APPLICATION add constraint FK_TMS_APPLICATION_ON_APK foreign key (APK_ID) references SYS_FILE(ID)^ +create index IDX_TMS_APPLICATION_ON_APK on TMS_APPLICATION (APK_ID)^ +-- end TMS_APPLICATION + +-- begin TMS_ISSUER +alter table TMS_ISSUER add constraint FK_TMS_ISSUER_ON_ACQUIRER foreign key (ACQUIRER_ID) references TMS_ACQUIRER(ID)^ +create index IDX_TMS_ISSUER_ON_ACQUIRER on TMS_ISSUER (ACQUIRER_ID)^ +-- end TMS_ISSUER +-- begin TMS_ACQUIRER +alter table TMS_ACQUIRER add constraint FK_TMS_ACQUIRER_ON_TLE_SETTING foreign key (TLE_SETTING_ID) references TMS_TLE_SETTING(ID)^ +alter table TMS_ACQUIRER add constraint FK_TMS_ACQUIRER_ON__TERMINAL foreign key (_TERMINAL_ID) references TMS_TERMINAL(ID)^ +create index IDX_TMS_ACQUIRER_ON_TLE_SETTING on TMS_ACQUIRER (TLE_SETTING_ID)^ +create index IDX_TMS_ACQUIRER_ON__TERMINAL on TMS_ACQUIRER (_TERMINAL_ID)^ +-- end TMS_ACQUIRER +-- begin TMS_PROFILE +alter table TMS_PROFILE add constraint FK_TMS_PROFILE_ON_TERMINAL foreign key (TERMINAL_ID) references TMS_TERMINAL(ID)^ +create unique index IDX_TMS_PROFILE_UNIQ_CODE on TMS_PROFILE (CODE) ^ +create index IDX_TMS_PROFILE_ON_TERMINAL on TMS_PROFILE (TERMINAL_ID)^ +-- end TMS_PROFILE +-- begin TMS_TLE_SETTING +create unique index IDX_TMS_TLE_SETTING_UNIQ_TLE_EFT_SEC on TMS_TLE_SETTING (TLE_EFT_SEC) ^ +-- end TMS_TLE_SETTING +-- begin TMS_DEVICE +create unique index IDX_TMS_DEVICE_UNIQ_IMEI on TMS_DEVICE (IMEI) ^ +create unique index IDX_TMS_DEVICE_UNIQ_SN on TMS_DEVICE (SN) ^ +-- end TMS_DEVICE +-- begin TMS_TERMINAL_USER +alter table TMS_TERMINAL_USER add constraint FK_TMS_TERMINAL_USER_ON_TERMINAL foreign key (TERMINAL_ID) references TMS_TERMINAL(ID)^ +create index IDX_TMS_TERMINAL_USER_ON_TERMINAL on TMS_TERMINAL_USER (TERMINAL_ID)^ +-- end TMS_TERMINAL_USER +-- begin TMS_DEVICE_TERMINAL +alter table TMS_DEVICE_TERMINAL add constraint FK_TMS_DEVICE_TERMINAL_ON_DEVICE foreign key (DEVICE_ID) references TMS_DEVICE(ID)^ +alter table TMS_DEVICE_TERMINAL add constraint FK_TMS_DEVICE_TERMINAL_ON_TERMINAL foreign key (TERMINAL_ID) references TMS_TERMINAL(ID)^ +create unique index IDX_TMS_DEVICE_TERMINAL_UNQ on TMS_DEVICE_TERMINAL (DEVICE_ID, TERMINAL_ID) ^ +create index IDX_TMS_DEVICE_TERMINAL_ON_DEVICE on TMS_DEVICE_TERMINAL (DEVICE_ID)^ +create index IDX_TMS_DEVICE_TERMINAL_ON_TERMINAL on TMS_DEVICE_TERMINAL (TERMINAL_ID)^ +-- end TMS_DEVICE_TERMINAL +-- begin TMS_DEVICE_LOCATION +alter table TMS_DEVICE_LOCATION add constraint FK_TMS_DEVICE_LOCATION_ON_DEVICE foreign key (DEVICE_ID) references TMS_DEVICE(ID)^ +create index IDX_TMS_DEVICE_LOCATION_ON_DEVICE on TMS_DEVICE_LOCATION (DEVICE_ID)^ +-- end TMS_DEVICE_LOCATION +-- begin TMS_PUBLIC_KEY_SETTING +create unique index IDX_TMS_PUBLIC_KEY_SETTING_UNIQ_IDX on TMS_PUBLIC_KEY_SETTING (IDX) ^ +-- end TMS_PUBLIC_KEY_SETTING +-- begin TMS_APPLICATION_THIRD_PARTY +alter table TMS_APPLICATION_THIRD_PARTY add constraint FK_TMS_APPLICATION_THIRD_PARTY_ON_APK foreign key (APK_ID) references SYS_FILE(ID)^ +create index IDX_TMS_APPLICATION_THIRD_PARTY_ON_APK on TMS_APPLICATION_THIRD_PARTY (APK_ID)^ +-- end TMS_APPLICATION_THIRD_PARTY +-- begin TMS_APPLICATION_INTENT +alter table TMS_APPLICATION_INTENT add constraint FK_TMS_APPLICATION_INTENT_ON_APPLICATION foreign key (APPLICATION_ID) references TMS_APPLICATION(ID)^ +alter table TMS_APPLICATION_INTENT add constraint FK_TMS_APPLICATION_INTENT_ON_ICON foreign key (ICON_ID) references SYS_FILE(ID)^ +create index IDX_TMS_APPLICATION_INTENT_ON_APPLICATION on TMS_APPLICATION_INTENT (APPLICATION_ID)^ +create index IDX_TMS_APPLICATION_INTENT_ON_ICON on TMS_APPLICATION_INTENT (ICON_ID)^ +-- end TMS_APPLICATION_INTENT +-- begin TMS_LAUNCHER_SETTING +alter table TMS_LAUNCHER_SETTING add constraint FK_TMS_LAUNCHER_SETTING_ON_MAIN_BANNER_IMAGE foreign key (MAIN_BANNER_IMAGE_ID) references SYS_FILE(ID)^ +create unique index IDX_TMS_LAUNCHER_SETTING_UNIQ_CODE on TMS_LAUNCHER_SETTING (CODE) ^ +create index IDX_TMS_LAUNCHER_SETTING_ON_MAIN_BANNER_IMAGE on TMS_LAUNCHER_SETTING (MAIN_BANNER_IMAGE_ID)^ +-- end TMS_LAUNCHER_SETTING +-- begin TMS_ISSUER_CARD_LINK +alter table TMS_ISSUER_CARD_LINK add constraint FK_ISSCAR_ON_ISSUER foreign key (ISSUER_ID) references TMS_ISSUER(ID)^ +alter table TMS_ISSUER_CARD_LINK add constraint FK_ISSCAR_ON_CARD foreign key (CARD_ID) references TMS_CARD(ID)^ +-- end TMS_ISSUER_CARD_LINK +-- begin TMS_PROFILE_APPLICATION_THIRD_PARTY_LINK +alter table TMS_PROFILE_APPLICATION_THIRD_PARTY_LINK add constraint FK_PROAPPTHIPAR_ON_APPLICATION_THIRD_PARTY foreign key (APPLICATION_THIRD_PARTY_ID) references TMS_APPLICATION_THIRD_PARTY(ID)^ +alter table TMS_PROFILE_APPLICATION_THIRD_PARTY_LINK add constraint FK_PROAPPTHIPAR_ON_PROFILE foreign key (PROFILE_ID) references TMS_PROFILE(ID)^ +-- end TMS_PROFILE_APPLICATION_THIRD_PARTY_LINK +-- begin TMS_PROFILE_APPLICATION_LINK +alter table TMS_PROFILE_APPLICATION_LINK add constraint FK_PROAPP_ON_APPLICATION foreign key (APPLICATION_ID) references TMS_APPLICATION(ID)^ +alter table TMS_PROFILE_APPLICATION_LINK add constraint FK_PROAPP_ON_PROFILE foreign key (PROFILE_ID) references TMS_PROFILE(ID)^ +-- end TMS_PROFILE_APPLICATION_LINK +-- begin TMS_PROFILE_APPLICATION_INTENT_LINK +alter table TMS_PROFILE_APPLICATION_INTENT_LINK add constraint FK_PROAPPINT_ON_PROFILE foreign key (PROFILE_ID) references TMS_PROFILE(ID)^ +alter table TMS_PROFILE_APPLICATION_INTENT_LINK add constraint FK_PROAPPINT_ON_APPLICATION_INTENT foreign key (APPLICATION_INTENT_ID) references TMS_APPLICATION_INTENT(ID)^ +-- end TMS_PROFILE_APPLICATION_INTENT_LINK diff --git a/modules/core/db/init/hsql/30.create-db.sql b/modules/core/db/init/hsql/30.create-db.sql new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/modules/core/db/init/hsql/30.create-db.sql @@ -0,0 +1 @@ + diff --git a/modules/core/db/init/mysql/10.create-db.sql b/modules/core/db/init/mysql/10.create-db.sql new file mode 100644 index 0000000..36a195c --- /dev/null +++ b/modules/core/db/init/mysql/10.create-db.sql @@ -0,0 +1,16 @@ +-- begin TMS_TERMINAL +create table TMS_TERMINAL ( + ID varchar(32), + VERSION integer not null, + CREATE_TS datetime(3), + CREATED_BY varchar(50), + UPDATE_TS datetime(3), + UPDATED_BY varchar(50), + DELETE_TS datetime(3), + DELETED_BY varchar(50), + -- + IMEI varchar(40) not null, + -- + primary key (ID) +)^ +-- end TMS_TERMINAL diff --git a/modules/core/db/init/mysql/20.create-db.sql b/modules/core/db/init/mysql/20.create-db.sql new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/modules/core/db/init/mysql/20.create-db.sql @@ -0,0 +1 @@ + diff --git a/modules/core/db/init/mysql/30.create-db.sql b/modules/core/db/init/mysql/30.create-db.sql new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/modules/core/db/init/mysql/30.create-db.sql @@ -0,0 +1 @@ + diff --git a/modules/core/db/init/postgres/10.create-db.sql b/modules/core/db/init/postgres/10.create-db.sql new file mode 100644 index 0000000..64531b5 --- /dev/null +++ b/modules/core/db/init/postgres/10.create-db.sql @@ -0,0 +1,262 @@ +-- begin TMSEXT_PUBLIC_KEY_SETTING +create table TMSEXT_PUBLIC_KEY_SETTING ( + ID uuid, + VERSION integer not null, + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + CREATE_TS timestamp, + CREATED_BY varchar(50), + -- + IDX varchar(5) not null, + RID varchar(10) not null, + MODULUS text not null, + EXPONENT varchar(2) not null, + HASH text not null, + ALGO varchar(2) not null, + -- + primary key (ID) +)^ +-- end TMSEXT_PUBLIC_KEY_SETTING +-- begin TMSEXT_AID +create table TMSEXT_AID ( + ID uuid, + VERSION integer not null, + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + CREATE_TS timestamp, + CREATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + NAME varchar(255) not null, + TXN_TYPE varchar(8) not null, + AID varchar(32) not null, + AID_VERSION varchar(4) not null, + TAC_DEFAULT varchar(10) not null, + TAC_DENIAL varchar(10) not null, + TAC_ONLINE varchar(10) not null, + THRESHOLD varchar(12) not null, + TARGET_PERCENTAGE varchar(4) not null, + MAX_TARGET_PERCENTAGE varchar(4) not null, + DDOL text not null, + TDOL text not null, + FLOOR_LIMIT varchar(8) not null, + APP_SELECT varchar(2) not null, + AID_PRIORITY varchar(2) not null, + TRX_TYPE9C varchar(2) not null, + CATEGORY_CODE varchar(2) not null, + CL_KERNEL_TO_USE varchar(4), + CL_OPTIONS varchar(8), + CL_TRX_LIMIT varchar(12), + CL_CVM_LIMIT varchar(12), + CL_FLOOR_LIMIT varchar(12), + REMARK varchar(100), + EMV_CONF_TERM_CAPABILITY varchar(100), + ADDITIONAL_TERM_CAPABILITY varchar(100), + DATA_TTQ varchar(8), + -- + primary key (ID) +)^ +-- end TMSEXT_AID +-- begin TMSEXT_CARD +create table TMSEXT_CARD ( + ID uuid, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + NAME varchar(100) not null, + BIN_RANGE_START varchar(10) not null, + BIN_RANGE_END varchar(10) not null, + CARD_NUM_LENGTH integer not null, + PAN_DIGIT_UNMASKING varchar(20) not null, + PRINT_CARDHOLDER_COPY boolean, + PRINT_MERCHANT_COPY boolean, + PRINT_BANK_COPY boolean, + PIN_LENGTH integer, + PIN_PROMPT boolean, + -- + primary key (ID) +)^ +-- end TMSEXT_CARD +-- begin TMSEXT_ISSUER +create table TMSEXT_ISSUER ( + ID uuid, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + NAME varchar(30) not null, + ISSUER_ID varchar(10) not null, + ON_US boolean, + ACQUIRER_ID uuid, + -- + primary key (ID) +)^ +-- end TMSEXT_ISSUER +-- begin TMSEXT_TERMINAL_EXT +create table TMSEXT_TERMINAL_EXT ( + ID uuid, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + TERMINAL_ID varchar(8) not null, + MERCHANT_ID varchar(15) not null, + MERCHANT_NAME1 varchar(30) not null, + MERCHANT_NAME2 varchar(30), + MERCHANT_NAME3 varchar(30), + MERCHANT_PASSWORD varchar(8), + ADMIN_PASSWORD varchar(8), + SETTLEMENT_PASSWORD varchar(8), + VOID_PASSWORD varchar(8), + SETTLE_MAX_TRX_COUNT integer, + SETTLE_WARNING_TRX_COUNT integer, + CALL_CENTER1 varchar(255), + CALL_CENTER2 varchar(255), + BRIZZI_DISCOUNT_PERCENTAGE varchar(10), + BRIZZI_DISCOUNT_AMOUNT varchar(30), + FALLBACK_ENABLED boolean, + QRIS_COUNT_DOWN integer, + REPRINT_ONLINE_RETRY integer, + FEATURE_SALE boolean, + FEATURE_SALE_TIP boolean, + FEATURE_SALE_REDEMPTION boolean, + FEATURE_CARD_VERIFICATION boolean, + FEATURE_SALE_COMPLETION boolean, + FEATURE_INSTALLMENT boolean, + FEATURE_SALE_FARE_NON_FARE boolean, + FEATURE_MANUAL_KEY_IN boolean, + FEATURE_QRIS boolean, + INSTALLMENT1_OPTIONS varchar(20), + INSTALLMENT2_OPTIONS varchar(20), + INSTALLMENT3_OPTIONS varchar(20), + FEATURE_CONTACTLESS boolean, + RANDOM_PIN_KEYPAD boolean, + BEEP_PIN_KEYPAD boolean, + AUTO_LOGON boolean, + NEXT_LOGON integer, + PUSH_LOGON integer, + HOST_REPORT boolean, + HOST_LOGGING boolean, + SKIP_PASSWORD boolean, + -- + primary key (ID) +)^ +-- end TMSEXT_TERMINAL_EXT +-- begin TMSEXT_ACQUIRER +create table TMSEXT_ACQUIRER ( + ID uuid, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + NAME varchar(30) not null, + HOST_ID varchar(3), + SETTLEMENT_HOST_ID varchar(3), + NUMBER_OF_PRINT integer, + RESP_TIMEOUT integer, + ACQUIRER_ID varchar(2), + HOST_DESTINATION_ADDR varchar(100), + HOST_DESTINATION_PORT varchar(6), + SHOW_PRINT_EXP_DATE boolean, + CHECK_CARD_EXP_DATE boolean, + TLE_ACQUIRER boolean, + TLE_SETTING_ID uuid, + MASTER_KEY_LOCATION varchar(4), + MASTER_KEY text, + WORKING_KEY text, + ACQUIRER_TYPE varchar(50) not null, + BATCH_NUMBER varchar(6), + CREDIT_SETTLEMENT boolean, + DEBIT_SETTLEMENT boolean, + DESCRIPTION varchar(255), + -- + primary key (ID) +)^ +-- end TMSEXT_ACQUIRER +-- begin TMSEXT_CAPK +create table TMSEXT_CAPK ( + ID uuid, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + NAME varchar(50) not null, + IDX varchar(255) not null, + RID varchar(10) not null, + MODULUS text not null, + EXPONENT varchar(4) not null, + ALGO varchar(2) not null, + HASH text not null, + EXPIRY_DATE date, + REMARK varchar(100), + -- + primary key (ID) +)^ +-- end TMSEXT_CAPK +-- begin TMSEXT_TLE_SETTING +create table TMSEXT_TLE_SETTING ( + ID uuid, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + TLE_EFT_SEC varchar(10) not null, + TLE_ID varchar(2) not null, + ACQUIRER_ID varchar(3) not null, + LTMK_AID varchar(3) not null, + VENDOR_ID varchar(8) not null, + TLE_VER varchar(1) not null, + KMS_SECURE_NII varchar(4), + EDC_SECURE_NII varchar(4), + CAPK_EXPONENT varchar(2), + CAPK_LENGTH integer, + CAPK_VALUE text, + AID_LENGTH integer, + AID_VALUE text, + FIELD_ENCRYPTED1 varchar(3), + FIELD_ENCRYPTED2 varchar(3), + FIELD_ENCRYPTED3 varchar(3), + FIELD_ENCRYPTED4 varchar(3), + FIELD_ENCRYPTED5 varchar(3), + FIELD_ENCRYPTED6 varchar(3), + FIELD_ENCRYPTED7 varchar(3), + FIELD_ENCRYPTED8 varchar(3), + FIELD_ENCRYPTED9 varchar(3), + FIELD_ENCRYPTED10 varchar(3), + -- + primary key (ID) +)^ +-- end TMSEXT_TLE_SETTING +-- begin TMSEXT_ISSUER_CARD_LINK +create table TMSEXT_ISSUER_CARD_LINK ( + ISSUER_ID uuid, + CARD_ID uuid, + primary key (ISSUER_ID, CARD_ID) +)^ +-- end TMSEXT_ISSUER_CARD_LINK diff --git a/modules/core/db/init/postgres/20.create-db.sql b/modules/core/db/init/postgres/20.create-db.sql new file mode 100644 index 0000000..e815ac3 --- /dev/null +++ b/modules/core/db/init/postgres/20.create-db.sql @@ -0,0 +1,21 @@ +-- begin TMSEXT_PUBLIC_KEY_SETTING +create unique index IDX_TMSEXT_PUBLIC_KEY_SETTING_UK_IDX on TMSEXT_PUBLIC_KEY_SETTING (IDX) ^ +-- end TMSEXT_PUBLIC_KEY_SETTING +-- begin TMSEXT_ISSUER +alter table TMSEXT_ISSUER add constraint FK_TMSEXT_ISSUER_ON_ACQUIRER foreign key (ACQUIRER_ID) references TMSEXT_ACQUIRER(ID)^ +create index IDX_TMSEXT_ISSUER_ON_ACQUIRER on TMSEXT_ISSUER (ACQUIRER_ID)^ +-- end TMSEXT_ISSUER +-- begin TMSEXT_TERMINAL_EXT +create unique index IDX_TMSEXT_TERMINAL_EXT_UK_TERMINAL_ID on TMSEXT_TERMINAL_EXT (TERMINAL_ID) where DELETE_TS is null ^ +-- end TMSEXT_TERMINAL_EXT +-- begin TMSEXT_ACQUIRER +alter table TMSEXT_ACQUIRER add constraint FK_TMSEXT_ACQUIRER_ON_TLE_SETTING foreign key (TLE_SETTING_ID) references TMSEXT_TLE_SETTING(ID)^ +create index IDX_TMSEXT_ACQUIRER_ON_TLE_SETTING on TMSEXT_ACQUIRER (TLE_SETTING_ID)^ +-- end TMSEXT_ACQUIRER +-- begin TMSEXT_TLE_SETTING +create unique index IDX_TMSEXT_TLE_SETTING_UK_TLE_EFT_SEC on TMSEXT_TLE_SETTING (TLE_EFT_SEC) where DELETE_TS is null ^ +-- end TMSEXT_TLE_SETTING +-- begin TMSEXT_ISSUER_CARD_LINK +alter table TMSEXT_ISSUER_CARD_LINK add constraint FK_TMSISSCAR_ON_ISSUER foreign key (ISSUER_ID) references TMSEXT_ISSUER(ID)^ +alter table TMSEXT_ISSUER_CARD_LINK add constraint FK_TMSISSCAR_ON_CARD foreign key (CARD_ID) references TMSEXT_CARD(ID)^ +-- end TMSEXT_ISSUER_CARD_LINK diff --git a/modules/core/db/init/postgres/30.create-db.sql b/modules/core/db/init/postgres/30.create-db.sql new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/modules/core/db/init/postgres/30.create-db.sql @@ -0,0 +1 @@ + diff --git a/modules/core/db/update/hsql/17/170601-1-createDeviceModel.sql b/modules/core/db/update/hsql/17/170601-1-createDeviceModel.sql new file mode 100644 index 0000000..c0123f8 --- /dev/null +++ b/modules/core/db/update/hsql/17/170601-1-createDeviceModel.sql @@ -0,0 +1,16 @@ +create table TMS_DEVICE_MODEL ( + ID varchar(36) not null, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + BRAND varchar(100) not null, + MODEL varchar(50) not null, + MANUFACTURER varchar(255) not null, + -- + primary key (ID) +); diff --git a/modules/core/db/update/hsql/17/170601-1-createSoftware.sql b/modules/core/db/update/hsql/17/170601-1-createSoftware.sql new file mode 100644 index 0000000..dc259e8 --- /dev/null +++ b/modules/core/db/update/hsql/17/170601-1-createSoftware.sql @@ -0,0 +1,16 @@ +create table TMS_SOFTWARE ( + ID varchar(36) not null, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + OS varchar(50) not null, + SDK_VERSION varchar(255) not null, + APP_VERSION varchar(10) not null, + -- + primary key (ID) +); diff --git a/modules/core/db/update/hsql/17/170601-1-createTerminal.sql b/modules/core/db/update/hsql/17/170601-1-createTerminal.sql new file mode 100644 index 0000000..e34a28a --- /dev/null +++ b/modules/core/db/update/hsql/17/170601-1-createTerminal.sql @@ -0,0 +1,14 @@ +create table TMS_TERMINAL ( + ID varchar(36) not null, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + IMEI varchar(40) not null, + -- + primary key (ID) +); diff --git a/modules/core/db/update/hsql/17/170601-2-updateSoftware.sql b/modules/core/db/update/hsql/17/170601-2-updateSoftware.sql new file mode 100644 index 0000000..802c30a --- /dev/null +++ b/modules/core/db/update/hsql/17/170601-2-updateSoftware.sql @@ -0,0 +1 @@ +alter table TMS_SOFTWARE drop column APP_VERSION cascade ; diff --git a/modules/core/db/update/hsql/17/170601-2-updateTerminal.sql b/modules/core/db/update/hsql/17/170601-2-updateTerminal.sql new file mode 100644 index 0000000..618cda7 --- /dev/null +++ b/modules/core/db/update/hsql/17/170601-2-updateTerminal.sql @@ -0,0 +1,11 @@ +alter table TMS_TERMINAL add column SN varchar(40) ^ +update TMS_TERMINAL set SN = '' where SN is null ; +alter table TMS_TERMINAL alter column SN set not null ; +-- alter table TMS_TERMINAL add column MODEL_ID varchar(36) ^ +-- update TMS_TERMINAL set MODEL_ID = ; +-- alter table TMS_TERMINAL alter column MODEL_ID set not null ; +alter table TMS_TERMINAL add column MODEL_ID varchar(36) not null ; +-- alter table TMS_TERMINAL add column SOFTWARE_ID varchar(36) ^ +-- update TMS_TERMINAL set SOFTWARE_ID = ; +-- alter table TMS_TERMINAL alter column SOFTWARE_ID set not null ; +alter table TMS_TERMINAL add column SOFTWARE_ID varchar(36) not null ; diff --git a/modules/core/db/update/hsql/17/170601-2-updateTerminal01.sql b/modules/core/db/update/hsql/17/170601-2-updateTerminal01.sql new file mode 100644 index 0000000..7b54f67 --- /dev/null +++ b/modules/core/db/update/hsql/17/170601-2-updateTerminal01.sql @@ -0,0 +1 @@ +create unique index IDX_TMS_TERMINAL_UNIQ_IMEI on TMS_TERMINAL (IMEI) ; diff --git a/modules/core/db/update/hsql/17/170601-2-updateTerminal02.sql b/modules/core/db/update/hsql/17/170601-2-updateTerminal02.sql new file mode 100644 index 0000000..3cff5d0 --- /dev/null +++ b/modules/core/db/update/hsql/17/170601-2-updateTerminal02.sql @@ -0,0 +1 @@ +create unique index IDX_TMS_TERMINAL_UNIQ_SN on TMS_TERMINAL (SN) ; diff --git a/modules/core/db/update/hsql/17/170601-2-updateTerminal03.sql b/modules/core/db/update/hsql/17/170601-2-updateTerminal03.sql new file mode 100644 index 0000000..2054498 --- /dev/null +++ b/modules/core/db/update/hsql/17/170601-2-updateTerminal03.sql @@ -0,0 +1 @@ +alter table TMS_TERMINAL add constraint FK_TMS_TERMINAL_MODEL foreign key (MODEL_ID) references TMS_DEVICE_MODEL(ID); diff --git a/modules/core/db/update/hsql/17/170601-2-updateTerminal04.sql b/modules/core/db/update/hsql/17/170601-2-updateTerminal04.sql new file mode 100644 index 0000000..c89b56f --- /dev/null +++ b/modules/core/db/update/hsql/17/170601-2-updateTerminal04.sql @@ -0,0 +1 @@ +alter table TMS_TERMINAL add constraint FK_TMS_TERMINAL_SOFTWARE foreign key (SOFTWARE_ID) references TMS_SOFTWARE(ID); diff --git a/modules/core/db/update/hsql/17/170601-2-updateTerminal05.sql b/modules/core/db/update/hsql/17/170601-2-updateTerminal05.sql new file mode 100644 index 0000000..992500a --- /dev/null +++ b/modules/core/db/update/hsql/17/170601-2-updateTerminal05.sql @@ -0,0 +1,3 @@ +alter table TMS_TERMINAL add column APP_VERSION varchar(10) ^ +update TMS_TERMINAL set APP_VERSION = '' where APP_VERSION is null ; +alter table TMS_TERMINAL alter column APP_VERSION set not null ; diff --git a/modules/core/db/update/hsql/17/170719-1-createTerminalGroup.sql b/modules/core/db/update/hsql/17/170719-1-createTerminalGroup.sql new file mode 100644 index 0000000..13c428a --- /dev/null +++ b/modules/core/db/update/hsql/17/170719-1-createTerminalGroup.sql @@ -0,0 +1,15 @@ +create table TMS_TERMINAL_GROUP ( + ID varchar(36) not null, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + NAME varchar(50) not null, + DESCRIPTION varchar(255), + -- + primary key (ID) +); diff --git a/modules/core/db/update/hsql/17/170719-2-updateTerminal.sql b/modules/core/db/update/hsql/17/170719-2-updateTerminal.sql new file mode 100644 index 0000000..ad4c01d --- /dev/null +++ b/modules/core/db/update/hsql/17/170719-2-updateTerminal.sql @@ -0,0 +1 @@ +alter table TMS_TERMINAL add column TERMINAL_GROUP_ID varchar(36) ; diff --git a/modules/core/db/update/hsql/17/170719-2-updateTerminal01.sql b/modules/core/db/update/hsql/17/170719-2-updateTerminal01.sql new file mode 100644 index 0000000..9d81fb2 --- /dev/null +++ b/modules/core/db/update/hsql/17/170719-2-updateTerminal01.sql @@ -0,0 +1,2 @@ +alter table TMS_TERMINAL add constraint FK_TMS_TERMINAL_TERMINAL_GROUP foreign key (TERMINAL_GROUP_ID) references TMS_TERMINAL_GROUP(ID); +create index IDX_TMS_TERMINAL_TERMINAL_GROUP on TMS_TERMINAL (TERMINAL_GROUP_ID); diff --git a/modules/core/db/update/hsql/17/170726-1-createApplication.sql b/modules/core/db/update/hsql/17/170726-1-createApplication.sql new file mode 100644 index 0000000..ac5ae27 --- /dev/null +++ b/modules/core/db/update/hsql/17/170726-1-createApplication.sql @@ -0,0 +1,17 @@ +create table TMS_APPLICATION ( + ID varchar(36) not null, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + APK longvarbinary, + APP_VERSION varchar(10), + DESCRIPTION varchar(255), + CHANGELOG longvarchar, + -- + primary key (ID) +); diff --git a/modules/core/db/update/hsql/17/170726-1-createApplication01.sql b/modules/core/db/update/hsql/17/170726-1-createApplication01.sql new file mode 100644 index 0000000..ac5ae27 --- /dev/null +++ b/modules/core/db/update/hsql/17/170726-1-createApplication01.sql @@ -0,0 +1,17 @@ +create table TMS_APPLICATION ( + ID varchar(36) not null, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + APK longvarbinary, + APP_VERSION varchar(10), + DESCRIPTION varchar(255), + CHANGELOG longvarchar, + -- + primary key (ID) +); diff --git a/modules/core/db/update/hsql/17/170726-1-createApplication02.sql b/modules/core/db/update/hsql/17/170726-1-createApplication02.sql new file mode 100644 index 0000000..ac5ae27 --- /dev/null +++ b/modules/core/db/update/hsql/17/170726-1-createApplication02.sql @@ -0,0 +1,17 @@ +create table TMS_APPLICATION ( + ID varchar(36) not null, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + APK longvarbinary, + APP_VERSION varchar(10), + DESCRIPTION varchar(255), + CHANGELOG longvarchar, + -- + primary key (ID) +); diff --git a/modules/core/db/update/hsql/17/170726-1-createParam.sql b/modules/core/db/update/hsql/17/170726-1-createParam.sql new file mode 100644 index 0000000..5df376d --- /dev/null +++ b/modules/core/db/update/hsql/17/170726-1-createParam.sql @@ -0,0 +1,16 @@ +create table TMS_PARAM ( + ID varchar(36) not null, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + PARAM_KEY_ID varchar(36) not null, + PARAM_VALUE longvarchar not null, + PARAM_GROUP_ID varchar(36), + -- + primary key (ID) +); diff --git a/modules/core/db/update/hsql/17/170726-1-createParamGroup.sql b/modules/core/db/update/hsql/17/170726-1-createParamGroup.sql new file mode 100644 index 0000000..f5853da --- /dev/null +++ b/modules/core/db/update/hsql/17/170726-1-createParamGroup.sql @@ -0,0 +1,15 @@ +create table TMS_PARAM_GROUP ( + ID varchar(36) not null, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + NAME varchar(100) not null, + DESCRIPTION varchar(255), + -- + primary key (ID) +); diff --git a/modules/core/db/update/hsql/17/170726-1-createParamKey.sql b/modules/core/db/update/hsql/17/170726-1-createParamKey.sql new file mode 100644 index 0000000..da41b64 --- /dev/null +++ b/modules/core/db/update/hsql/17/170726-1-createParamKey.sql @@ -0,0 +1,15 @@ +create table TMS_PARAM_KEY ( + ID varchar(36) not null, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + PARAM_KEY varchar(50) not null, + DESCRIPTION varchar(255), + -- + primary key (ID) +); diff --git a/modules/core/db/update/hsql/17/170726-1-createTerminalParams.sql b/modules/core/db/update/hsql/17/170726-1-createTerminalParams.sql new file mode 100644 index 0000000..a0fa0df --- /dev/null +++ b/modules/core/db/update/hsql/17/170726-1-createTerminalParams.sql @@ -0,0 +1,14 @@ +create table TMS_TERMINAL_PARAMS ( + ID varchar(36) not null, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + PARAMS_ID varchar(36), + -- + primary key (ID) +); diff --git a/modules/core/db/update/hsql/17/170726-1-createTerminalUptime.sql b/modules/core/db/update/hsql/17/170726-1-createTerminalUptime.sql new file mode 100644 index 0000000..2c84011 --- /dev/null +++ b/modules/core/db/update/hsql/17/170726-1-createTerminalUptime.sql @@ -0,0 +1,15 @@ +create table TMS_TERMINAL_UPTIME ( + ID varchar(36) not null, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + TERMINAL_ID varchar(36), + STARTUP_TIME timestamp, + -- + primary key (ID) +); diff --git a/modules/core/db/update/hsql/17/170726-2-createParam.sql b/modules/core/db/update/hsql/17/170726-2-createParam.sql new file mode 100644 index 0000000..8f4d884 --- /dev/null +++ b/modules/core/db/update/hsql/17/170726-2-createParam.sql @@ -0,0 +1,3 @@ +alter table TMS_PARAM add constraint FK_TMS_PARAM_PARAM_KEY foreign key (PARAM_KEY_ID) references TMS_PARAM_KEY(ID); +alter table TMS_PARAM add constraint FK_TMS_PARAM_PARAM_GROUP foreign key (PARAM_GROUP_ID) references TMS_PARAM_GROUP(ID); +create index IDX_TMS_PARAM_PARAM_GROUP on TMS_PARAM (PARAM_GROUP_ID); diff --git a/modules/core/db/update/hsql/17/170726-2-createParamGroup.sql b/modules/core/db/update/hsql/17/170726-2-createParamGroup.sql new file mode 100644 index 0000000..02212e4 --- /dev/null +++ b/modules/core/db/update/hsql/17/170726-2-createParamGroup.sql @@ -0,0 +1 @@ +create unique index IDX_TMS_PARAM_GROUP_UNIQ_NAME on TMS_PARAM_GROUP (NAME) ; diff --git a/modules/core/db/update/hsql/17/170726-2-createParamKey.sql b/modules/core/db/update/hsql/17/170726-2-createParamKey.sql new file mode 100644 index 0000000..bcc9077 --- /dev/null +++ b/modules/core/db/update/hsql/17/170726-2-createParamKey.sql @@ -0,0 +1 @@ +create unique index IDX_TMS_PARAM_KEY_UNIQ_PARAM_KEY on TMS_PARAM_KEY (PARAM_KEY) ; diff --git a/modules/core/db/update/hsql/17/170726-2-createTerminalParams.sql b/modules/core/db/update/hsql/17/170726-2-createTerminalParams.sql new file mode 100644 index 0000000..ce2bf65 --- /dev/null +++ b/modules/core/db/update/hsql/17/170726-2-createTerminalParams.sql @@ -0,0 +1 @@ +alter table TMS_TERMINAL_PARAMS add constraint FK_TMS_TERMINAL_PARAMS_PARAMS foreign key (PARAMS_ID) references TMS_PARAM(ID); diff --git a/modules/core/db/update/hsql/17/170726-2-createTerminalUptime.sql b/modules/core/db/update/hsql/17/170726-2-createTerminalUptime.sql new file mode 100644 index 0000000..b51be4e --- /dev/null +++ b/modules/core/db/update/hsql/17/170726-2-createTerminalUptime.sql @@ -0,0 +1 @@ +alter table TMS_TERMINAL_UPTIME add constraint FK_TMS_TERMINAL_UPTIME_TERMINAL foreign key (TERMINAL_ID) references TMS_TERMINAL(ID); diff --git a/modules/core/db/update/hsql/17/170726-2-updateApplication.sql b/modules/core/db/update/hsql/17/170726-2-updateApplication.sql new file mode 100644 index 0000000..446daf5 --- /dev/null +++ b/modules/core/db/update/hsql/17/170726-2-updateApplication.sql @@ -0,0 +1,2 @@ +alter table TMS_APPLICATION add column APK_ID varchar(36) ; +alter table TMS_APPLICATION drop column APK cascade ; diff --git a/modules/core/db/update/hsql/17/170726-2-updateApplication01.sql b/modules/core/db/update/hsql/17/170726-2-updateApplication01.sql new file mode 100644 index 0000000..801d614 --- /dev/null +++ b/modules/core/db/update/hsql/17/170726-2-updateApplication01.sql @@ -0,0 +1,2 @@ +alter table TMS_APPLICATION add constraint FK_TMS_APPLICATION_APK foreign key (APK_ID) references SYS_FILE(ID); +create index IDX_TMS_APPLICATION_APK on TMS_APPLICATION (APK_ID); diff --git a/modules/core/db/update/hsql/17/170726-2-updateParamGroup.sql b/modules/core/db/update/hsql/17/170726-2-updateParamGroup.sql new file mode 100644 index 0000000..d9be5ad --- /dev/null +++ b/modules/core/db/update/hsql/17/170726-2-updateParamGroup.sql @@ -0,0 +1,4 @@ +-- alter table TMS_PARAM_GROUP add column APPLICATION_ID varchar(36) ^ +-- update TMS_PARAM_GROUP set APPLICATION_ID = ; +-- alter table TMS_PARAM_GROUP alter column APPLICATION_ID set not null ; +alter table TMS_PARAM_GROUP add column APPLICATION_ID varchar(36) not null ; diff --git a/modules/core/db/update/hsql/17/170726-2-updateParamGroup01.sql b/modules/core/db/update/hsql/17/170726-2-updateParamGroup01.sql new file mode 100644 index 0000000..b4a3469 --- /dev/null +++ b/modules/core/db/update/hsql/17/170726-2-updateParamGroup01.sql @@ -0,0 +1 @@ +alter table TMS_PARAM_GROUP add constraint FK_TMS_PARAM_GROUP_APPLICATION foreign key (APPLICATION_ID) references TMS_APPLICATION(ID); diff --git a/modules/core/db/update/hsql/17/170726-2-updateTerminal01.sql b/modules/core/db/update/hsql/17/170726-2-updateTerminal01.sql new file mode 100644 index 0000000..2054498 --- /dev/null +++ b/modules/core/db/update/hsql/17/170726-2-updateTerminal01.sql @@ -0,0 +1 @@ +alter table TMS_TERMINAL add constraint FK_TMS_TERMINAL_MODEL foreign key (MODEL_ID) references TMS_DEVICE_MODEL(ID); diff --git a/modules/core/db/update/hsql/17/170726-2-updateTerminal02.sql b/modules/core/db/update/hsql/17/170726-2-updateTerminal02.sql new file mode 100644 index 0000000..c89b56f --- /dev/null +++ b/modules/core/db/update/hsql/17/170726-2-updateTerminal02.sql @@ -0,0 +1 @@ +alter table TMS_TERMINAL add constraint FK_TMS_TERMINAL_SOFTWARE foreign key (SOFTWARE_ID) references TMS_SOFTWARE(ID); diff --git a/modules/core/db/update/hsql/17/170726-2-updateTerminal03.sql b/modules/core/db/update/hsql/17/170726-2-updateTerminal03.sql new file mode 100644 index 0000000..9d81fb2 --- /dev/null +++ b/modules/core/db/update/hsql/17/170726-2-updateTerminal03.sql @@ -0,0 +1,2 @@ +alter table TMS_TERMINAL add constraint FK_TMS_TERMINAL_TERMINAL_GROUP foreign key (TERMINAL_GROUP_ID) references TMS_TERMINAL_GROUP(ID); +create index IDX_TMS_TERMINAL_TERMINAL_GROUP on TMS_TERMINAL (TERMINAL_GROUP_ID); diff --git a/modules/core/db/update/hsql/17/170726-2-updateTerminal04.sql b/modules/core/db/update/hsql/17/170726-2-updateTerminal04.sql new file mode 100644 index 0000000..7b54f67 --- /dev/null +++ b/modules/core/db/update/hsql/17/170726-2-updateTerminal04.sql @@ -0,0 +1 @@ +create unique index IDX_TMS_TERMINAL_UNIQ_IMEI on TMS_TERMINAL (IMEI) ; diff --git a/modules/core/db/update/hsql/17/170726-2-updateTerminal05.sql b/modules/core/db/update/hsql/17/170726-2-updateTerminal05.sql new file mode 100644 index 0000000..3cff5d0 --- /dev/null +++ b/modules/core/db/update/hsql/17/170726-2-updateTerminal05.sql @@ -0,0 +1 @@ +create unique index IDX_TMS_TERMINAL_UNIQ_SN on TMS_TERMINAL (SN) ; diff --git a/modules/core/db/update/hsql/17/170726-2-updateTerminal06.sql b/modules/core/db/update/hsql/17/170726-2-updateTerminal06.sql new file mode 100644 index 0000000..2054498 --- /dev/null +++ b/modules/core/db/update/hsql/17/170726-2-updateTerminal06.sql @@ -0,0 +1 @@ +alter table TMS_TERMINAL add constraint FK_TMS_TERMINAL_MODEL foreign key (MODEL_ID) references TMS_DEVICE_MODEL(ID); diff --git a/modules/core/db/update/hsql/17/170726-2-updateTerminal07.sql b/modules/core/db/update/hsql/17/170726-2-updateTerminal07.sql new file mode 100644 index 0000000..c89b56f --- /dev/null +++ b/modules/core/db/update/hsql/17/170726-2-updateTerminal07.sql @@ -0,0 +1 @@ +alter table TMS_TERMINAL add constraint FK_TMS_TERMINAL_SOFTWARE foreign key (SOFTWARE_ID) references TMS_SOFTWARE(ID); diff --git a/modules/core/db/update/hsql/17/170726-2-updateTerminal08.sql b/modules/core/db/update/hsql/17/170726-2-updateTerminal08.sql new file mode 100644 index 0000000..9d81fb2 --- /dev/null +++ b/modules/core/db/update/hsql/17/170726-2-updateTerminal08.sql @@ -0,0 +1,2 @@ +alter table TMS_TERMINAL add constraint FK_TMS_TERMINAL_TERMINAL_GROUP foreign key (TERMINAL_GROUP_ID) references TMS_TERMINAL_GROUP(ID); +create index IDX_TMS_TERMINAL_TERMINAL_GROUP on TMS_TERMINAL (TERMINAL_GROUP_ID); diff --git a/modules/core/db/update/hsql/17/170726-2-updateTerminal09.sql b/modules/core/db/update/hsql/17/170726-2-updateTerminal09.sql new file mode 100644 index 0000000..7b54f67 --- /dev/null +++ b/modules/core/db/update/hsql/17/170726-2-updateTerminal09.sql @@ -0,0 +1 @@ +create unique index IDX_TMS_TERMINAL_UNIQ_IMEI on TMS_TERMINAL (IMEI) ; diff --git a/modules/core/db/update/hsql/17/170726-2-updateTerminal10.sql b/modules/core/db/update/hsql/17/170726-2-updateTerminal10.sql new file mode 100644 index 0000000..3cff5d0 --- /dev/null +++ b/modules/core/db/update/hsql/17/170726-2-updateTerminal10.sql @@ -0,0 +1 @@ +create unique index IDX_TMS_TERMINAL_UNIQ_SN on TMS_TERMINAL (SN) ; diff --git a/modules/core/db/update/hsql/20/201113-0-dropDeviceModel01.sql b/modules/core/db/update/hsql/20/201113-0-dropDeviceModel01.sql new file mode 100644 index 0000000..b91c948 --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-0-dropDeviceModel01.sql @@ -0,0 +1,2 @@ +alter table TMS_DEVICE_MODEL rename to TMS_DEVICE_MODEL__U97286 ; +alter table TMS_TERMINAL drop constraint FK_TMS_TERMINAL_MODEL ; diff --git a/modules/core/db/update/hsql/20/201113-0-dropDeviceModel01_DropScript.sql b/modules/core/db/update/hsql/20/201113-0-dropDeviceModel01_DropScript.sql new file mode 100644 index 0000000..cf25a5d --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-0-dropDeviceModel01_DropScript.sql @@ -0,0 +1 @@ +drop table TMS_DEVICE_MODEL__U97286 if exists cascade ; \ No newline at end of file diff --git a/modules/core/db/update/hsql/20/201113-0-dropParam01.sql b/modules/core/db/update/hsql/20/201113-0-dropParam01.sql new file mode 100644 index 0000000..3184c05 --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-0-dropParam01.sql @@ -0,0 +1,2 @@ +alter table TMS_PARAM rename to TMS_PARAM__U00064 ; +alter table TMS_TERMINAL_PARAMS drop constraint FK_TMS_TERMINAL_PARAMS_PARAMS ; diff --git a/modules/core/db/update/hsql/20/201113-0-dropParam01_DropScript.sql b/modules/core/db/update/hsql/20/201113-0-dropParam01_DropScript.sql new file mode 100644 index 0000000..0f9a083 --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-0-dropParam01_DropScript.sql @@ -0,0 +1 @@ +drop table TMS_PARAM__U00064 if exists cascade ; \ No newline at end of file diff --git a/modules/core/db/update/hsql/20/201113-0-dropParamGroup.sql b/modules/core/db/update/hsql/20/201113-0-dropParamGroup.sql new file mode 100644 index 0000000..527c25c --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-0-dropParamGroup.sql @@ -0,0 +1 @@ +alter table TMS_PARAM_GROUP rename to TMS_PARAM_GROUP__U99390 ; diff --git a/modules/core/db/update/hsql/20/201113-0-dropParamGroup_DropScript.sql b/modules/core/db/update/hsql/20/201113-0-dropParamGroup_DropScript.sql new file mode 100644 index 0000000..d44428a --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-0-dropParamGroup_DropScript.sql @@ -0,0 +1 @@ +drop table TMS_PARAM_GROUP__U99390 if exists cascade ; \ No newline at end of file diff --git a/modules/core/db/update/hsql/20/201113-0-dropParamKey.sql b/modules/core/db/update/hsql/20/201113-0-dropParamKey.sql new file mode 100644 index 0000000..23399b1 --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-0-dropParamKey.sql @@ -0,0 +1 @@ +alter table TMS_PARAM_KEY rename to TMS_PARAM_KEY__U50727 ; diff --git a/modules/core/db/update/hsql/20/201113-0-dropParamKey_DropScript.sql b/modules/core/db/update/hsql/20/201113-0-dropParamKey_DropScript.sql new file mode 100644 index 0000000..4701e1b --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-0-dropParamKey_DropScript.sql @@ -0,0 +1 @@ +drop table TMS_PARAM_KEY__U50727 if exists cascade ; \ No newline at end of file diff --git a/modules/core/db/update/hsql/20/201113-0-dropSoftware.sql b/modules/core/db/update/hsql/20/201113-0-dropSoftware.sql new file mode 100644 index 0000000..bc9f5c4 --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-0-dropSoftware.sql @@ -0,0 +1,2 @@ +alter table TMS_SOFTWARE rename to TMS_SOFTWARE__U02401 ; +alter table TMS_TERMINAL drop constraint FK_TMS_TERMINAL_SOFTWARE ; diff --git a/modules/core/db/update/hsql/20/201113-0-dropSoftware_DropScript.sql b/modules/core/db/update/hsql/20/201113-0-dropSoftware_DropScript.sql new file mode 100644 index 0000000..4bdcf70 --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-0-dropSoftware_DropScript.sql @@ -0,0 +1 @@ +drop table TMS_SOFTWARE__U02401 if exists cascade ; \ No newline at end of file diff --git a/modules/core/db/update/hsql/20/201113-0-dropTerminalGroup.sql b/modules/core/db/update/hsql/20/201113-0-dropTerminalGroup.sql new file mode 100644 index 0000000..79f84d2 --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-0-dropTerminalGroup.sql @@ -0,0 +1,2 @@ +alter table TMS_TERMINAL_GROUP rename to TMS_TERMINAL_GROUP__U53059 ; +alter table TMS_TERMINAL drop constraint FK_TMS_TERMINAL_TERMINAL_GROUP ; diff --git a/modules/core/db/update/hsql/20/201113-0-dropTerminalGroup_DropScript.sql b/modules/core/db/update/hsql/20/201113-0-dropTerminalGroup_DropScript.sql new file mode 100644 index 0000000..de34cba --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-0-dropTerminalGroup_DropScript.sql @@ -0,0 +1 @@ +drop table TMS_TERMINAL_GROUP__U53059 if exists cascade ; \ No newline at end of file diff --git a/modules/core/db/update/hsql/20/201113-0-dropTerminalParams.sql b/modules/core/db/update/hsql/20/201113-0-dropTerminalParams.sql new file mode 100644 index 0000000..5646917 --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-0-dropTerminalParams.sql @@ -0,0 +1 @@ +alter table TMS_TERMINAL_PARAMS rename to TMS_TERMINAL_PARAMS__U29059 ; diff --git a/modules/core/db/update/hsql/20/201113-0-dropTerminalParams_DropScript.sql b/modules/core/db/update/hsql/20/201113-0-dropTerminalParams_DropScript.sql new file mode 100644 index 0000000..b9705cd --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-0-dropTerminalParams_DropScript.sql @@ -0,0 +1 @@ +drop table TMS_TERMINAL_PARAMS__U29059 if exists cascade ; \ No newline at end of file diff --git a/modules/core/db/update/hsql/20/201113-0-dropTerminalUptime.sql b/modules/core/db/update/hsql/20/201113-0-dropTerminalUptime.sql new file mode 100644 index 0000000..ec9f25a --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-0-dropTerminalUptime.sql @@ -0,0 +1 @@ +alter table TMS_TERMINAL_UPTIME rename to TMS_TERMINAL_UPTIME__U17090 ; diff --git a/modules/core/db/update/hsql/20/201113-0-dropTerminalUptime_DropScript.sql b/modules/core/db/update/hsql/20/201113-0-dropTerminalUptime_DropScript.sql new file mode 100644 index 0000000..97ff33e --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-0-dropTerminalUptime_DropScript.sql @@ -0,0 +1 @@ +drop table TMS_TERMINAL_UPTIME__U17090 if exists cascade ; \ No newline at end of file diff --git a/modules/core/db/update/hsql/20/201113-1-createAcquirer.sql b/modules/core/db/update/hsql/20/201113-1-createAcquirer.sql new file mode 100644 index 0000000..31d9c42 --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-1-createAcquirer.sql @@ -0,0 +1,33 @@ +create table TMS_ACQUIRER ( + ID varchar(36) not null, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + NAME varchar(30) not null, + HOST_ID varchar(3), + NUMBER_OF_PRINT integer, + RESP_TIMEOUT integer, + FORCE_SETTLE_DAYS integer, + FORCE_SETTLE_TM_COUNT integer, + ACQUIRER_ID varchar(2), + HOST_DESTINATION_ADDR varchar(100), + HOST_DESTINATION_PORT varchar(6), + SHOW_PRINT_EXP_DATE boolean, + TLE_ACQUIRER boolean, + TLE_SETTING_ID varchar(36), + MASTER_KEY_LOCATION varchar(4), + MASTER_KEY longvarchar, + WORKING_KEY longvarchar, + ACQUIRER_TYPE varchar(50) not null, + _TERMINAL_ID varchar(36), + BATCH_NUMBER varchar(6), + MERCHANT_ID varchar(15), + TERMINAL_ID varchar(8), + -- + primary key (ID) +); \ No newline at end of file diff --git a/modules/core/db/update/hsql/20/201113-1-createAid.sql b/modules/core/db/update/hsql/20/201113-1-createAid.sql new file mode 100644 index 0000000..3062967 --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-1-createAid.sql @@ -0,0 +1,36 @@ +create table TMS_AID ( + ID varchar(36) not null, + VERSION integer not null, + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + CREATE_TS timestamp, + CREATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + NAME varchar(255) not null, + TXN_TYPE varchar(8) not null, + AID varchar(20) not null, + AID_VERSION varchar(4) not null, + TAC_DEFAULT varchar(10) not null, + TAC_DENIAL varchar(10) not null, + TAC_ONLINE varchar(10) not null, + THRESHOLD varchar(12) not null, + TARGET_PERCENTAGE varchar(4) not null, + MAX_TARGET_PERCENTAGE varchar(4) not null, + DDOL longvarchar not null, + TDOL longvarchar not null, + FLOOR_LIMIT varchar(8) not null, + APP_SELECT varchar(2) not null, + AID_PRIORITY varchar(2) not null, + TRX_TYPE9C varchar(2) not null, + CATEGORY_CODE varchar(2) not null, + CL_KERNEL_TO_USE varchar(4), + CL_OPTIONS varchar(8), + CL_TRX_LIMIT varchar(12), + CL_CVM_LIMIT varchar(12), + CL_FLOOR_LIMIT varchar(12), + REMARK varchar(100), + -- + primary key (ID) +); \ No newline at end of file diff --git a/modules/core/db/update/hsql/20/201113-1-createApplicationIntent.sql b/modules/core/db/update/hsql/20/201113-1-createApplicationIntent.sql new file mode 100644 index 0000000..5a39820 --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-1-createApplicationIntent.sql @@ -0,0 +1,15 @@ +create table TMS_APPLICATION_INTENT ( + ID varchar(36) not null, + VERSION integer not null, + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + CREATE_TS timestamp, + CREATED_BY varchar(50), + -- + NAME varchar(255) not null, + DESCRIPTION varchar(100), + APPLICATION_ID varchar(36), + ICON_ID varchar(36), + -- + primary key (ID) +); \ No newline at end of file diff --git a/modules/core/db/update/hsql/20/201113-1-createApplicationThirdParty.sql b/modules/core/db/update/hsql/20/201113-1-createApplicationThirdParty.sql new file mode 100644 index 0000000..243c101 --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-1-createApplicationThirdParty.sql @@ -0,0 +1,20 @@ +create table TMS_APPLICATION_THIRD_PARTY ( + ID varchar(36) not null, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + NAME varchar(50) not null, + PACKAGE_NAME varchar(100) not null, + APP_VERSION varchar(10), + DESCRIPTION varchar(255), + APK_ID varchar(36), + CHANGELOG longvarchar, + IMPORT_DEFAULT boolean, + -- + primary key (ID) +); \ No newline at end of file diff --git a/modules/core/db/update/hsql/20/201113-1-createCapk.sql b/modules/core/db/update/hsql/20/201113-1-createCapk.sql new file mode 100644 index 0000000..044db1c --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-1-createCapk.sql @@ -0,0 +1,22 @@ +create table TMS_CAPK ( + ID varchar(36) not null, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + NAME varchar(50) not null, + IDX varchar(255) not null, + RID varchar(10) not null, + MODULUS longvarchar not null, + EXPONENT varchar(4) not null, + ALGO varchar(2) not null, + HASH longvarchar not null, + EXPIRY_DATE date, + REMARK varchar(100), + -- + primary key (ID) +); \ No newline at end of file diff --git a/modules/core/db/update/hsql/20/201113-1-createCard.sql b/modules/core/db/update/hsql/20/201113-1-createCard.sql new file mode 100644 index 0000000..542fa47 --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-1-createCard.sql @@ -0,0 +1,23 @@ +create table TMS_CARD ( + ID varchar(36) not null, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + NAME varchar(100) not null, + BIN_RANGE_START varchar(10) not null, + BIN_RANGE_END varchar(10) not null, + CARD_NUM_LENGTH integer not null, + PAN_DIGIT_UNMASKING varchar(20) not null, + PRINT_CARDHOLDER_COPY boolean, + PRINT_MERCHANT_COPY boolean, + PRINT_BANK_COPY boolean, + PIN_LENGTH integer, + PIN_PROMPT boolean, + -- + primary key (ID) +); \ No newline at end of file diff --git a/modules/core/db/update/hsql/20/201113-1-createDevice.sql b/modules/core/db/update/hsql/20/201113-1-createDevice.sql new file mode 100644 index 0000000..90bc21a --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-1-createDevice.sql @@ -0,0 +1,19 @@ +create table TMS_DEVICE ( + ID varchar(36) not null, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + IMEI varchar(40) not null, + SN varchar(40) not null, + BRAND varchar(100) not null, + MODEL varchar(50) not null, + MANUFACTURER varchar(255) not null, + IMPORT_DEFAULT boolean, + -- + primary key (ID) +); \ No newline at end of file diff --git a/modules/core/db/update/hsql/20/201113-1-createDeviceLocation.sql b/modules/core/db/update/hsql/20/201113-1-createDeviceLocation.sql new file mode 100644 index 0000000..347b376 --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-1-createDeviceLocation.sql @@ -0,0 +1,10 @@ +create table TMS_DEVICE_LOCATION ( + ID varchar(36) not null, + -- + DEVICE_ID varchar(36), + LAT double precision, + LON double precision, + LOG_TIME timestamp, + -- + primary key (ID) +); \ No newline at end of file diff --git a/modules/core/db/update/hsql/20/201113-1-createDeviceTerminal.sql b/modules/core/db/update/hsql/20/201113-1-createDeviceTerminal.sql new file mode 100644 index 0000000..fed877b --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-1-createDeviceTerminal.sql @@ -0,0 +1,13 @@ +create table TMS_DEVICE_TERMINAL ( + ID varchar(36) not null, + VERSION integer not null, + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + CREATE_TS timestamp, + CREATED_BY varchar(50), + -- + DEVICE_ID varchar(36) not null, + TERMINAL_ID varchar(36) not null, + -- + primary key (ID) +); \ No newline at end of file diff --git a/modules/core/db/update/hsql/20/201113-1-createIssuer.sql b/modules/core/db/update/hsql/20/201113-1-createIssuer.sql new file mode 100644 index 0000000..635f972 --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-1-createIssuer.sql @@ -0,0 +1,55 @@ +create table TMS_ISSUER ( + ID varchar(36) not null, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + NAME varchar(30) not null, + ISSUER_ID varchar(10) not null, + CAPTURE_TRANS boolean, + PRINT_RECEIPT boolean, + ACCOUNT_SELECT boolean, + PIN_ENTRY boolean, + CHECK_MOD10 boolean, + CHECK_EXP_DATE boolean, + MANUAL_PAN_ENTRY boolean, + ENABLE_OFFLINE boolean, + ENABLE_ADJUST boolean, + DISABLE_REFUND boolean, + DISABLE_CARD_VER boolean, + DISABLE_VOID boolean, + DISABLE_REWARD boolean, + DISABLE_INSTALLMENT boolean, + DISABLE_CASH boolean, + DISABLE_AUTH boolean, + DISABLE_BALANCE_INQUIRY boolean, + BALANCE_INQUIRY_SLIP boolean, + DISABLE_POINT_BAL_INQ boolean, + ENABLE_PRINT_POINT_BAL boolean, + AUTO_CALCULATION boolean, + ON_US boolean, + INQ_SALDO boolean, + CASH_WITHDRAWAL boolean, + TRANSFER_BNI boolean, + TRANSFER_ANTAR_BANK boolean, + REG_E_CHANNEL boolean, + PAYMENT_TELKOM boolean, + PULSA_TELKOMSEL boolean, + BPJS_KESEHATAN boolean, + BNI_CC_PAYMENT boolean, + TAPCASH_TOPUP boolean, + CASH_DEPOSIT boolean, + IMIGRASI boolean, + PAJAK_PNBP_BEA_CUKAI boolean, + INTEREST varchar(10), + FLOOR_LIMIT varchar(10), + TIP_ADJUST varchar(10), + DEFAULT_ACCOUNT varchar(2), + ACQUIRER_ID varchar(36), + -- + primary key (ID) +); \ No newline at end of file diff --git a/modules/core/db/update/hsql/20/201113-1-createIssuerCardDeleteHistory.sql b/modules/core/db/update/hsql/20/201113-1-createIssuerCardDeleteHistory.sql new file mode 100644 index 0000000..bb97c2a --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-1-createIssuerCardDeleteHistory.sql @@ -0,0 +1,12 @@ +create table TMS_ISSUER_CARD_DELETE_HISTORY ( + ID varchar(36) not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + -- + ISSUER_ID varchar(36) not null, + CARD_ID varchar(36) not null, + FLAG varchar(1) not null, + PIN_PROMPT boolean, + -- + primary key (ID) +); \ No newline at end of file diff --git a/modules/core/db/update/hsql/20/201113-1-createIssuerCardLink.sql b/modules/core/db/update/hsql/20/201113-1-createIssuerCardLink.sql new file mode 100644 index 0000000..2a738bb --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-1-createIssuerCardLink.sql @@ -0,0 +1,5 @@ +create table TMS_ISSUER_CARD_LINK ( + ISSUER_ID varchar(36) not null, + CARD_ID varchar(36) not null, + primary key (ISSUER_ID, CARD_ID) +); diff --git a/modules/core/db/update/hsql/20/201113-1-createLauncherSetting.sql b/modules/core/db/update/hsql/20/201113-1-createLauncherSetting.sql new file mode 100644 index 0000000..7380606 --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-1-createLauncherSetting.sql @@ -0,0 +1,21 @@ +create table TMS_LAUNCHER_SETTING ( + ID varchar(36) not null, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + CODE varchar(20) not null, + NAME varchar(50) not null, + GENERAL_PASSWORD varchar(20) not null, + ROOT_PASSWORD varchar(20) not null, + SHOW_MENU boolean not null, + MAIN_BANNER_IMAGE_ID varchar(36), + BACKGROUND_COLOR varchar(7), + TICKER_TEXT varchar(255), + -- + primary key (ID) +); \ No newline at end of file diff --git a/modules/core/db/update/hsql/20/201113-1-createProfile.sql b/modules/core/db/update/hsql/20/201113-1-createProfile.sql new file mode 100644 index 0000000..b86fa05 --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-1-createProfile.sql @@ -0,0 +1,17 @@ +create table TMS_PROFILE ( + ID varchar(36) not null, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + CODE varchar(15) not null, + NAME varchar(30) not null, + TERMINAL_ID varchar(36), + NOTE varchar(30), + -- + primary key (ID) +); \ No newline at end of file diff --git a/modules/core/db/update/hsql/20/201113-1-createProfileApplicationIntentLink.sql b/modules/core/db/update/hsql/20/201113-1-createProfileApplicationIntentLink.sql new file mode 100644 index 0000000..8faa56f --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-1-createProfileApplicationIntentLink.sql @@ -0,0 +1,5 @@ +create table TMS_PROFILE_APPLICATION_INTENT_LINK ( + PROFILE_ID varchar(36) not null, + APPLICATION_INTENT_ID varchar(36) not null, + primary key (PROFILE_ID, APPLICATION_INTENT_ID) +); diff --git a/modules/core/db/update/hsql/20/201113-1-createProfileApplicationLink.sql b/modules/core/db/update/hsql/20/201113-1-createProfileApplicationLink.sql new file mode 100644 index 0000000..4386707 --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-1-createProfileApplicationLink.sql @@ -0,0 +1,5 @@ +create table TMS_PROFILE_APPLICATION_LINK ( + APPLICATION_ID varchar(36) not null, + PROFILE_ID varchar(36) not null, + primary key (APPLICATION_ID, PROFILE_ID) +); diff --git a/modules/core/db/update/hsql/20/201113-1-createProfileApplicationThirdPartyLink.sql b/modules/core/db/update/hsql/20/201113-1-createProfileApplicationThirdPartyLink.sql new file mode 100644 index 0000000..a49a7d2 --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-1-createProfileApplicationThirdPartyLink.sql @@ -0,0 +1,5 @@ +create table TMS_PROFILE_APPLICATION_THIRD_PARTY_LINK ( + APPLICATION_THIRD_PARTY_ID varchar(36) not null, + PROFILE_ID varchar(36) not null, + primary key (APPLICATION_THIRD_PARTY_ID, PROFILE_ID) +); diff --git a/modules/core/db/update/hsql/20/201113-1-createPublicKeySetting.sql b/modules/core/db/update/hsql/20/201113-1-createPublicKeySetting.sql new file mode 100644 index 0000000..c891696 --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-1-createPublicKeySetting.sql @@ -0,0 +1,17 @@ +create table TMS_PUBLIC_KEY_SETTING ( + ID varchar(36) not null, + VERSION integer not null, + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + CREATE_TS timestamp, + CREATED_BY varchar(50), + -- + IDX varchar(5) not null, + RID varchar(10) not null, + MODULUS longvarchar not null, + EXPONENT varchar(2) not null, + HASH longvarchar not null, + ALGO varchar(2) not null, + -- + primary key (ID) +); \ No newline at end of file diff --git a/modules/core/db/update/hsql/20/201113-1-createTerminalUser.sql b/modules/core/db/update/hsql/20/201113-1-createTerminalUser.sql new file mode 100644 index 0000000..3493e15 --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-1-createTerminalUser.sql @@ -0,0 +1,15 @@ +create table TMS_TERMINAL_USER ( + ID varchar(36) not null, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + TERMINAL_ID varchar(36), + USERNAME varchar(255) not null, + -- + primary key (ID) +); \ No newline at end of file diff --git a/modules/core/db/update/hsql/20/201113-1-createTleSetting.sql b/modules/core/db/update/hsql/20/201113-1-createTleSetting.sql new file mode 100644 index 0000000..ff7f879 --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-1-createTleSetting.sql @@ -0,0 +1,32 @@ +create table TMS_TLE_SETTING ( + ID varchar(36) not null, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + TLE_EFT_SEC varchar(10) not null, + TLE_ID varchar(2) not null, + ACQUIRER_ID varchar(3) not null, + LTMK_AID varchar(3) not null, + VENDOR_ID varchar(8) not null, + TLE_VER varchar(1) not null, + KMS_SECURE_NII varchar(4), + EDC_SECURE_NII varchar(4), + CAPK_EXPONENT varchar(2), + CAPK_LENGTH integer, + CAPK_VALUE longvarchar, + AID_LENGTH integer, + AID_VALUE longvarchar, + FIELD_ENCRYPTED1 varchar(3), + FIELD_ENCRYPTED2 varchar(3), + FIELD_ENCRYPTED3 varchar(3), + FIELD_ENCRYPTED4 varchar(3), + FIELD_ENCRYPTED5 varchar(3), + FIELD_ENCRYPTED6 varchar(3), + -- + primary key (ID) +); \ No newline at end of file diff --git a/modules/core/db/update/hsql/20/201113-1-updateTerminal.sql b/modules/core/db/update/hsql/20/201113-1-updateTerminal.sql new file mode 100644 index 0000000..87d09af --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-1-updateTerminal.sql @@ -0,0 +1 @@ +drop index IDX_TMS_TERMINAL_UNIQ_IMEI ; diff --git a/modules/core/db/update/hsql/20/201113-1-updateTerminal01.sql b/modules/core/db/update/hsql/20/201113-1-updateTerminal01.sql new file mode 100644 index 0000000..dffd790 --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-1-updateTerminal01.sql @@ -0,0 +1 @@ +drop index IDX_TMS_TERMINAL_UNIQ_SN ; diff --git a/modules/core/db/update/hsql/20/201113-2-createAcquirer.sql b/modules/core/db/update/hsql/20/201113-2-createAcquirer.sql new file mode 100644 index 0000000..c906843 --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-2-createAcquirer.sql @@ -0,0 +1,4 @@ +alter table TMS_ACQUIRER add constraint FK_TMS_ACQUIRER_ON_TLE_SETTING foreign key (TLE_SETTING_ID) references TMS_TLE_SETTING(ID); +alter table TMS_ACQUIRER add constraint FK_TMS_ACQUIRER_ON__TERMINAL foreign key (_TERMINAL_ID) references TMS_TERMINAL(ID); +create index IDX_TMS_ACQUIRER_ON_TLE_SETTING on TMS_ACQUIRER (TLE_SETTING_ID); +create index IDX_TMS_ACQUIRER_ON__TERMINAL on TMS_ACQUIRER (_TERMINAL_ID); diff --git a/modules/core/db/update/hsql/20/201113-2-createApplicationIntent.sql b/modules/core/db/update/hsql/20/201113-2-createApplicationIntent.sql new file mode 100644 index 0000000..724490b --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-2-createApplicationIntent.sql @@ -0,0 +1,4 @@ +alter table TMS_APPLICATION_INTENT add constraint FK_TMS_APPLICATION_INTENT_ON_APPLICATION foreign key (APPLICATION_ID) references TMS_APPLICATION(ID); +alter table TMS_APPLICATION_INTENT add constraint FK_TMS_APPLICATION_INTENT_ON_ICON foreign key (ICON_ID) references SYS_FILE(ID); +create index IDX_TMS_APPLICATION_INTENT_ON_APPLICATION on TMS_APPLICATION_INTENT (APPLICATION_ID); +create index IDX_TMS_APPLICATION_INTENT_ON_ICON on TMS_APPLICATION_INTENT (ICON_ID); diff --git a/modules/core/db/update/hsql/20/201113-2-createApplicationThirdParty.sql b/modules/core/db/update/hsql/20/201113-2-createApplicationThirdParty.sql new file mode 100644 index 0000000..7c600f1 --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-2-createApplicationThirdParty.sql @@ -0,0 +1,2 @@ +alter table TMS_APPLICATION_THIRD_PARTY add constraint FK_TMS_APPLICATION_THIRD_PARTY_ON_APK foreign key (APK_ID) references SYS_FILE(ID); +create index IDX_TMS_APPLICATION_THIRD_PARTY_ON_APK on TMS_APPLICATION_THIRD_PARTY (APK_ID); diff --git a/modules/core/db/update/hsql/20/201113-2-createDevice.sql b/modules/core/db/update/hsql/20/201113-2-createDevice.sql new file mode 100644 index 0000000..d9d0bee --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-2-createDevice.sql @@ -0,0 +1,2 @@ +create unique index IDX_TMS_DEVICE_UNIQ_IMEI on TMS_DEVICE (IMEI) ; +create unique index IDX_TMS_DEVICE_UNIQ_SN on TMS_DEVICE (SN) ; diff --git a/modules/core/db/update/hsql/20/201113-2-createDeviceLocation.sql b/modules/core/db/update/hsql/20/201113-2-createDeviceLocation.sql new file mode 100644 index 0000000..6861a83 --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-2-createDeviceLocation.sql @@ -0,0 +1,2 @@ +alter table TMS_DEVICE_LOCATION add constraint FK_TMS_DEVICE_LOCATION_ON_DEVICE foreign key (DEVICE_ID) references TMS_DEVICE(ID); +create index IDX_TMS_DEVICE_LOCATION_ON_DEVICE on TMS_DEVICE_LOCATION (DEVICE_ID); diff --git a/modules/core/db/update/hsql/20/201113-2-createDeviceTerminal.sql b/modules/core/db/update/hsql/20/201113-2-createDeviceTerminal.sql new file mode 100644 index 0000000..d29c747 --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-2-createDeviceTerminal.sql @@ -0,0 +1,5 @@ +alter table TMS_DEVICE_TERMINAL add constraint FK_TMS_DEVICE_TERMINAL_ON_DEVICE foreign key (DEVICE_ID) references TMS_DEVICE(ID); +alter table TMS_DEVICE_TERMINAL add constraint FK_TMS_DEVICE_TERMINAL_ON_TERMINAL foreign key (TERMINAL_ID) references TMS_TERMINAL(ID); +create unique index IDX_TMS_DEVICE_TERMINAL_UNQ on TMS_DEVICE_TERMINAL (DEVICE_ID, TERMINAL_ID) ; +create index IDX_TMS_DEVICE_TERMINAL_ON_DEVICE on TMS_DEVICE_TERMINAL (DEVICE_ID); +create index IDX_TMS_DEVICE_TERMINAL_ON_TERMINAL on TMS_DEVICE_TERMINAL (TERMINAL_ID); diff --git a/modules/core/db/update/hsql/20/201113-2-createIssuer.sql b/modules/core/db/update/hsql/20/201113-2-createIssuer.sql new file mode 100644 index 0000000..9524ab4 --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-2-createIssuer.sql @@ -0,0 +1,2 @@ +alter table TMS_ISSUER add constraint FK_TMS_ISSUER_ON_ACQUIRER foreign key (ACQUIRER_ID) references TMS_ACQUIRER(ID); +create index IDX_TMS_ISSUER_ON_ACQUIRER on TMS_ISSUER (ACQUIRER_ID); diff --git a/modules/core/db/update/hsql/20/201113-2-createIssuerCardLink.sql b/modules/core/db/update/hsql/20/201113-2-createIssuerCardLink.sql new file mode 100644 index 0000000..3f3c94d --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-2-createIssuerCardLink.sql @@ -0,0 +1,2 @@ +alter table TMS_ISSUER_CARD_LINK add constraint FK_ISSCAR_ON_ISSUER foreign key (ISSUER_ID) references TMS_ISSUER(ID); +alter table TMS_ISSUER_CARD_LINK add constraint FK_ISSCAR_ON_CARD foreign key (CARD_ID) references TMS_CARD(ID); \ No newline at end of file diff --git a/modules/core/db/update/hsql/20/201113-2-createLauncherSetting.sql b/modules/core/db/update/hsql/20/201113-2-createLauncherSetting.sql new file mode 100644 index 0000000..ed7531a --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-2-createLauncherSetting.sql @@ -0,0 +1,3 @@ +alter table TMS_LAUNCHER_SETTING add constraint FK_TMS_LAUNCHER_SETTING_ON_MAIN_BANNER_IMAGE foreign key (MAIN_BANNER_IMAGE_ID) references SYS_FILE(ID); +create unique index IDX_TMS_LAUNCHER_SETTING_UNIQ_CODE on TMS_LAUNCHER_SETTING (CODE) ; +create index IDX_TMS_LAUNCHER_SETTING_ON_MAIN_BANNER_IMAGE on TMS_LAUNCHER_SETTING (MAIN_BANNER_IMAGE_ID); diff --git a/modules/core/db/update/hsql/20/201113-2-createProfile.sql b/modules/core/db/update/hsql/20/201113-2-createProfile.sql new file mode 100644 index 0000000..d09e877 --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-2-createProfile.sql @@ -0,0 +1,3 @@ +alter table TMS_PROFILE add constraint FK_TMS_PROFILE_ON_TERMINAL foreign key (TERMINAL_ID) references TMS_TERMINAL(ID); +create unique index IDX_TMS_PROFILE_UNIQ_CODE on TMS_PROFILE (CODE) ; +create index IDX_TMS_PROFILE_ON_TERMINAL on TMS_PROFILE (TERMINAL_ID); diff --git a/modules/core/db/update/hsql/20/201113-2-createProfileApplicationIntentLink.sql b/modules/core/db/update/hsql/20/201113-2-createProfileApplicationIntentLink.sql new file mode 100644 index 0000000..cb810c0 --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-2-createProfileApplicationIntentLink.sql @@ -0,0 +1,2 @@ +alter table TMS_PROFILE_APPLICATION_INTENT_LINK add constraint FK_PROAPPINT_ON_PROFILE foreign key (PROFILE_ID) references TMS_PROFILE(ID); +alter table TMS_PROFILE_APPLICATION_INTENT_LINK add constraint FK_PROAPPINT_ON_APPLICATION_INTENT foreign key (APPLICATION_INTENT_ID) references TMS_APPLICATION_INTENT(ID); \ No newline at end of file diff --git a/modules/core/db/update/hsql/20/201113-2-createProfileApplicationLink.sql b/modules/core/db/update/hsql/20/201113-2-createProfileApplicationLink.sql new file mode 100644 index 0000000..42e4ca4 --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-2-createProfileApplicationLink.sql @@ -0,0 +1,2 @@ +alter table TMS_PROFILE_APPLICATION_LINK add constraint FK_PROAPP_ON_APPLICATION foreign key (APPLICATION_ID) references TMS_APPLICATION(ID); +alter table TMS_PROFILE_APPLICATION_LINK add constraint FK_PROAPP_ON_PROFILE foreign key (PROFILE_ID) references TMS_PROFILE(ID); \ No newline at end of file diff --git a/modules/core/db/update/hsql/20/201113-2-createProfileApplicationThirdPartyLink.sql b/modules/core/db/update/hsql/20/201113-2-createProfileApplicationThirdPartyLink.sql new file mode 100644 index 0000000..d102684 --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-2-createProfileApplicationThirdPartyLink.sql @@ -0,0 +1,2 @@ +alter table TMS_PROFILE_APPLICATION_THIRD_PARTY_LINK add constraint FK_PROAPPTHIPAR_ON_APPLICATION_THIRD_PARTY foreign key (APPLICATION_THIRD_PARTY_ID) references TMS_APPLICATION_THIRD_PARTY(ID); +alter table TMS_PROFILE_APPLICATION_THIRD_PARTY_LINK add constraint FK_PROAPPTHIPAR_ON_PROFILE foreign key (PROFILE_ID) references TMS_PROFILE(ID); \ No newline at end of file diff --git a/modules/core/db/update/hsql/20/201113-2-createPublicKeySetting.sql b/modules/core/db/update/hsql/20/201113-2-createPublicKeySetting.sql new file mode 100644 index 0000000..d046cc7 --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-2-createPublicKeySetting.sql @@ -0,0 +1 @@ +create unique index IDX_TMS_PUBLIC_KEY_SETTING_UNIQ_IDX on TMS_PUBLIC_KEY_SETTING (IDX) ; diff --git a/modules/core/db/update/hsql/20/201113-2-createTerminalUser.sql b/modules/core/db/update/hsql/20/201113-2-createTerminalUser.sql new file mode 100644 index 0000000..493a469 --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-2-createTerminalUser.sql @@ -0,0 +1,2 @@ +alter table TMS_TERMINAL_USER add constraint FK_TMS_TERMINAL_USER_ON_TERMINAL foreign key (TERMINAL_ID) references TMS_TERMINAL(ID); +create index IDX_TMS_TERMINAL_USER_ON_TERMINAL on TMS_TERMINAL_USER (TERMINAL_ID); diff --git a/modules/core/db/update/hsql/20/201113-2-createTleSetting.sql b/modules/core/db/update/hsql/20/201113-2-createTleSetting.sql new file mode 100644 index 0000000..1eae5de --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-2-createTleSetting.sql @@ -0,0 +1 @@ +create unique index IDX_TMS_TLE_SETTING_UNIQ_TLE_EFT_SEC on TMS_TLE_SETTING (TLE_EFT_SEC) ; diff --git a/modules/core/db/update/hsql/20/201113-2-updateApplication.sql b/modules/core/db/update/hsql/20/201113-2-updateApplication.sql new file mode 100644 index 0000000..d674834 --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-2-updateApplication.sql @@ -0,0 +1,7 @@ +alter table TMS_APPLICATION add column IMPORT_DEFAULT boolean ; +alter table TMS_APPLICATION add column PACKAGE_NAME varchar(100) ^ +update TMS_APPLICATION set PACKAGE_NAME = '' where PACKAGE_NAME is null ; +alter table TMS_APPLICATION alter column PACKAGE_NAME set not null ; +alter table TMS_APPLICATION add column NAME varchar(50) ^ +update TMS_APPLICATION set NAME = '' where NAME is null ; +alter table TMS_APPLICATION alter column NAME set not null ; diff --git a/modules/core/db/update/hsql/20/201113-2-updateTerminal.sql b/modules/core/db/update/hsql/20/201113-2-updateTerminal.sql new file mode 100644 index 0000000..bc9d3af --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-2-updateTerminal.sql @@ -0,0 +1,55 @@ +alter table TMS_TERMINAL alter column TERMINAL_GROUP_ID rename to TERMINAL_GROUP_ID__U61457 ^ +drop index IDX_TMS_TERMINAL_TERMINAL_GROUP ; +alter table TMS_TERMINAL alter column APP_VERSION rename to APP_VERSION__U38175 ^ +alter table TMS_TERMINAL alter column APP_VERSION__U38175 set null ; +alter table TMS_TERMINAL alter column SOFTWARE_ID rename to SOFTWARE_ID__U41531 ^ +alter table TMS_TERMINAL alter column SOFTWARE_ID__U41531 set null ; +alter table TMS_TERMINAL alter column MODEL_ID rename to MODEL_ID__U09257 ^ +alter table TMS_TERMINAL alter column MODEL_ID__U09257 set null ; +alter table TMS_TERMINAL alter column SN rename to SN__U81246 ^ +alter table TMS_TERMINAL alter column SN__U81246 set null ; +alter table TMS_TERMINAL alter column IMEI rename to IMEI__U57093 ^ +alter table TMS_TERMINAL alter column IMEI__U57093 set null ; +alter table TMS_TERMINAL add column PASSWORD_VOID boolean ; +alter table TMS_TERMINAL add column SETTLE_TIME3 varchar(4) ; +alter table TMS_TERMINAL add column MERCHANT_ID varchar(15) ^ +update TMS_TERMINAL set MERCHANT_ID = '' where MERCHANT_ID is null ; +alter table TMS_TERMINAL alter column MERCHANT_ID set not null ; +alter table TMS_TERMINAL add column REDEMPTION boolean ; +alter table TMS_TERMINAL add column LOYALTY_PURSE_ID1 varchar(10) ; +alter table TMS_TERMINAL add column SETTLE_TIME2 varchar(4) ; +-- alter table TMS_TERMINAL add column TERMINAL_ID varchar(8) ^ +-- update TMS_TERMINAL set TERMINAL_ID = ; +-- alter table TMS_TERMINAL alter column TERMINAL_ID set not null ; +alter table TMS_TERMINAL add column TERMINAL_ID varchar(8) ; +alter table TMS_TERMINAL add column CALL_CENTER1 varchar(255) ; +alter table TMS_TERMINAL add column ADMIN_PASSWORD varchar(6) ; +alter table TMS_TERMINAL add column SETTLE_MAX_TRX_COUNT integer ; +alter table TMS_TERMINAL add column INITIALISE_PASSWORD varchar(6) ; +alter table TMS_TERMINAL add column TRACK2_TOP_UP_TUNAI varchar(40) ; +alter table TMS_TERMINAL add column CALL_CENTER2 varchar(255) ; +alter table TMS_TERMINAL add column LOYALTY_PURSE_ID3 varchar(10) ; +alter table TMS_TERMINAL add column EMV_INFORMATION boolean ; +alter table TMS_TERMINAL add column TIME_OF_SETTLEMENT integer ; +alter table TMS_TERMINAL add column CVM_ONLINE_PIN_BYPASS boolean ; +alter table TMS_TERMINAL add column PASSWORD_REFUND boolean ; +alter table TMS_TERMINAL add column AUTO_INIT boolean ; +alter table TMS_TERMINAL add column SETTLE_ATTEMPT integer ; +alter table TMS_TERMINAL add column CVM_SIGN_PROMPT_PIN boolean ; +alter table TMS_TERMINAL add column AUTO_INIT_NII varchar(255) ; +alter table TMS_TERMINAL add column IMPORT_DEFAULT boolean ; +alter table TMS_TERMINAL add column PASSWORD_OFFLINE boolean ; +alter table TMS_TERMINAL add column MERCHANT_NAME2 varchar(20) ; +alter table TMS_TERMINAL add column PASSWORD_ADJUST boolean ; +alter table TMS_TERMINAL add column PROFILE_ID varchar(36) ; +alter table TMS_TERMINAL add column SMART_SPENDING boolean ; +alter table TMS_TERMINAL add column SETTLE_TIME1 varchar(4) ; +alter table TMS_TERMINAL add column SETTLE_PERIOD integer ; +alter table TMS_TERMINAL add column AUTO_SETTLE boolean ; +alter table TMS_TERMINAL add column MERCHANT_NAME1 varchar(20) ^ +update TMS_TERMINAL set MERCHANT_NAME1 = '' where MERCHANT_NAME1 is null ; +alter table TMS_TERMINAL alter column MERCHANT_NAME1 set not null ; +alter table TMS_TERMINAL add column LOYALTY_PURSE_ID2 varchar(10) ; +alter table TMS_TERMINAL add column MERCHANT_PASSWORD varchar(6) ; +alter table TMS_TERMINAL add column MERCHANT_NAME3 varchar(20) ; +alter table TMS_TERMINAL add column PUSH_SETTLE_IN_DAYS integer ; diff --git a/modules/core/db/update/hsql/20/201113-2-updateTerminal01.sql b/modules/core/db/update/hsql/20/201113-2-updateTerminal01.sql new file mode 100644 index 0000000..fb0569d --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-2-updateTerminal01.sql @@ -0,0 +1 @@ +create unique index IDX_TMS_TERMINAL_UNIQ_TERMINAL_ID on TMS_TERMINAL (TERMINAL_ID) ; diff --git a/modules/core/db/update/hsql/20/201113-2-updateTerminal02.sql b/modules/core/db/update/hsql/20/201113-2-updateTerminal02.sql new file mode 100644 index 0000000..c627b00 --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-2-updateTerminal02.sql @@ -0,0 +1,2 @@ +alter table TMS_TERMINAL add constraint FK_TMS_TERMINAL_ON_PROFILE foreign key (PROFILE_ID) references TMS_PROFILE(ID); +create index IDX_TMS_TERMINAL_ON_PROFILE on TMS_TERMINAL (PROFILE_ID); diff --git a/modules/core/db/update/hsql/20/201113-2-updateTerminal_DropScript.sql b/modules/core/db/update/hsql/20/201113-2-updateTerminal_DropScript.sql new file mode 100644 index 0000000..98083b5 --- /dev/null +++ b/modules/core/db/update/hsql/20/201113-2-updateTerminal_DropScript.sql @@ -0,0 +1,6 @@ +alter table TMS_TERMINAL drop column IMEI__U57093 cascade ; +alter table TMS_TERMINAL drop column SN__U81246 cascade ; +alter table TMS_TERMINAL drop column MODEL_ID__U09257 cascade ; +alter table TMS_TERMINAL drop column SOFTWARE_ID__U41531 cascade ; +alter table TMS_TERMINAL drop column APP_VERSION__U38175 cascade ; +alter table TMS_TERMINAL drop column TERMINAL_GROUP_ID__U61457 cascade ; diff --git a/modules/core/db/update/mysql/17/170601-1-createTerminal.sql b/modules/core/db/update/mysql/17/170601-1-createTerminal.sql new file mode 100644 index 0000000..b902025 --- /dev/null +++ b/modules/core/db/update/mysql/17/170601-1-createTerminal.sql @@ -0,0 +1,14 @@ +create table TMS_TERMINAL ( + ID varchar(32), + VERSION integer not null, + CREATE_TS datetime(3), + CREATED_BY varchar(50), + UPDATE_TS datetime(3), + UPDATED_BY varchar(50), + DELETE_TS datetime(3), + DELETED_BY varchar(50), + -- + IMEI varchar(40) not null, + -- + primary key (ID) +); diff --git a/modules/core/db/update/postgres/20/201115-0-dropApplication.sql b/modules/core/db/update/postgres/20/201115-0-dropApplication.sql new file mode 100644 index 0000000..b0b46e2 --- /dev/null +++ b/modules/core/db/update/postgres/20/201115-0-dropApplication.sql @@ -0,0 +1,3 @@ +alter table tms_application rename to TMS_APPLICATION__U99062 ; +alter table tms_application_intent drop constraint FK_TMS_APPLICATION_INTENT_ON_APPLICATION ; +alter table tms_profile_application_link drop constraint FK_PROAPP_ON_APPLICATION ; diff --git a/modules/core/db/update/postgres/20/201115-0-dropApplicationIntent.sql b/modules/core/db/update/postgres/20/201115-0-dropApplicationIntent.sql new file mode 100644 index 0000000..9cdc935 --- /dev/null +++ b/modules/core/db/update/postgres/20/201115-0-dropApplicationIntent.sql @@ -0,0 +1,2 @@ +alter table tms_application_intent rename to TMS_APPLICATION_INTENT__U32228 ; +alter table tms_profile_application_intent_link drop constraint FK_PROAPPINT_ON_APPLICATION_INTENT ; diff --git a/modules/core/db/update/postgres/20/201115-0-dropApplicationIntent_DropScript.sql b/modules/core/db/update/postgres/20/201115-0-dropApplicationIntent_DropScript.sql new file mode 100644 index 0000000..6fd3726 --- /dev/null +++ b/modules/core/db/update/postgres/20/201115-0-dropApplicationIntent_DropScript.sql @@ -0,0 +1 @@ +drop table if exists TMS_APPLICATION_INTENT__U32228 cascade ; \ No newline at end of file diff --git a/modules/core/db/update/postgres/20/201115-0-dropApplicationThirdParty.sql b/modules/core/db/update/postgres/20/201115-0-dropApplicationThirdParty.sql new file mode 100644 index 0000000..a1addf3 --- /dev/null +++ b/modules/core/db/update/postgres/20/201115-0-dropApplicationThirdParty.sql @@ -0,0 +1,2 @@ +alter table tms_application_third_party rename to TMS_APPLICATION_THIRD_PARTY__U79307 ; +alter table tms_profile_application_third_party_link drop constraint FK_PROAPPTHIPAR_ON_APPLICATION_THIRD_PARTY ; diff --git a/modules/core/db/update/postgres/20/201115-0-dropApplicationThirdParty_DropScript.sql b/modules/core/db/update/postgres/20/201115-0-dropApplicationThirdParty_DropScript.sql new file mode 100644 index 0000000..211ac63 --- /dev/null +++ b/modules/core/db/update/postgres/20/201115-0-dropApplicationThirdParty_DropScript.sql @@ -0,0 +1 @@ +drop table if exists TMS_APPLICATION_THIRD_PARTY__U79307 cascade ; \ No newline at end of file diff --git a/modules/core/db/update/postgres/20/201115-0-dropApplication_DropScript.sql b/modules/core/db/update/postgres/20/201115-0-dropApplication_DropScript.sql new file mode 100644 index 0000000..b099381 --- /dev/null +++ b/modules/core/db/update/postgres/20/201115-0-dropApplication_DropScript.sql @@ -0,0 +1 @@ +drop table if exists TMS_APPLICATION__U99062 cascade ; \ No newline at end of file diff --git a/modules/core/db/update/postgres/20/201115-0-dropDeviceLocation.sql b/modules/core/db/update/postgres/20/201115-0-dropDeviceLocation.sql new file mode 100644 index 0000000..df02c7a --- /dev/null +++ b/modules/core/db/update/postgres/20/201115-0-dropDeviceLocation.sql @@ -0,0 +1 @@ +alter table tms_device_location rename to TMS_DEVICE_LOCATION__U73041 ; diff --git a/modules/core/db/update/postgres/20/201115-0-dropDeviceLocation_DropScript.sql b/modules/core/db/update/postgres/20/201115-0-dropDeviceLocation_DropScript.sql new file mode 100644 index 0000000..c2b029d --- /dev/null +++ b/modules/core/db/update/postgres/20/201115-0-dropDeviceLocation_DropScript.sql @@ -0,0 +1 @@ +drop table if exists TMS_DEVICE_LOCATION__U73041 cascade ; \ No newline at end of file diff --git a/modules/core/db/update/postgres/20/201115-0-dropProfile.sql b/modules/core/db/update/postgres/20/201115-0-dropProfile.sql new file mode 100644 index 0000000..66228d1 --- /dev/null +++ b/modules/core/db/update/postgres/20/201115-0-dropProfile.sql @@ -0,0 +1,5 @@ +alter table tms_profile rename to TMS_PROFILE__U39933 ; +alter table tms_profile_application_intent_link drop constraint FK_PROAPPINT_ON_PROFILE ; +alter table tms_profile_application_link drop constraint FK_PROAPP_ON_PROFILE ; +alter table tms_profile_application_third_party_link drop constraint FK_PROAPPTHIPAR_ON_PROFILE ; +alter table tms_terminal drop constraint FK_TMS_TERMINAL_ON_PROFILE ; diff --git a/modules/core/db/update/postgres/20/201115-0-dropProfileApplicationIntentLink.sql b/modules/core/db/update/postgres/20/201115-0-dropProfileApplicationIntentLink.sql new file mode 100644 index 0000000..db10e87 --- /dev/null +++ b/modules/core/db/update/postgres/20/201115-0-dropProfileApplicationIntentLink.sql @@ -0,0 +1 @@ +alter table tms_profile_application_intent_link rename to TMS_PROFILE_APPLICATION_INTENT_LINK__U25486 ; diff --git a/modules/core/db/update/postgres/20/201115-0-dropProfileApplicationIntentLink_DropScript.sql b/modules/core/db/update/postgres/20/201115-0-dropProfileApplicationIntentLink_DropScript.sql new file mode 100644 index 0000000..0b1e739 --- /dev/null +++ b/modules/core/db/update/postgres/20/201115-0-dropProfileApplicationIntentLink_DropScript.sql @@ -0,0 +1 @@ +drop table if exists TMS_PROFILE_APPLICATION_INTENT_LINK__U25486 cascade ; \ No newline at end of file diff --git a/modules/core/db/update/postgres/20/201115-0-dropProfileApplicationLink.sql b/modules/core/db/update/postgres/20/201115-0-dropProfileApplicationLink.sql new file mode 100644 index 0000000..2aaf3ba --- /dev/null +++ b/modules/core/db/update/postgres/20/201115-0-dropProfileApplicationLink.sql @@ -0,0 +1 @@ +alter table tms_profile_application_link rename to TMS_PROFILE_APPLICATION_LINK__U28068 ; diff --git a/modules/core/db/update/postgres/20/201115-0-dropProfileApplicationLink_DropScript.sql b/modules/core/db/update/postgres/20/201115-0-dropProfileApplicationLink_DropScript.sql new file mode 100644 index 0000000..9089517 --- /dev/null +++ b/modules/core/db/update/postgres/20/201115-0-dropProfileApplicationLink_DropScript.sql @@ -0,0 +1 @@ +drop table if exists TMS_PROFILE_APPLICATION_LINK__U28068 cascade ; \ No newline at end of file diff --git a/modules/core/db/update/postgres/20/201115-0-dropProfileApplicationThirdPartyLink.sql b/modules/core/db/update/postgres/20/201115-0-dropProfileApplicationThirdPartyLink.sql new file mode 100644 index 0000000..55ad7cf --- /dev/null +++ b/modules/core/db/update/postgres/20/201115-0-dropProfileApplicationThirdPartyLink.sql @@ -0,0 +1 @@ +alter table tms_profile_application_third_party_link rename to TMS_PROFILE_APPLICATION_THIRD_PARTY_LINK__U22932 ; diff --git a/modules/core/db/update/postgres/20/201115-0-dropProfileApplicationThirdPartyLink_DropScript.sql b/modules/core/db/update/postgres/20/201115-0-dropProfileApplicationThirdPartyLink_DropScript.sql new file mode 100644 index 0000000..3668329 --- /dev/null +++ b/modules/core/db/update/postgres/20/201115-0-dropProfileApplicationThirdPartyLink_DropScript.sql @@ -0,0 +1 @@ +drop table if exists TMS_PROFILE_APPLICATION_THIRD_PARTY_LINK__U22932 cascade ; \ No newline at end of file diff --git a/modules/core/db/update/postgres/20/201115-0-dropProfile_DropScript.sql b/modules/core/db/update/postgres/20/201115-0-dropProfile_DropScript.sql new file mode 100644 index 0000000..326b5f5 --- /dev/null +++ b/modules/core/db/update/postgres/20/201115-0-dropProfile_DropScript.sql @@ -0,0 +1 @@ +drop table if exists TMS_PROFILE__U39933 cascade ; \ No newline at end of file diff --git a/modules/core/db/update/postgres/20/201115-0-dropTerminal.sql b/modules/core/db/update/postgres/20/201115-0-dropTerminal.sql new file mode 100644 index 0000000..c8b1935 --- /dev/null +++ b/modules/core/db/update/postgres/20/201115-0-dropTerminal.sql @@ -0,0 +1,4 @@ +alter table tms_terminal rename to TMS_TERMINAL__U37756 ; +alter table tms_acquirer drop constraint FK_TMS_ACQUIRER_ON__TERMINAL ; +alter table tms_device_terminal drop constraint FK_TMS_DEVICE_TERMINAL_ON_TERMINAL ; +alter table tms_terminal_user drop constraint FK_TMS_TERMINAL_USER_ON_TERMINAL ; diff --git a/modules/core/db/update/postgres/20/201115-0-dropTerminalUser.sql b/modules/core/db/update/postgres/20/201115-0-dropTerminalUser.sql new file mode 100644 index 0000000..6156a33 --- /dev/null +++ b/modules/core/db/update/postgres/20/201115-0-dropTerminalUser.sql @@ -0,0 +1 @@ +alter table tms_terminal_user rename to TMS_TERMINAL_USER__U85561 ; diff --git a/modules/core/db/update/postgres/20/201115-0-dropTerminalUser_DropScript.sql b/modules/core/db/update/postgres/20/201115-0-dropTerminalUser_DropScript.sql new file mode 100644 index 0000000..88e1835 --- /dev/null +++ b/modules/core/db/update/postgres/20/201115-0-dropTerminalUser_DropScript.sql @@ -0,0 +1 @@ +drop table if exists TMS_TERMINAL_USER__U85561 cascade ; \ No newline at end of file diff --git a/modules/core/db/update/postgres/20/201115-0-dropTerminal_DropScript.sql b/modules/core/db/update/postgres/20/201115-0-dropTerminal_DropScript.sql new file mode 100644 index 0000000..67205ea --- /dev/null +++ b/modules/core/db/update/postgres/20/201115-0-dropTerminal_DropScript.sql @@ -0,0 +1 @@ +drop table if exists TMS_TERMINAL__U37756 cascade ; \ No newline at end of file diff --git a/modules/core/db/update/postgres/20/201115-1-createTerminalExt.sql b/modules/core/db/update/postgres/20/201115-1-createTerminalExt.sql new file mode 100644 index 0000000..a62c335 --- /dev/null +++ b/modules/core/db/update/postgres/20/201115-1-createTerminalExt.sql @@ -0,0 +1,48 @@ +create table TMS_TERMINAL_EXT ( + ID uuid, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + TERMINAL_ID varchar(8) not null, + MERCHANT_ID varchar(15) not null, + MERCHANT_NAME1 varchar(20) not null, + MERCHANT_NAME2 varchar(20), + MERCHANT_NAME3 varchar(20), + MERCHANT_PASSWORD varchar(6), + ADMIN_PASSWORD varchar(6), + INITIALISE_PASSWORD varchar(6), + TIME_OF_SETTLEMENT integer, + SETTLE_TIME1 varchar(4), + SETTLE_TIME2 varchar(4), + SETTLE_TIME3 varchar(4), + PASSWORD_VOID boolean, + PASSWORD_ADJUST boolean, + PASSWORD_REFUND boolean, + PASSWORD_OFFLINE boolean, + PUSH_SETTLE_IN_DAYS integer, + SETTLE_MAX_TRX_COUNT integer, + SETTLE_PERIOD integer, + SETTLE_ATTEMPT integer, + AUTO_SETTLE boolean, + TRACK2_TOP_UP_TUNAI varchar(40), + REDEMPTION boolean, + SMART_SPENDING boolean, + LOYALTY_PURSE_ID1 varchar(10), + LOYALTY_PURSE_ID2 varchar(10), + LOYALTY_PURSE_ID3 varchar(10), + EMV_INFORMATION boolean, + CVM_ONLINE_PIN_BYPASS boolean, + CVM_SIGN_PROMPT_PIN boolean, + AUTO_INIT boolean, + AUTO_INIT_NII varchar(255), + CALL_CENTER1 varchar(255), + CALL_CENTER2 varchar(255), + IMPORT_DEFAULT boolean, + -- + primary key (ID) +); \ No newline at end of file diff --git a/modules/core/db/update/postgres/20/201115-2-createTerminalExt.sql b/modules/core/db/update/postgres/20/201115-2-createTerminalExt.sql new file mode 100644 index 0000000..bd7a446 --- /dev/null +++ b/modules/core/db/update/postgres/20/201115-2-createTerminalExt.sql @@ -0,0 +1 @@ +create unique index IDX_TMS_TERMINAL_EXT_UK_TERMINAL_ID on TMS_TERMINAL_EXT (TERMINAL_ID) where DELETE_TS is null ; diff --git a/modules/core/db/update/postgres/20/201115-2-updateAcquirer.sql b/modules/core/db/update/postgres/20/201115-2-updateAcquirer.sql new file mode 100644 index 0000000..918110d --- /dev/null +++ b/modules/core/db/update/postgres/20/201115-2-updateAcquirer.sql @@ -0,0 +1,3 @@ +alter table TMS_ACQUIRER rename column _terminal_id to _terminal_id__u76000 ; +drop index IDX_TMS_ACQUIRER_ON__TERMINAL ; +alter table TMS_ACQUIRER add column _TERMINAL_ID uuid ; diff --git a/modules/core/db/update/postgres/20/201115-2-updateAcquirer01.sql b/modules/core/db/update/postgres/20/201115-2-updateAcquirer01.sql new file mode 100644 index 0000000..8435803 --- /dev/null +++ b/modules/core/db/update/postgres/20/201115-2-updateAcquirer01.sql @@ -0,0 +1,2 @@ +alter table TMS_ACQUIRER add constraint FK_TMS_ACQUIRER_ON__TERMINAL foreign key (_TERMINAL_ID) references TMS_TERMINAL_EXT(ID); +create index IDX_TMS_ACQUIRER_ON__TERMINAL on TMS_ACQUIRER (_TERMINAL_ID); diff --git a/modules/core/db/update/postgres/20/201115-2-updateAcquirer_DropScript.sql b/modules/core/db/update/postgres/20/201115-2-updateAcquirer_DropScript.sql new file mode 100644 index 0000000..53cd16a --- /dev/null +++ b/modules/core/db/update/postgres/20/201115-2-updateAcquirer_DropScript.sql @@ -0,0 +1 @@ +alter table TMS_ACQUIRER drop column _TERMINAL_ID__U76000 cascade ; diff --git a/modules/core/db/update/postgres/20/201115-2-updateDeviceTerminal.sql b/modules/core/db/update/postgres/20/201115-2-updateDeviceTerminal.sql new file mode 100644 index 0000000..dd310f0 --- /dev/null +++ b/modules/core/db/update/postgres/20/201115-2-updateDeviceTerminal.sql @@ -0,0 +1,8 @@ +alter table TMS_DEVICE_TERMINAL rename column terminal_id to terminal_id__u12859 ; +alter table TMS_DEVICE_TERMINAL alter column terminal_id__u12859 drop not null ; +drop index IDX_TMS_DEVICE_TERMINAL_UNQ ; +drop index IDX_TMS_DEVICE_TERMINAL_ON_TERMINAL ; +-- alter table TMS_DEVICE_TERMINAL add column TERMINAL_ID uuid ^ +-- update TMS_DEVICE_TERMINAL set TERMINAL_ID = ; +-- alter table TMS_DEVICE_TERMINAL alter column terminal_id set not null ; +alter table TMS_DEVICE_TERMINAL add column TERMINAL_ID uuid not null ; diff --git a/modules/core/db/update/postgres/20/201115-2-updateDeviceTerminal01.sql b/modules/core/db/update/postgres/20/201115-2-updateDeviceTerminal01.sql new file mode 100644 index 0000000..2e84994 --- /dev/null +++ b/modules/core/db/update/postgres/20/201115-2-updateDeviceTerminal01.sql @@ -0,0 +1,2 @@ +alter table TMS_DEVICE_TERMINAL add constraint FK_TMS_DEVICE_TERMINAL_ON_TERMINAL foreign key (TERMINAL_ID) references TMS_TERMINAL_EXT(ID); +create index IDX_TMS_DEVICE_TERMINAL_ON_TERMINAL on TMS_DEVICE_TERMINAL (TERMINAL_ID); diff --git a/modules/core/db/update/postgres/20/201115-2-updateDeviceTerminal03.sql b/modules/core/db/update/postgres/20/201115-2-updateDeviceTerminal03.sql new file mode 100644 index 0000000..fe1fa79 --- /dev/null +++ b/modules/core/db/update/postgres/20/201115-2-updateDeviceTerminal03.sql @@ -0,0 +1 @@ +create unique index IDX_TMS_DEVICE_TERMINAL_UNQ on TMS_DEVICE_TERMINAL (DEVICE_ID, TERMINAL_ID) ; diff --git a/modules/core/db/update/postgres/20/201115-2-updateDeviceTerminal_DropScript.sql b/modules/core/db/update/postgres/20/201115-2-updateDeviceTerminal_DropScript.sql new file mode 100644 index 0000000..0503a1f --- /dev/null +++ b/modules/core/db/update/postgres/20/201115-2-updateDeviceTerminal_DropScript.sql @@ -0,0 +1 @@ +alter table TMS_DEVICE_TERMINAL drop column TERMINAL_ID__U12859 cascade ; diff --git a/modules/core/db/update/postgres/20/201115-2-updateTerminal.sql b/modules/core/db/update/postgres/20/201115-2-updateTerminal.sql new file mode 100644 index 0000000..b49cc39 --- /dev/null +++ b/modules/core/db/update/postgres/20/201115-2-updateTerminal.sql @@ -0,0 +1,2 @@ +alter table TMS_TERMINAL rename column profile_id to profile_id__u34805 ; +drop index IDX_TMS_TERMINAL_ON_PROFILE ; diff --git a/modules/core/db/update/postgres/20/201115-2-updateTerminal_DropScript.sql b/modules/core/db/update/postgres/20/201115-2-updateTerminal_DropScript.sql new file mode 100644 index 0000000..0484621 --- /dev/null +++ b/modules/core/db/update/postgres/20/201115-2-updateTerminal_DropScript.sql @@ -0,0 +1 @@ +alter table TMS_TERMINAL drop column PROFILE_ID__U34805 cascade ; diff --git a/modules/core/db/update/postgres/20/201116-0-dropAcquirer.sql b/modules/core/db/update/postgres/20/201116-0-dropAcquirer.sql new file mode 100644 index 0000000..e23d5eb --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-0-dropAcquirer.sql @@ -0,0 +1,2 @@ +alter table tms_acquirer rename to TMS_ACQUIRER__U92545 ; +alter table tms_issuer drop constraint FK_TMS_ISSUER_ON_ACQUIRER ; diff --git a/modules/core/db/update/postgres/20/201116-0-dropAcquirer_DropScript.sql b/modules/core/db/update/postgres/20/201116-0-dropAcquirer_DropScript.sql new file mode 100644 index 0000000..0e9c57d --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-0-dropAcquirer_DropScript.sql @@ -0,0 +1 @@ +drop table if exists TMS_ACQUIRER__U92545 cascade ; \ No newline at end of file diff --git a/modules/core/db/update/postgres/20/201116-0-dropAid.sql b/modules/core/db/update/postgres/20/201116-0-dropAid.sql new file mode 100644 index 0000000..b462b18 --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-0-dropAid.sql @@ -0,0 +1 @@ +alter table tms_aid rename to TMS_AID__U96433 ; diff --git a/modules/core/db/update/postgres/20/201116-0-dropAid_DropScript.sql b/modules/core/db/update/postgres/20/201116-0-dropAid_DropScript.sql new file mode 100644 index 0000000..59c95d8 --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-0-dropAid_DropScript.sql @@ -0,0 +1 @@ +drop table if exists TMS_AID__U96433 cascade ; \ No newline at end of file diff --git a/modules/core/db/update/postgres/20/201116-0-dropCapk.sql b/modules/core/db/update/postgres/20/201116-0-dropCapk.sql new file mode 100644 index 0000000..231c581 --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-0-dropCapk.sql @@ -0,0 +1 @@ +alter table tms_capk rename to TMS_CAPK__U28343 ; diff --git a/modules/core/db/update/postgres/20/201116-0-dropCapk_DropScript.sql b/modules/core/db/update/postgres/20/201116-0-dropCapk_DropScript.sql new file mode 100644 index 0000000..4efe829 --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-0-dropCapk_DropScript.sql @@ -0,0 +1 @@ +drop table if exists TMS_CAPK__U28343 cascade ; \ No newline at end of file diff --git a/modules/core/db/update/postgres/20/201116-0-dropCard.sql b/modules/core/db/update/postgres/20/201116-0-dropCard.sql new file mode 100644 index 0000000..7a9cd81 --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-0-dropCard.sql @@ -0,0 +1,2 @@ +alter table tms_card rename to TMS_CARD__U44602 ; +alter table tms_issuer_card_link drop constraint FK_ISSCAR_ON_CARD ; diff --git a/modules/core/db/update/postgres/20/201116-0-dropCard_DropScript.sql b/modules/core/db/update/postgres/20/201116-0-dropCard_DropScript.sql new file mode 100644 index 0000000..0ae3628 --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-0-dropCard_DropScript.sql @@ -0,0 +1 @@ +drop table if exists TMS_CARD__U44602 cascade ; \ No newline at end of file diff --git a/modules/core/db/update/postgres/20/201116-0-dropIssuer.sql b/modules/core/db/update/postgres/20/201116-0-dropIssuer.sql new file mode 100644 index 0000000..0017fcf --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-0-dropIssuer.sql @@ -0,0 +1,2 @@ +alter table tms_issuer rename to TMS_ISSUER__U27115 ; +alter table tms_issuer_card_link drop constraint FK_ISSCAR_ON_ISSUER ; diff --git a/modules/core/db/update/postgres/20/201116-0-dropIssuerCardDeleteHistory.sql b/modules/core/db/update/postgres/20/201116-0-dropIssuerCardDeleteHistory.sql new file mode 100644 index 0000000..73d244d --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-0-dropIssuerCardDeleteHistory.sql @@ -0,0 +1 @@ +alter table tms_issuer_card_delete_history rename to TMS_ISSUER_CARD_DELETE_HISTORY__U44930 ; diff --git a/modules/core/db/update/postgres/20/201116-0-dropIssuerCardDeleteHistory_DropScript.sql b/modules/core/db/update/postgres/20/201116-0-dropIssuerCardDeleteHistory_DropScript.sql new file mode 100644 index 0000000..599828f --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-0-dropIssuerCardDeleteHistory_DropScript.sql @@ -0,0 +1 @@ +drop table if exists TMS_ISSUER_CARD_DELETE_HISTORY__U44930 cascade ; \ No newline at end of file diff --git a/modules/core/db/update/postgres/20/201116-0-dropIssuerCardLink.sql b/modules/core/db/update/postgres/20/201116-0-dropIssuerCardLink.sql new file mode 100644 index 0000000..3f59165 --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-0-dropIssuerCardLink.sql @@ -0,0 +1 @@ +alter table tms_issuer_card_link rename to TMS_ISSUER_CARD_LINK__U92224 ; diff --git a/modules/core/db/update/postgres/20/201116-0-dropIssuerCardLink_DropScript.sql b/modules/core/db/update/postgres/20/201116-0-dropIssuerCardLink_DropScript.sql new file mode 100644 index 0000000..4904306 --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-0-dropIssuerCardLink_DropScript.sql @@ -0,0 +1 @@ +drop table if exists TMS_ISSUER_CARD_LINK__U92224 cascade ; \ No newline at end of file diff --git a/modules/core/db/update/postgres/20/201116-0-dropIssuer_DropScript.sql b/modules/core/db/update/postgres/20/201116-0-dropIssuer_DropScript.sql new file mode 100644 index 0000000..8f83ac8 --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-0-dropIssuer_DropScript.sql @@ -0,0 +1 @@ +drop table if exists TMS_ISSUER__U27115 cascade ; \ No newline at end of file diff --git a/modules/core/db/update/postgres/20/201116-0-dropPublicKeySetting.sql b/modules/core/db/update/postgres/20/201116-0-dropPublicKeySetting.sql new file mode 100644 index 0000000..93844f0 --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-0-dropPublicKeySetting.sql @@ -0,0 +1 @@ +alter table tms_public_key_setting rename to TMS_PUBLIC_KEY_SETTING__U68459 ; diff --git a/modules/core/db/update/postgres/20/201116-0-dropPublicKeySetting_DropScript.sql b/modules/core/db/update/postgres/20/201116-0-dropPublicKeySetting_DropScript.sql new file mode 100644 index 0000000..b61428d --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-0-dropPublicKeySetting_DropScript.sql @@ -0,0 +1 @@ +drop table if exists TMS_PUBLIC_KEY_SETTING__U68459 cascade ; \ No newline at end of file diff --git a/modules/core/db/update/postgres/20/201116-0-dropTerminalExt.sql b/modules/core/db/update/postgres/20/201116-0-dropTerminalExt.sql new file mode 100644 index 0000000..c79bb23 --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-0-dropTerminalExt.sql @@ -0,0 +1,2 @@ +alter table tms_terminal_ext rename to TMS_TERMINAL_EXT__U59562 ; +alter table tms_acquirer drop constraint FK_TMS_ACQUIRER_ON__TERMINAL ; diff --git a/modules/core/db/update/postgres/20/201116-0-dropTerminalExt_DropScript.sql b/modules/core/db/update/postgres/20/201116-0-dropTerminalExt_DropScript.sql new file mode 100644 index 0000000..08126d9 --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-0-dropTerminalExt_DropScript.sql @@ -0,0 +1 @@ +drop table if exists TMS_TERMINAL_EXT__U59562 cascade ; \ No newline at end of file diff --git a/modules/core/db/update/postgres/20/201116-0-dropTleSetting.sql b/modules/core/db/update/postgres/20/201116-0-dropTleSetting.sql new file mode 100644 index 0000000..b8e07c6 --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-0-dropTleSetting.sql @@ -0,0 +1,2 @@ +alter table tms_tle_setting rename to TMS_TLE_SETTING__U36239 ; +alter table tms_acquirer drop constraint FK_TMS_ACQUIRER_ON_TLE_SETTING ; diff --git a/modules/core/db/update/postgres/20/201116-0-dropTleSetting_DropScript.sql b/modules/core/db/update/postgres/20/201116-0-dropTleSetting_DropScript.sql new file mode 100644 index 0000000..896f77d --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-0-dropTleSetting_DropScript.sql @@ -0,0 +1 @@ +drop table if exists TMS_TLE_SETTING__U36239 cascade ; \ No newline at end of file diff --git a/modules/core/db/update/postgres/20/201116-1-createTmsextAcquirer.sql b/modules/core/db/update/postgres/20/201116-1-createTmsextAcquirer.sql new file mode 100644 index 0000000..accefda --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-1-createTmsextAcquirer.sql @@ -0,0 +1,33 @@ +create table TMSEXT_ACQUIRER ( + ID uuid, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + NAME varchar(30) not null, + HOST_ID varchar(3), + NUMBER_OF_PRINT integer, + RESP_TIMEOUT integer, + FORCE_SETTLE_DAYS integer, + FORCE_SETTLE_TM_COUNT integer, + ACQUIRER_ID varchar(2), + HOST_DESTINATION_ADDR varchar(100), + HOST_DESTINATION_PORT varchar(6), + SHOW_PRINT_EXP_DATE boolean, + TLE_ACQUIRER boolean, + TLE_SETTING_ID uuid, + MASTER_KEY_LOCATION varchar(4), + MASTER_KEY text, + WORKING_KEY text, + ACQUIRER_TYPE varchar(50) not null, + _TERMINAL_ID uuid, + BATCH_NUMBER varchar(6), + MERCHANT_ID varchar(15), + TERMINAL_ID varchar(8), + -- + primary key (ID) +); \ No newline at end of file diff --git a/modules/core/db/update/postgres/20/201116-1-createTmsextAid.sql b/modules/core/db/update/postgres/20/201116-1-createTmsextAid.sql new file mode 100644 index 0000000..383ec21 --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-1-createTmsextAid.sql @@ -0,0 +1,36 @@ +create table TMSEXT_AID ( + ID uuid, + VERSION integer not null, + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + CREATE_TS timestamp, + CREATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + NAME varchar(255) not null, + TXN_TYPE varchar(8) not null, + AID varchar(20) not null, + AID_VERSION varchar(4) not null, + TAC_DEFAULT varchar(10) not null, + TAC_DENIAL varchar(10) not null, + TAC_ONLINE varchar(10) not null, + THRESHOLD varchar(12) not null, + TARGET_PERCENTAGE varchar(4) not null, + MAX_TARGET_PERCENTAGE varchar(4) not null, + DDOL text not null, + TDOL text not null, + FLOOR_LIMIT varchar(8) not null, + APP_SELECT varchar(2) not null, + AID_PRIORITY varchar(2) not null, + TRX_TYPE9C varchar(2) not null, + CATEGORY_CODE varchar(2) not null, + CL_KERNEL_TO_USE varchar(4), + CL_OPTIONS varchar(8), + CL_TRX_LIMIT varchar(12), + CL_CVM_LIMIT varchar(12), + CL_FLOOR_LIMIT varchar(12), + REMARK varchar(100), + -- + primary key (ID) +); \ No newline at end of file diff --git a/modules/core/db/update/postgres/20/201116-1-createTmsextCapk.sql b/modules/core/db/update/postgres/20/201116-1-createTmsextCapk.sql new file mode 100644 index 0000000..eb0e0fc --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-1-createTmsextCapk.sql @@ -0,0 +1,22 @@ +create table TMSEXT_CAPK ( + ID uuid, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + NAME varchar(50) not null, + IDX varchar(255) not null, + RID varchar(10) not null, + MODULUS text not null, + EXPONENT varchar(4) not null, + ALGO varchar(2) not null, + HASH text not null, + EXPIRY_DATE date, + REMARK varchar(100), + -- + primary key (ID) +); \ No newline at end of file diff --git a/modules/core/db/update/postgres/20/201116-1-createTmsextCard.sql b/modules/core/db/update/postgres/20/201116-1-createTmsextCard.sql new file mode 100644 index 0000000..eea78a4 --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-1-createTmsextCard.sql @@ -0,0 +1,23 @@ +create table TMSEXT_CARD ( + ID uuid, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + NAME varchar(100) not null, + BIN_RANGE_START varchar(10) not null, + BIN_RANGE_END varchar(10) not null, + CARD_NUM_LENGTH integer not null, + PAN_DIGIT_UNMASKING varchar(20) not null, + PRINT_CARDHOLDER_COPY boolean, + PRINT_MERCHANT_COPY boolean, + PRINT_BANK_COPY boolean, + PIN_LENGTH integer, + PIN_PROMPT boolean, + -- + primary key (ID) +); \ No newline at end of file diff --git a/modules/core/db/update/postgres/20/201116-1-createTmsextIssuer.sql b/modules/core/db/update/postgres/20/201116-1-createTmsextIssuer.sql new file mode 100644 index 0000000..8d40ab7 --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-1-createTmsextIssuer.sql @@ -0,0 +1,55 @@ +create table TMSEXT_ISSUER ( + ID uuid, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + NAME varchar(30) not null, + ISSUER_ID varchar(10) not null, + CAPTURE_TRANS boolean, + PRINT_RECEIPT boolean, + ACCOUNT_SELECT boolean, + PIN_ENTRY boolean, + CHECK_MOD10 boolean, + CHECK_EXP_DATE boolean, + MANUAL_PAN_ENTRY boolean, + ENABLE_OFFLINE boolean, + ENABLE_ADJUST boolean, + DISABLE_REFUND boolean, + DISABLE_CARD_VER boolean, + DISABLE_VOID boolean, + DISABLE_REWARD boolean, + DISABLE_INSTALLMENT boolean, + DISABLE_CASH boolean, + DISABLE_AUTH boolean, + DISABLE_BALANCE_INQUIRY boolean, + BALANCE_INQUIRY_SLIP boolean, + DISABLE_POINT_BAL_INQ boolean, + ENABLE_PRINT_POINT_BAL boolean, + AUTO_CALCULATION boolean, + ON_US boolean, + INQ_SALDO boolean, + CASH_WITHDRAWAL boolean, + TRANSFER_BNI boolean, + TRANSFER_ANTAR_BANK boolean, + REG_E_CHANNEL boolean, + PAYMENT_TELKOM boolean, + PULSA_TELKOMSEL boolean, + BPJS_KESEHATAN boolean, + BNI_CC_PAYMENT boolean, + TAPCASH_TOPUP boolean, + CASH_DEPOSIT boolean, + IMIGRASI boolean, + PAJAK_PNBP_BEA_CUKAI boolean, + INTEREST varchar(10), + FLOOR_LIMIT varchar(10), + TIP_ADJUST varchar(10), + DEFAULT_ACCOUNT varchar(2), + ACQUIRER_ID uuid, + -- + primary key (ID) +); \ No newline at end of file diff --git a/modules/core/db/update/postgres/20/201116-1-createTmsextIssuerCardDeleteHistory.sql b/modules/core/db/update/postgres/20/201116-1-createTmsextIssuerCardDeleteHistory.sql new file mode 100644 index 0000000..9f0399b --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-1-createTmsextIssuerCardDeleteHistory.sql @@ -0,0 +1,12 @@ +create table TMSEXT_ISSUER_CARD_DELETE_HISTORY ( + ID uuid, + CREATE_TS timestamp, + CREATED_BY varchar(50), + -- + ISSUER_ID uuid not null, + CARD_ID uuid not null, + FLAG varchar(1) not null, + PIN_PROMPT boolean, + -- + primary key (ID) +); \ No newline at end of file diff --git a/modules/core/db/update/postgres/20/201116-1-createTmsextIssuerCardLink.sql b/modules/core/db/update/postgres/20/201116-1-createTmsextIssuerCardLink.sql new file mode 100644 index 0000000..9848fd6 --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-1-createTmsextIssuerCardLink.sql @@ -0,0 +1,5 @@ +create table TMSEXT_ISSUER_CARD_LINK ( + ISSUER_ID uuid, + CARD_ID uuid, + primary key (ISSUER_ID, CARD_ID) +); diff --git a/modules/core/db/update/postgres/20/201116-1-createTmsextPublicKeySetting.sql b/modules/core/db/update/postgres/20/201116-1-createTmsextPublicKeySetting.sql new file mode 100644 index 0000000..9d77b7d --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-1-createTmsextPublicKeySetting.sql @@ -0,0 +1,17 @@ +create table TMSEXT_PUBLIC_KEY_SETTING ( + ID uuid, + VERSION integer not null, + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + CREATE_TS timestamp, + CREATED_BY varchar(50), + -- + IDX varchar(5) not null, + RID varchar(10) not null, + MODULUS text not null, + EXPONENT varchar(2) not null, + HASH text not null, + ALGO varchar(2) not null, + -- + primary key (ID) +); \ No newline at end of file diff --git a/modules/core/db/update/postgres/20/201116-1-createTmsextTerminalExt.sql b/modules/core/db/update/postgres/20/201116-1-createTmsextTerminalExt.sql new file mode 100644 index 0000000..5ba45e5 --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-1-createTmsextTerminalExt.sql @@ -0,0 +1,48 @@ +create table TMSEXT_TERMINAL_EXT ( + ID uuid, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + TERMINAL_ID varchar(8) not null, + MERCHANT_ID varchar(15) not null, + MERCHANT_NAME1 varchar(20) not null, + MERCHANT_NAME2 varchar(20), + MERCHANT_NAME3 varchar(20), + MERCHANT_PASSWORD varchar(6), + ADMIN_PASSWORD varchar(6), + INITIALISE_PASSWORD varchar(6), + TIME_OF_SETTLEMENT integer, + SETTLE_TIME1 varchar(4), + SETTLE_TIME2 varchar(4), + SETTLE_TIME3 varchar(4), + PASSWORD_VOID boolean, + PASSWORD_ADJUST boolean, + PASSWORD_REFUND boolean, + PASSWORD_OFFLINE boolean, + PUSH_SETTLE_IN_DAYS integer, + SETTLE_MAX_TRX_COUNT integer, + SETTLE_PERIOD integer, + SETTLE_ATTEMPT integer, + AUTO_SETTLE boolean, + TRACK2_TOP_UP_TUNAI varchar(40), + REDEMPTION boolean, + SMART_SPENDING boolean, + LOYALTY_PURSE_ID1 varchar(10), + LOYALTY_PURSE_ID2 varchar(10), + LOYALTY_PURSE_ID3 varchar(10), + EMV_INFORMATION boolean, + CVM_ONLINE_PIN_BYPASS boolean, + CVM_SIGN_PROMPT_PIN boolean, + AUTO_INIT boolean, + AUTO_INIT_NII varchar(255), + CALL_CENTER1 varchar(255), + CALL_CENTER2 varchar(255), + IMPORT_DEFAULT boolean, + -- + primary key (ID) +); \ No newline at end of file diff --git a/modules/core/db/update/postgres/20/201116-1-createTmsextTleSetting.sql b/modules/core/db/update/postgres/20/201116-1-createTmsextTleSetting.sql new file mode 100644 index 0000000..9a5ef7e --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-1-createTmsextTleSetting.sql @@ -0,0 +1,32 @@ +create table TMSEXT_TLE_SETTING ( + ID uuid, + VERSION integer not null, + CREATE_TS timestamp, + CREATED_BY varchar(50), + UPDATE_TS timestamp, + UPDATED_BY varchar(50), + DELETE_TS timestamp, + DELETED_BY varchar(50), + -- + TLE_EFT_SEC varchar(10) not null, + TLE_ID varchar(2) not null, + ACQUIRER_ID varchar(3) not null, + LTMK_AID varchar(3) not null, + VENDOR_ID varchar(8) not null, + TLE_VER varchar(1) not null, + KMS_SECURE_NII varchar(4), + EDC_SECURE_NII varchar(4), + CAPK_EXPONENT varchar(2), + CAPK_LENGTH integer, + CAPK_VALUE text, + AID_LENGTH integer, + AID_VALUE text, + FIELD_ENCRYPTED1 varchar(3), + FIELD_ENCRYPTED2 varchar(3), + FIELD_ENCRYPTED3 varchar(3), + FIELD_ENCRYPTED4 varchar(3), + FIELD_ENCRYPTED5 varchar(3), + FIELD_ENCRYPTED6 varchar(3), + -- + primary key (ID) +); \ No newline at end of file diff --git a/modules/core/db/update/postgres/20/201116-2-createTmsextAcquirer.sql b/modules/core/db/update/postgres/20/201116-2-createTmsextAcquirer.sql new file mode 100644 index 0000000..2d9fa74 --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-2-createTmsextAcquirer.sql @@ -0,0 +1,4 @@ +alter table TMSEXT_ACQUIRER add constraint FK_TMSEXT_ACQUIRER_ON_TLE_SETTING foreign key (TLE_SETTING_ID) references TMSEXT_TLE_SETTING(ID); +alter table TMSEXT_ACQUIRER add constraint FK_TMSEXT_ACQUIRER_ON__TERMINAL foreign key (_TERMINAL_ID) references TMSEXT_TERMINAL_EXT(ID); +create index IDX_TMSEXT_ACQUIRER_ON_TLE_SETTING on TMSEXT_ACQUIRER (TLE_SETTING_ID); +create index IDX_TMSEXT_ACQUIRER_ON__TERMINAL on TMSEXT_ACQUIRER (_TERMINAL_ID); diff --git a/modules/core/db/update/postgres/20/201116-2-createTmsextIssuer.sql b/modules/core/db/update/postgres/20/201116-2-createTmsextIssuer.sql new file mode 100644 index 0000000..ae8669f --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-2-createTmsextIssuer.sql @@ -0,0 +1,2 @@ +alter table TMSEXT_ISSUER add constraint FK_TMSEXT_ISSUER_ON_ACQUIRER foreign key (ACQUIRER_ID) references TMSEXT_ACQUIRER(ID); +create index IDX_TMSEXT_ISSUER_ON_ACQUIRER on TMSEXT_ISSUER (ACQUIRER_ID); diff --git a/modules/core/db/update/postgres/20/201116-2-createTmsextIssuerCardLink.sql b/modules/core/db/update/postgres/20/201116-2-createTmsextIssuerCardLink.sql new file mode 100644 index 0000000..8e77d7a --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-2-createTmsextIssuerCardLink.sql @@ -0,0 +1,2 @@ +alter table TMSEXT_ISSUER_CARD_LINK add constraint FK_TMSISSCAR_ON_ISSUER foreign key (ISSUER_ID) references TMSEXT_ISSUER(ID); +alter table TMSEXT_ISSUER_CARD_LINK add constraint FK_TMSISSCAR_ON_CARD foreign key (CARD_ID) references TMSEXT_CARD(ID); \ No newline at end of file diff --git a/modules/core/db/update/postgres/20/201116-2-createTmsextPublicKeySetting.sql b/modules/core/db/update/postgres/20/201116-2-createTmsextPublicKeySetting.sql new file mode 100644 index 0000000..c8ac90f --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-2-createTmsextPublicKeySetting.sql @@ -0,0 +1 @@ +create unique index IDX_TMSEXT_PUBLIC_KEY_SETTING_UK_IDX on TMSEXT_PUBLIC_KEY_SETTING (IDX) ; diff --git a/modules/core/db/update/postgres/20/201116-2-createTmsextTerminalExt.sql b/modules/core/db/update/postgres/20/201116-2-createTmsextTerminalExt.sql new file mode 100644 index 0000000..7b11288 --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-2-createTmsextTerminalExt.sql @@ -0,0 +1 @@ +create unique index IDX_TMSEXT_TERMINAL_EXT_UK_TERMINAL_ID on TMSEXT_TERMINAL_EXT (TERMINAL_ID) where DELETE_TS is null ; diff --git a/modules/core/db/update/postgres/20/201116-2-createTmsextTleSetting.sql b/modules/core/db/update/postgres/20/201116-2-createTmsextTleSetting.sql new file mode 100644 index 0000000..0d97f8c --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-2-createTmsextTleSetting.sql @@ -0,0 +1 @@ +create unique index IDX_TMSEXT_TLE_SETTING_UK_TLE_EFT_SEC on TMSEXT_TLE_SETTING (TLE_EFT_SEC) where DELETE_TS is null ; diff --git a/modules/core/db/update/postgres/20/201116-2-updateIssuerCardLink01.sql b/modules/core/db/update/postgres/20/201116-2-updateIssuerCardLink01.sql new file mode 100644 index 0000000..4b0135d --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-2-updateIssuerCardLink01.sql @@ -0,0 +1 @@ +alter table TMS_ISSUER_CARD_LINK add constraint FK_TMS_ISSUER_CARD_LINK_ON_ISSUER foreign key (ISSUER_ID) references TMSEXT_ISSUER(ID); \ No newline at end of file diff --git a/modules/core/db/update/postgres/20/201116-2-updateIssuerCardLink02.sql b/modules/core/db/update/postgres/20/201116-2-updateIssuerCardLink02.sql new file mode 100644 index 0000000..9fe9767 --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-2-updateIssuerCardLink02.sql @@ -0,0 +1 @@ +alter table TMS_ISSUER_CARD_LINK add constraint FK_TMS_ISSUER_CARD_LINK_ON_CARD foreign key (CARD_ID) references TMSEXT_CARD(ID); \ No newline at end of file diff --git a/modules/core/db/update/postgres/20/201116-2-updateTmsextTleSetting.sql b/modules/core/db/update/postgres/20/201116-2-updateTmsextTleSetting.sql new file mode 100644 index 0000000..9143901 --- /dev/null +++ b/modules/core/db/update/postgres/20/201116-2-updateTmsextTleSetting.sql @@ -0,0 +1,4 @@ +alter table TMSEXT_TLE_SETTING add column FIELD_ENCRYPTED7 varchar(3) ; +alter table TMSEXT_TLE_SETTING add column FIELD_ENCRYPTED8 varchar(3) ; +alter table TMSEXT_TLE_SETTING add column FIELD_ENCRYPTED9 varchar(3) ; +alter table TMSEXT_TLE_SETTING add column FIELD_ENCRYPTED10 varchar(3) ; diff --git a/modules/core/db/update/postgres/21/210217-2-updateTmsextAcquirer.sql b/modules/core/db/update/postgres/21/210217-2-updateTmsextAcquirer.sql new file mode 100644 index 0000000..352ce82 --- /dev/null +++ b/modules/core/db/update/postgres/21/210217-2-updateTmsextAcquirer.sql @@ -0,0 +1,3 @@ +alter table TMSEXT_ACQUIRER rename column force_settle_tm_count to force_settle_tm_count__u17308 ; +alter table TMSEXT_ACQUIRER rename column force_settle_days to force_settle_days__u57528 ; +alter table TMSEXT_ACQUIRER add column SETTLEMENT_HOST_ID varchar(3) ; diff --git a/modules/core/db/update/postgres/21/210217-2-updateTmsextAcquirer_DropScript.sql b/modules/core/db/update/postgres/21/210217-2-updateTmsextAcquirer_DropScript.sql new file mode 100644 index 0000000..b88bfa2 --- /dev/null +++ b/modules/core/db/update/postgres/21/210217-2-updateTmsextAcquirer_DropScript.sql @@ -0,0 +1,2 @@ +alter table TMSEXT_ACQUIRER drop column FORCE_SETTLE_DAYS__U57528 cascade ; +alter table TMSEXT_ACQUIRER drop column FORCE_SETTLE_TM_COUNT__U17308 cascade ; diff --git a/modules/core/db/update/postgres/21/210217-2-updateTmsextAid.sql b/modules/core/db/update/postgres/21/210217-2-updateTmsextAid.sql new file mode 100644 index 0000000..2dd6419 --- /dev/null +++ b/modules/core/db/update/postgres/21/210217-2-updateTmsextAid.sql @@ -0,0 +1,2 @@ +alter table TMSEXT_AID add column ADDITIONAL_TERM_CAPABILITY varchar(100) ; +alter table TMSEXT_AID add column EMV_CONF_TERM_CAPABILITY varchar(100) ; diff --git a/modules/core/db/update/postgres/21/210217-2-updateTmsextIssuer.sql b/modules/core/db/update/postgres/21/210217-2-updateTmsextIssuer.sql new file mode 100644 index 0000000..f6a7f9d --- /dev/null +++ b/modules/core/db/update/postgres/21/210217-2-updateTmsextIssuer.sql @@ -0,0 +1,38 @@ +alter table TMSEXT_ISSUER rename column default_account to default_account__u15846 ; +alter table TMSEXT_ISSUER rename column tip_adjust to tip_adjust__u17388 ; +alter table TMSEXT_ISSUER rename column floor_limit to floor_limit__u41359 ; +alter table TMSEXT_ISSUER rename column interest to interest__u24260 ; +alter table TMSEXT_ISSUER rename column pajak_pnbp_bea_cukai to pajak_pnbp_bea_cukai__u38101 ; +alter table TMSEXT_ISSUER rename column imigrasi to imigrasi__u52143 ; +alter table TMSEXT_ISSUER rename column cash_deposit to cash_deposit__u64469 ; +alter table TMSEXT_ISSUER rename column tapcash_topup to tapcash_topup__u32181 ; +alter table TMSEXT_ISSUER rename column bni_cc_payment to bni_cc_payment__u90616 ; +alter table TMSEXT_ISSUER rename column bpjs_kesehatan to bpjs_kesehatan__u02800 ; +alter table TMSEXT_ISSUER rename column pulsa_telkomsel to pulsa_telkomsel__u51641 ; +alter table TMSEXT_ISSUER rename column payment_telkom to payment_telkom__u24087 ; +alter table TMSEXT_ISSUER rename column reg_e_channel to reg_e_channel__u54912 ; +alter table TMSEXT_ISSUER rename column transfer_antar_bank to transfer_antar_bank__u42127 ; +alter table TMSEXT_ISSUER rename column transfer_bni to transfer_bni__u26469 ; +alter table TMSEXT_ISSUER rename column cash_withdrawal to cash_withdrawal__u21398 ; +alter table TMSEXT_ISSUER rename column inq_saldo to inq_saldo__u96887 ; +alter table TMSEXT_ISSUER rename column auto_calculation to auto_calculation__u98340 ; +alter table TMSEXT_ISSUER rename column enable_print_point_bal to enable_print_point_bal__u09927 ; +alter table TMSEXT_ISSUER rename column disable_point_bal_inq to disable_point_bal_inq__u34837 ; +alter table TMSEXT_ISSUER rename column balance_inquiry_slip to balance_inquiry_slip__u78387 ; +alter table TMSEXT_ISSUER rename column disable_balance_inquiry to disable_balance_inquiry__u06873 ; +alter table TMSEXT_ISSUER rename column disable_auth to disable_auth__u56364 ; +alter table TMSEXT_ISSUER rename column disable_cash to disable_cash__u63896 ; +alter table TMSEXT_ISSUER rename column disable_installment to disable_installment__u83127 ; +alter table TMSEXT_ISSUER rename column disable_reward to disable_reward__u28498 ; +alter table TMSEXT_ISSUER rename column disable_void to disable_void__u84225 ; +alter table TMSEXT_ISSUER rename column disable_card_ver to disable_card_ver__u48998 ; +alter table TMSEXT_ISSUER rename column disable_refund to disable_refund__u17454 ; +alter table TMSEXT_ISSUER rename column enable_adjust to enable_adjust__u53804 ; +alter table TMSEXT_ISSUER rename column enable_offline to enable_offline__u37544 ; +alter table TMSEXT_ISSUER rename column manual_pan_entry to manual_pan_entry__u69179 ; +alter table TMSEXT_ISSUER rename column check_exp_date to check_exp_date__u98265 ; +alter table TMSEXT_ISSUER rename column check_mod10 to check_mod10__u78750 ; +alter table TMSEXT_ISSUER rename column pin_entry to pin_entry__u33837 ; +alter table TMSEXT_ISSUER rename column account_select to account_select__u03028 ; +alter table TMSEXT_ISSUER rename column print_receipt to print_receipt__u76279 ; +alter table TMSEXT_ISSUER rename column capture_trans to capture_trans__u64447 ; diff --git a/modules/core/db/update/postgres/21/210217-2-updateTmsextIssuer_DropScript.sql b/modules/core/db/update/postgres/21/210217-2-updateTmsextIssuer_DropScript.sql new file mode 100644 index 0000000..a16c075 --- /dev/null +++ b/modules/core/db/update/postgres/21/210217-2-updateTmsextIssuer_DropScript.sql @@ -0,0 +1,38 @@ +alter table TMSEXT_ISSUER drop column CAPTURE_TRANS__U64447 cascade ; +alter table TMSEXT_ISSUER drop column PRINT_RECEIPT__U76279 cascade ; +alter table TMSEXT_ISSUER drop column ACCOUNT_SELECT__U03028 cascade ; +alter table TMSEXT_ISSUER drop column PIN_ENTRY__U33837 cascade ; +alter table TMSEXT_ISSUER drop column CHECK_MOD10__U78750 cascade ; +alter table TMSEXT_ISSUER drop column CHECK_EXP_DATE__U98265 cascade ; +alter table TMSEXT_ISSUER drop column MANUAL_PAN_ENTRY__U69179 cascade ; +alter table TMSEXT_ISSUER drop column ENABLE_OFFLINE__U37544 cascade ; +alter table TMSEXT_ISSUER drop column ENABLE_ADJUST__U53804 cascade ; +alter table TMSEXT_ISSUER drop column DISABLE_REFUND__U17454 cascade ; +alter table TMSEXT_ISSUER drop column DISABLE_CARD_VER__U48998 cascade ; +alter table TMSEXT_ISSUER drop column DISABLE_VOID__U84225 cascade ; +alter table TMSEXT_ISSUER drop column DISABLE_REWARD__U28498 cascade ; +alter table TMSEXT_ISSUER drop column DISABLE_INSTALLMENT__U83127 cascade ; +alter table TMSEXT_ISSUER drop column DISABLE_CASH__U63896 cascade ; +alter table TMSEXT_ISSUER drop column DISABLE_AUTH__U56364 cascade ; +alter table TMSEXT_ISSUER drop column DISABLE_BALANCE_INQUIRY__U06873 cascade ; +alter table TMSEXT_ISSUER drop column BALANCE_INQUIRY_SLIP__U78387 cascade ; +alter table TMSEXT_ISSUER drop column DISABLE_POINT_BAL_INQ__U34837 cascade ; +alter table TMSEXT_ISSUER drop column ENABLE_PRINT_POINT_BAL__U09927 cascade ; +alter table TMSEXT_ISSUER drop column AUTO_CALCULATION__U98340 cascade ; +alter table TMSEXT_ISSUER drop column INQ_SALDO__U96887 cascade ; +alter table TMSEXT_ISSUER drop column CASH_WITHDRAWAL__U21398 cascade ; +alter table TMSEXT_ISSUER drop column TRANSFER_BNI__U26469 cascade ; +alter table TMSEXT_ISSUER drop column TRANSFER_ANTAR_BANK__U42127 cascade ; +alter table TMSEXT_ISSUER drop column REG_E_CHANNEL__U54912 cascade ; +alter table TMSEXT_ISSUER drop column PAYMENT_TELKOM__U24087 cascade ; +alter table TMSEXT_ISSUER drop column PULSA_TELKOMSEL__U51641 cascade ; +alter table TMSEXT_ISSUER drop column BPJS_KESEHATAN__U02800 cascade ; +alter table TMSEXT_ISSUER drop column BNI_CC_PAYMENT__U90616 cascade ; +alter table TMSEXT_ISSUER drop column TAPCASH_TOPUP__U32181 cascade ; +alter table TMSEXT_ISSUER drop column CASH_DEPOSIT__U64469 cascade ; +alter table TMSEXT_ISSUER drop column IMIGRASI__U52143 cascade ; +alter table TMSEXT_ISSUER drop column PAJAK_PNBP_BEA_CUKAI__U38101 cascade ; +alter table TMSEXT_ISSUER drop column INTEREST__U24260 cascade ; +alter table TMSEXT_ISSUER drop column FLOOR_LIMIT__U41359 cascade ; +alter table TMSEXT_ISSUER drop column TIP_ADJUST__U17388 cascade ; +alter table TMSEXT_ISSUER drop column DEFAULT_ACCOUNT__U15846 cascade ; diff --git a/modules/core/db/update/postgres/21/210217-2-updateTmsextTerminalExt.sql b/modules/core/db/update/postgres/21/210217-2-updateTmsextTerminalExt.sql new file mode 100644 index 0000000..39a0967 --- /dev/null +++ b/modules/core/db/update/postgres/21/210217-2-updateTmsextTerminalExt.sql @@ -0,0 +1,35 @@ +alter table TMSEXT_TERMINAL_EXT rename column auto_init_nii to auto_init_nii__u81443 ; +alter table TMSEXT_TERMINAL_EXT rename column auto_init to auto_init__u46945 ; +alter table TMSEXT_TERMINAL_EXT rename column cvm_sign_prompt_pin to cvm_sign_prompt_pin__u48776 ; +alter table TMSEXT_TERMINAL_EXT rename column cvm_online_pin_bypass to cvm_online_pin_bypass__u79223 ; +alter table TMSEXT_TERMINAL_EXT rename column emv_information to emv_information__u73001 ; +alter table TMSEXT_TERMINAL_EXT rename column loyalty_purse_id3 to loyalty_purse_id3__u22036 ; +alter table TMSEXT_TERMINAL_EXT rename column loyalty_purse_id2 to loyalty_purse_id2__u68926 ; +alter table TMSEXT_TERMINAL_EXT rename column loyalty_purse_id1 to loyalty_purse_id1__u84377 ; +alter table TMSEXT_TERMINAL_EXT rename column smart_spending to smart_spending__u41879 ; +alter table TMSEXT_TERMINAL_EXT rename column redemption to redemption__u32617 ; +alter table TMSEXT_TERMINAL_EXT rename column track2_top_up_tunai to track2_top_up_tunai__u60012 ; +alter table TMSEXT_TERMINAL_EXT rename column auto_settle to auto_settle__u93743 ; +alter table TMSEXT_TERMINAL_EXT rename column settle_attempt to settle_attempt__u74996 ; +alter table TMSEXT_TERMINAL_EXT rename column settle_period to settle_period__u79873 ; +alter table TMSEXT_TERMINAL_EXT rename column push_settle_in_days to push_settle_in_days__u67699 ; +alter table TMSEXT_TERMINAL_EXT rename column password_offline to password_offline__u66397 ; +alter table TMSEXT_TERMINAL_EXT rename column password_refund to password_refund__u35552 ; +alter table TMSEXT_TERMINAL_EXT rename column password_adjust to password_adjust__u14364 ; +alter table TMSEXT_TERMINAL_EXT rename column password_void to password_void__u10756 ; +alter table TMSEXT_TERMINAL_EXT rename column settle_time3 to settle_time3__u68658 ; +alter table TMSEXT_TERMINAL_EXT rename column settle_time2 to settle_time2__u96656 ; +alter table TMSEXT_TERMINAL_EXT rename column settle_time1 to settle_time1__u31594 ; +alter table TMSEXT_TERMINAL_EXT rename column time_of_settlement to time_of_settlement__u02951 ; +alter table TMSEXT_TERMINAL_EXT rename column initialise_password to initialise_password__u92069 ; +alter table TMSEXT_TERMINAL_EXT add column VOID_PASSWORD varchar(8) ; +alter table TMSEXT_TERMINAL_EXT add column SETTLEMENT_PASSWORD varchar(8) ; +alter table TMSEXT_TERMINAL_EXT add column FALLBACK_ENABLED boolean ; +alter table TMSEXT_TERMINAL_EXT add column BRIZZI_DISCOUNT_PERCENTAGE varchar(10) ; +alter table TMSEXT_TERMINAL_EXT add column BRIZZI_DISCOUNT_AMOUNT varchar(30) ; +alter table TMSEXT_TERMINAL_EXT add column SETTLE_WARNING_TRX_COUNT integer ; +alter table TMSEXT_TERMINAL_EXT alter column MERCHANT_NAME1 set data type varchar(30) ; +alter table TMSEXT_TERMINAL_EXT alter column MERCHANT_NAME2 set data type varchar(30) ; +alter table TMSEXT_TERMINAL_EXT alter column MERCHANT_NAME3 set data type varchar(30) ; +alter table TMSEXT_TERMINAL_EXT alter column MERCHANT_PASSWORD set data type varchar(8) ; +alter table TMSEXT_TERMINAL_EXT alter column ADMIN_PASSWORD set data type varchar(8) ; diff --git a/modules/core/db/update/postgres/21/210217-2-updateTmsextTerminalExt_DropScript.sql b/modules/core/db/update/postgres/21/210217-2-updateTmsextTerminalExt_DropScript.sql new file mode 100644 index 0000000..020b588 --- /dev/null +++ b/modules/core/db/update/postgres/21/210217-2-updateTmsextTerminalExt_DropScript.sql @@ -0,0 +1,24 @@ +alter table TMSEXT_TERMINAL_EXT drop column INITIALISE_PASSWORD__U92069 cascade ; +alter table TMSEXT_TERMINAL_EXT drop column TIME_OF_SETTLEMENT__U02951 cascade ; +alter table TMSEXT_TERMINAL_EXT drop column SETTLE_TIME1__U31594 cascade ; +alter table TMSEXT_TERMINAL_EXT drop column SETTLE_TIME2__U96656 cascade ; +alter table TMSEXT_TERMINAL_EXT drop column SETTLE_TIME3__U68658 cascade ; +alter table TMSEXT_TERMINAL_EXT drop column PASSWORD_VOID__U10756 cascade ; +alter table TMSEXT_TERMINAL_EXT drop column PASSWORD_ADJUST__U14364 cascade ; +alter table TMSEXT_TERMINAL_EXT drop column PASSWORD_REFUND__U35552 cascade ; +alter table TMSEXT_TERMINAL_EXT drop column PASSWORD_OFFLINE__U66397 cascade ; +alter table TMSEXT_TERMINAL_EXT drop column PUSH_SETTLE_IN_DAYS__U67699 cascade ; +alter table TMSEXT_TERMINAL_EXT drop column SETTLE_PERIOD__U79873 cascade ; +alter table TMSEXT_TERMINAL_EXT drop column SETTLE_ATTEMPT__U74996 cascade ; +alter table TMSEXT_TERMINAL_EXT drop column AUTO_SETTLE__U93743 cascade ; +alter table TMSEXT_TERMINAL_EXT drop column TRACK2_TOP_UP_TUNAI__U60012 cascade ; +alter table TMSEXT_TERMINAL_EXT drop column REDEMPTION__U32617 cascade ; +alter table TMSEXT_TERMINAL_EXT drop column SMART_SPENDING__U41879 cascade ; +alter table TMSEXT_TERMINAL_EXT drop column LOYALTY_PURSE_ID1__U84377 cascade ; +alter table TMSEXT_TERMINAL_EXT drop column LOYALTY_PURSE_ID2__U68926 cascade ; +alter table TMSEXT_TERMINAL_EXT drop column LOYALTY_PURSE_ID3__U22036 cascade ; +alter table TMSEXT_TERMINAL_EXT drop column EMV_INFORMATION__U73001 cascade ; +alter table TMSEXT_TERMINAL_EXT drop column CVM_ONLINE_PIN_BYPASS__U79223 cascade ; +alter table TMSEXT_TERMINAL_EXT drop column CVM_SIGN_PROMPT_PIN__U48776 cascade ; +alter table TMSEXT_TERMINAL_EXT drop column AUTO_INIT__U46945 cascade ; +alter table TMSEXT_TERMINAL_EXT drop column AUTO_INIT_NII__U81443 cascade ; diff --git a/modules/core/db/update/postgres/21/210218-2-updateTmsextTerminalExt.sql b/modules/core/db/update/postgres/21/210218-2-updateTmsextTerminalExt.sql new file mode 100644 index 0000000..57d8071 --- /dev/null +++ b/modules/core/db/update/postgres/21/210218-2-updateTmsextTerminalExt.sql @@ -0,0 +1 @@ +alter table TMSEXT_TERMINAL_EXT rename column import_default to import_default__u70904 ; diff --git a/modules/core/db/update/postgres/21/210218-2-updateTmsextTerminalExt_DropScript.sql b/modules/core/db/update/postgres/21/210218-2-updateTmsextTerminalExt_DropScript.sql new file mode 100644 index 0000000..efddb5b --- /dev/null +++ b/modules/core/db/update/postgres/21/210218-2-updateTmsextTerminalExt_DropScript.sql @@ -0,0 +1 @@ +alter table TMSEXT_TERMINAL_EXT drop column IMPORT_DEFAULT__U70904 cascade ; diff --git a/modules/core/db/update/postgres/21/210412-2-updateTmsextTerminalExt.sql b/modules/core/db/update/postgres/21/210412-2-updateTmsextTerminalExt.sql new file mode 100644 index 0000000..9a54e72 --- /dev/null +++ b/modules/core/db/update/postgres/21/210412-2-updateTmsextTerminalExt.sql @@ -0,0 +1,10 @@ +alter table TMSEXT_TERMINAL_EXT add column FEATURE_SALE boolean ; +alter table TMSEXT_TERMINAL_EXT add column FEATURE_INSTALLMENT boolean ; +alter table TMSEXT_TERMINAL_EXT add column FEATURE_CARD_VERIFICATION boolean ; +alter table TMSEXT_TERMINAL_EXT add column FEATURE_SALE_REDEMPTION boolean ; +alter table TMSEXT_TERMINAL_EXT add column REPRINT_ONLINE_RETRY integer ; +alter table TMSEXT_TERMINAL_EXT add column QRIS_COUNT_DOWN integer ; +alter table TMSEXT_TERMINAL_EXT add column FEATURE_MANUAL_KEY_IN boolean ; +alter table TMSEXT_TERMINAL_EXT add column FEATURE_SALE_COMPLETION boolean ; +alter table TMSEXT_TERMINAL_EXT add column FEATURE_SALE_TIP boolean ; +alter table TMSEXT_TERMINAL_EXT add column FEATURE_SALE_FARE_NON_FARE boolean ; diff --git a/modules/core/db/update/postgres/21/210909-2-updateTmsextTerminalExt.sql b/modules/core/db/update/postgres/21/210909-2-updateTmsextTerminalExt.sql new file mode 100644 index 0000000..abb6a81 --- /dev/null +++ b/modules/core/db/update/postgres/21/210909-2-updateTmsextTerminalExt.sql @@ -0,0 +1,4 @@ +alter table TMSEXT_TERMINAL_EXT add column INSTALLMENT1_OPTIONS varchar(20) ; +alter table TMSEXT_TERMINAL_EXT add column INSTALLMENT2_OPTIONS varchar(20) ; +alter table TMSEXT_TERMINAL_EXT add column INSTALLMENT3_OPTIONS varchar(20) ; +alter table TMSEXT_TERMINAL_EXT add column FEATURE_QRIS boolean ; diff --git a/modules/core/db/update/postgres/22/221120-2-updateTmsextAcquirer.sql b/modules/core/db/update/postgres/22/221120-2-updateTmsextAcquirer.sql new file mode 100644 index 0000000..96df520 --- /dev/null +++ b/modules/core/db/update/postgres/22/221120-2-updateTmsextAcquirer.sql @@ -0,0 +1,3 @@ +alter table TMSEXT_ACQUIRER add column CREDIT_SETTLEMENT boolean ; +alter table TMSEXT_ACQUIRER add column CHECK_CARD_EXP_DATE boolean ; +alter table TMSEXT_ACQUIRER add column DEBIT_SETTLEMENT boolean ; diff --git a/modules/core/db/update/postgres/22/221120-2-updateTmsextAcquirer01.sql b/modules/core/db/update/postgres/22/221120-2-updateTmsextAcquirer01.sql new file mode 100644 index 0000000..40d3a97 --- /dev/null +++ b/modules/core/db/update/postgres/22/221120-2-updateTmsextAcquirer01.sql @@ -0,0 +1,3 @@ +alter table TMSEXT_ACQUIRER rename column _terminal_id to _terminal_id_backup; +alter table TMSEXT_ACQUIRER drop constraint FK_TMSEXT_ACQUIRER_ON__TERMINAL ; +drop index IDX_TMSEXT_ACQUIRER_ON__TERMINAL ; diff --git a/modules/core/db/update/postgres/22/221120-2-updateTmsextAid.sql b/modules/core/db/update/postgres/22/221120-2-updateTmsextAid.sql new file mode 100644 index 0000000..05f28d0 --- /dev/null +++ b/modules/core/db/update/postgres/22/221120-2-updateTmsextAid.sql @@ -0,0 +1,2 @@ +alter table TMSEXT_AID add column DATA_TTQ varchar(8) ; +alter table TMSEXT_AID alter column AID set data type varchar(32) ; diff --git a/modules/core/db/update/postgres/22/221120-2-updateTmsextTerminalExt.sql b/modules/core/db/update/postgres/22/221120-2-updateTmsextTerminalExt.sql new file mode 100644 index 0000000..9883304 --- /dev/null +++ b/modules/core/db/update/postgres/22/221120-2-updateTmsextTerminalExt.sql @@ -0,0 +1,5 @@ +alter table TMSEXT_TERMINAL_EXT add column NEXT_LOGON integer ; +alter table TMSEXT_TERMINAL_EXT add column RANDOM_PIN_KEYPAD boolean ; +alter table TMSEXT_TERMINAL_EXT add column BEEP_PIN_KEYPAD boolean ; +alter table TMSEXT_TERMINAL_EXT add column FEATURE_CONTACTLESS boolean ; +alter table TMSEXT_TERMINAL_EXT add column AUTO_LOGON boolean ; diff --git a/modules/core/db/update/postgres/24/240224-2-updateTmsextTerminalExt.sql b/modules/core/db/update/postgres/24/240224-2-updateTmsextTerminalExt.sql new file mode 100644 index 0000000..891402c --- /dev/null +++ b/modules/core/db/update/postgres/24/240224-2-updateTmsextTerminalExt.sql @@ -0,0 +1,4 @@ +alter table TMSEXT_TERMINAL_EXT add column PUSH_LOGON integer ; +alter table TMSEXT_TERMINAL_EXT add column HOST_LOGGING boolean ; +alter table TMSEXT_TERMINAL_EXT add column HOST_REPORT boolean ; +alter table TMSEXT_TERMINAL_EXT add column SKIP_PASSWORD boolean ; diff --git a/modules/core/src/com/cmobile/unifiedtms/ext/app.properties b/modules/core/src/com/cmobile/unifiedtms/ext/app.properties new file mode 100644 index 0000000..14343dd --- /dev/null +++ b/modules/core/src/com/cmobile/unifiedtms/ext/app.properties @@ -0,0 +1,33 @@ +############################################################################### +# Configuration # +############################################################################### + +cuba.dbmsType = postgres + +cuba.springContextConfig = +/com/cmobile/unifiedtms/ext/spring.xml + +cuba.persistenceConfig = +/com/cmobile/unifiedtms/ext/persistence.xml + +cuba.metadataConfig = +/com/cmobile/unifiedtms/ext/metadata.xml + +cuba.viewsConfig = +/com/cmobile/unifiedtms/ext/views.xml + +cuba.mainMessagePack = +com.cmobile.unifiedtms.ext.core + +cuba.keyForSecurityTokenEncryption = MIoaxXojahy46buU + +cuba.anonymousSessionId = 6c3922a3-53bf-e557-aded-dfb4ec1f5d64 + +############################################################################### +# Other # +############################################################################### + +cuba.webContextName = tmsext-core +cuba.availableLocales = English|en +cuba.localeSelectVisible = false +cuba.restApiUrl = http://localhost:8080/tmsext-portal/api +cuba.webAppUrl = http://localhost:8080/tmsext +cuba.security.rolesPolicyVersion=1 +cuba.security.defaultPermissionValuesConfigEnabled=true +cuba.security.minimalRoleIsDefault=false +cuba.dataSourceProvider=jndi diff --git a/modules/core/src/com/cmobile/unifiedtms/ext/service/CardImporterServiceBean.java b/modules/core/src/com/cmobile/unifiedtms/ext/service/CardImporterServiceBean.java new file mode 100644 index 0000000..b6179eb --- /dev/null +++ b/modules/core/src/com/cmobile/unifiedtms/ext/service/CardImporterServiceBean.java @@ -0,0 +1,152 @@ +package com.cmobile.unifiedtms.ext.service; + +import com.cmobile.unifiedtms.ext.utils.XlsHelper; +import org.springframework.stereotype.Service; +import com.cmobile.unifiedtms.ext.entity.Card; +import com.haulmont.cuba.core.Persistence; +import com.haulmont.cuba.core.app.FileStorageAPI; +import com.haulmont.cuba.core.entity.FileDescriptor; +import com.haulmont.cuba.core.global.*; +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.Row; +import org.apache.poi.ss.usermodel.Sheet; +import org.apache.poi.ss.usermodel.Workbook; +import com.cmobile.unifiedtms.ext.exception.ImportFileEofEvaluationException; + +import java.util.Map; +import java.util.HashMap; + +import java.util.List; +import java.util.ArrayList; + +@Service(CardImporterService.NAME) +public class CardImporterServiceBean implements CardImporterService { + + protected static final char NON_BREAKING_SPACE = (char) 160; + private Sheet sheet = null; + private int sheetIndex = 0; + + protected FileDescriptor fileDescriptor; + protected Persistence persistence; + protected Metadata metadata; + protected TimeSource timeSource; + + protected int firstDataRowIndex = 0; + protected int dataRowIncrement = 1; + protected Map attributesToColumns; + protected int currentRowIndex; + + public static final String NAME = "name"; + public static final String RANGE_FROM = "binRangeStart"; + public static final String RANGE_TO = "binRangeEnd"; + public static final String CARD_NUM_LENGTH = "cardNumLength"; + public static final String PIN_LENGTH = "pinLength"; + public static final String PIN_PROMPT = "pinPrompt"; + public static final String PAN_DIGIT_UNMASKING = "panDigitUnmasking"; + public static final String PRINT_CARD_HOLDER_COPY = "printCardHolderCopy"; + public static final String PRINT_MERCHANT_COPY = "printMerchantCopy"; + public static final String PRINT_BANK_COPY = "printBankCopy"; + + public List parseCardsFromFile(FileDescriptor fd) throws Exception { + List list = new ArrayList(); + + { + FileStorageAPI fileStorageAPI = AppBeans.get(FileStorageAPI.NAME); + byte[] xlsFile = fileStorageAPI.loadFile(fd); + Workbook workbook = XlsHelper.openWorkbook(xlsFile); + + if (workbook == null) { + throw new FileStorageException(FileStorageException.Type.FILE_NOT_FOUND, "File was not loaded"); + } + + sheet = workbook.getSheetAt(sheetIndex); + persistence = AppBeans.get(Persistence.NAME); + metadata = AppBeans.get(Metadata.NAME); + timeSource = AppBeans.get(TimeSource.NAME); + + attributesToColumns = createAttributesToColumns(); + + // read the values + firstDataRowIndex = 1; + + try { + String lastName = null; + for (currentRowIndex = firstDataRowIndex; !eof(sheet.getRow(currentRowIndex)); currentRowIndex += dataRowIncrement) { + Row row = sheet.getRow(currentRowIndex); + + Card card = metadata.create(Card.class); + String name = (String) XlsHelper.getCellValue(row.getCell(attributesToColumns.get(NAME))); + if (name == null) { + name = lastName; + } + String rangeFrom = String.valueOf(XlsHelper.getCellValue(row.getCell(attributesToColumns.get(RANGE_FROM)))); + String rangeTo = String.valueOf(XlsHelper.getCellValue(row.getCell(attributesToColumns.get(RANGE_TO)))); + Integer cardNumLength = (Integer) (XlsHelper.getCellValue(row.getCell(attributesToColumns.get(CARD_NUM_LENGTH)))); + Integer pinLength = (Integer) (XlsHelper.getCellValue(row.getCell(attributesToColumns.get(PIN_LENGTH)))); + Boolean pinPrompt = "yes".equals((String) XlsHelper.getCellValue(row.getCell(attributesToColumns.get(PIN_PROMPT)))); + String panDigitUnmasking = String.valueOf(XlsHelper.getCellValue(row.getCell(attributesToColumns.get(PAN_DIGIT_UNMASKING)))); + Boolean printCardHolderCopy = "yes".equalsIgnoreCase((String) XlsHelper.getCellValue(row.getCell(attributesToColumns.get(PRINT_CARD_HOLDER_COPY)))); + Boolean printMerchantCopy = "yes".equalsIgnoreCase((String) XlsHelper.getCellValue(row.getCell(attributesToColumns.get(PRINT_MERCHANT_COPY)))); + Boolean printBankCopy = "yes".equalsIgnoreCase((String) XlsHelper.getCellValue(row.getCell(attributesToColumns.get(PRINT_BANK_COPY)))); + + card.setName(name); + card.setBinRangeStart(rangeFrom); + card.setBinRangeEnd(rangeTo); + card.setCardNumLength(cardNumLength); + card.setPinLength(pinLength); + card.setPinPrompt(pinPrompt); + card.setPanDigitUnmasking(panDigitUnmasking); + card.setPrintCardholderCopy(printCardHolderCopy); + card.setPrintMerchantCopy(printMerchantCopy); + card.setPrintBankCopy(printBankCopy); + + System.out.println(">> Card [name: " + name + ", rangeStart: " + rangeFrom + ", rangeEnd: " + rangeTo + "]"); + lastName = name; + + list.add(card); + } + } catch (ImportFileEofEvaluationException e) { + throw new RuntimeException(e); + } + } + + return list; + } + + private Boolean eofByColumnNullValue(Row row, String columnAlias) throws ImportFileEofEvaluationException { + Integer columnNumber = attributesToColumns.get(columnAlias); + if (row != null) { + Cell cell = row.getCell(columnNumber); + Object cellValue; + try { + cellValue = XlsHelper.getCellValue(cell); + } catch (Exception e) { + throw new ImportFileEofEvaluationException(String.format("Eof evaluation has failed on row %s", row.getRowNum())); + } + return cellValue == null; + } + return true; + } + + private Map createAttributesToColumns() { + Map columns = new HashMap<>(); + + columns.put(NAME, 0); + columns.put(RANGE_FROM, 1); + columns.put(RANGE_TO, 2); + columns.put(CARD_NUM_LENGTH, 3); + columns.put(PIN_LENGTH, 4); + columns.put(PIN_PROMPT, 5); + columns.put(PAN_DIGIT_UNMASKING, 6); + columns.put(PRINT_CARD_HOLDER_COPY, 7); + columns.put(PRINT_MERCHANT_COPY, 8); + columns.put(PRINT_BANK_COPY, 9); + + return columns; + } + + protected boolean eof(Row row) throws ImportFileEofEvaluationException { + return eofByColumnNullValue(row, NAME); + } + +} diff --git a/modules/core/src/com/cmobile/unifiedtms/ext/service/ExportServiceBean.java b/modules/core/src/com/cmobile/unifiedtms/ext/service/ExportServiceBean.java new file mode 100644 index 0000000..7fbda97 --- /dev/null +++ b/modules/core/src/com/cmobile/unifiedtms/ext/service/ExportServiceBean.java @@ -0,0 +1,154 @@ +package com.cmobile.unifiedtms.ext.service; + +import com.cmobile.unifiedtms.ext.entity.ExportReportBean; +import com.haulmont.chile.core.datatypes.FormatStrings; +import com.haulmont.chile.core.datatypes.FormatStringsRegistry; +import com.haulmont.chile.core.model.MetaClass; +import com.haulmont.chile.core.model.MetaProperty; +import com.haulmont.cuba.core.EntityManager; +import com.haulmont.cuba.core.Persistence; +import com.haulmont.cuba.core.Transaction; +import com.haulmont.cuba.core.entity.Entity; +import com.haulmont.cuba.core.global.Messages; +import com.haulmont.cuba.core.global.Metadata; +import com.haulmont.cuba.core.global.UserSessionSource; +import org.apache.poi.xssf.usermodel.*; +import org.springframework.stereotype.Service; + +import javax.inject.Inject; +import java.io.ByteArrayOutputStream; +import java.io.FileOutputStream; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Date; +import java.util.List; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.stream.Stream; + +@Service(ExportService.NAME) +public class ExportServiceBean implements ExportService { + + @Inject + private Persistence persistence; + @Inject + private Metadata metadata; + @Inject + private Messages messages; + @Inject + private FormatStringsRegistry formatStringsRegistry; + @Inject + private UserSessionSource userSessionSource; + + @Override + public ExportReportBean exportEntities(Class entityClass) { + ExportReportBean export = new ExportReportBean(); + + MetaClass metaClass = metadata.getClassNN(entityClass); + String entityName = metaClass.getJavaClass().getSimpleName(); + export.setFilename(entityName+".xlsx"); + + FormatStrings formatStrings = formatStringsRegistry.getFormatStrings(userSessionSource.getLocale()); + String dateFormatPattern = formatStrings.getDateFormat(); + String dateTimeFormatPattern = formatStrings.getDateTimeFormat(); + SimpleDateFormat df = new SimpleDateFormat(dateFormatPattern); + SimpleDateFormat dtf = new SimpleDateFormat(dateTimeFormatPattern); + try (Transaction tx = persistence.createTransaction()) { + EntityManager em = persistence.getEntityManager(); + + Stream entities = em.createQuery( + "select e from " + metaClass.getName() + " e", entityClass) + .getDelegate().getResultStream(); + + // Create Excel file + FileOutputStream fos; + XSSFWorkbook workbook = new XSSFWorkbook(); + XSSFSheet sheet = workbook.createSheet(entityName + " List"); + + // 🔥 Create bold font + XSSFFont headerFont = workbook.createFont(); + headerFont.setBold(true); + + // 🔥 Create CellStyle with bold font + XSSFCellStyle headerStyle = workbook.createCellStyle(); + headerStyle.setFont(headerFont); + + // Create header row + XSSFRow headerRow = sheet.createRow(0); + + List reservedProps = new ArrayList<>(); + List props = new ArrayList<>(); + Collection properties = metaClass.getProperties(); + for (MetaProperty prop : properties) { + if ("id".equals(prop.getName())) continue; + if ("version".equals(prop.getName())) continue; + if ("deleteTs".equals(prop.getName())) continue; + if ("deletedBy".equals(prop.getName())) continue; + if ("createTs".equals(prop.getName())) { + reservedProps.add(prop); + continue; + } + if ("createdBy".equals(prop.getName())) { + reservedProps.add(prop); + continue; + } + if ("updateTs".equals(prop.getName())) { + reservedProps.add(prop); + continue; + } + if ("updatedBy".equals(prop.getName())) { + reservedProps.add(prop); + continue; + } + props.add(prop); + } + // sort meta properties + props.sort((o1, o2) -> { + return o1.getName().compareTo(o2.getName()); + }); + reservedProps.sort((o1, o2) -> { + return o1.getName().compareTo(o2.getName()); + }); + // append reserved props at the end + props.addAll(reservedProps); + + int _colIdx = 0; + for (MetaProperty prop : props) { + String key = String.format("%s.%s", entityName, prop.getName()); + XSSFCell cell = headerRow.createCell(_colIdx++); + cell.setCellValue(messages.getMessage(entityClass, key)); + cell.setCellStyle(headerStyle); // 🔥 Apply bold style + } + + // Fill rows + AtomicInteger rowIdx = new AtomicInteger(1); + entities.forEach(entity -> { + XSSFRow row = sheet.createRow(rowIdx.getAndIncrement()); + int colIdx = 0; + for (MetaProperty prop : props) { + Object value = entity.getValue(prop.getName()); + if(value != null) { + if (value instanceof Date) { + row.createCell(colIdx).setCellValue(dtf.format((Date) value)); + } else { + row.createCell(colIdx).setCellValue(value.toString()); + } + } + colIdx++; + } + }); + + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + workbook.write(baos); + baos.close(); + workbook.close(); + + tx.commit(); + + export.setFileContent(baos.toByteArray()); + return export; + } catch (Exception e) { + throw new RuntimeException("Failed to export", e); + } + } +} \ No newline at end of file diff --git a/modules/core/src/com/cmobile/unifiedtms/ext/spring.xml b/modules/core/src/com/cmobile/unifiedtms/ext/spring.xml new file mode 100644 index 0000000..0884abc --- /dev/null +++ b/modules/core/src/com/cmobile/unifiedtms/ext/spring.xml @@ -0,0 +1,8 @@ + + + + + + + diff --git a/modules/core/src/com/cmobile/unifiedtms/ext/utils/XlsHelper.java b/modules/core/src/com/cmobile/unifiedtms/ext/utils/XlsHelper.java new file mode 100644 index 0000000..1850325 --- /dev/null +++ b/modules/core/src/com/cmobile/unifiedtms/ext/utils/XlsHelper.java @@ -0,0 +1,179 @@ +/* + * TODO Copyright + */ + +package com.cmobile.unifiedtms.ext.utils; + +import com.haulmont.cuba.core.global.AppBeans; +import com.haulmont.cuba.core.global.Resources; +import org.apache.commons.io.FilenameUtils; +import org.apache.poi.hssf.usermodel.HSSFDateUtil; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.poi.poifs.filesystem.OfficeXmlFileException; +import org.apache.poi.poifs.filesystem.POIFSFileSystem; +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.CellType; +import org.apache.poi.ss.usermodel.Workbook; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; + +import javax.annotation.Nullable; +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.Map; + +/** + * Created by aleksey on 18/10/2016. + * + * Class helping to work with .xls and .xlsx files + * + */ +public class XlsHelper { + protected static final char NON_BREAKING_SPACE = (char) 160; + protected static Resources resources = AppBeans.get(Resources.NAME); + + /** + * Method returns workbook for .xls and .xlsx files + */ + @Nullable + public static Workbook openWorkbook(@Nullable String path) throws IOException { + Workbook workbook = null; + InputStream is = resources.getResourceAsStream(path); + String extension = FilenameUtils.getExtension(path); + if (is != null) { + if ("xls".equals(extension)) { + workbook = new HSSFWorkbook(is); + } else if ("xlsx".equals(extension)) { + workbook = new XSSFWorkbook(is); + } + is.close(); + } + return workbook; + } + + public static Workbook openWorkbook(byte[] bytes) throws IOException { + Workbook workbook; + try { + InputStream is = new ByteArrayInputStream(bytes); + workbook = new HSSFWorkbook(new POIFSFileSystem(is)); + is.close(); + } catch (OfficeXmlFileException exc) { + InputStream is = new ByteArrayInputStream(bytes); + workbook = new XSSFWorkbook(is); + is.close(); + } + return workbook; + } + + @Nullable + public static Object getCellValue(Cell cell) throws Exception { + if (cell == null) { + return null; + } + + switch (cell.getCellType()) { + case BLANK: + return null; + case STRING: + String formattedCellValue = cell.getStringCellValue().replace(String.valueOf(NON_BREAKING_SPACE), " ").trim(); + return formattedCellValue.isEmpty() ? null : formattedCellValue; + case NUMERIC: + if (isDateCell(cell)) { + return cell.getDateCellValue(); + } + + Double numericCellValue = cell.getNumericCellValue(); + if (!isAlmostInt(numericCellValue)) + return numericCellValue; + else { + if (numericCellValue > Integer.MAX_VALUE) { + Long value = numericCellValue.longValue(); + return value; + } else { + Integer value = numericCellValue.intValue(); + return value; + } + } + case FORMULA: + return getFormulaCellValue(cell); + default: + throw new IllegalStateException(String.format("Cell type '%s' is not supported", cell.getCellType())); + } + } + + protected static boolean isDateCell(Cell cell) { + return HSSFDateUtil.isCellDateFormatted(cell); + } + + protected static boolean isAlmostInt(Double numericCellValue) { + return Math.abs(numericCellValue - numericCellValue.longValue()) < 1e-10; + } + + protected static Object getFormulaCellValue(Cell cell) { + String formattedCellValue; + try { + formattedCellValue = cell.getStringCellValue().replace(String.valueOf(NON_BREAKING_SPACE), " ").trim(); + } catch (IllegalStateException e) { + return "Formula error"; + } + switch (cell.getCachedFormulaResultType()) { + case NUMERIC: + return cell.getNumericCellValue(); + case STRING: + if (formattedCellValue.isEmpty()) + return null; + return formattedCellValue; + default: + throw new IllegalStateException(String.format("Formula cell type '%s' is not supported", cell.getCachedFormulaResultType())); + } + } + + @Nullable + public static Object getCellValue(Cell cell, Boolean forceToString) throws Exception { + if (cell == null || cell.getCellType() == CellType.BLANK) { + return null; + } + + cell.setCellType(CellType.STRING); + return cell.getStringCellValue().replace(String.valueOf(NON_BREAKING_SPACE), " ").trim(); + } + + @Nullable + public static T getParameterValue(Map values, String parameter) { + if (values.get(parameter) == null) { + return null; + } + + return (T) values.get(parameter); + } + + @Nullable + public static Double getParameterDoubleValue(Map values, String parameter) { + if (values.get(parameter) == null) { + return null; + } + + return Double.valueOf(values.get(parameter).toString()); + } + + @Nullable + public static Integer getParameterIntegerValue(Map values, String parameter) { + Object value = values.get(parameter); + if (value == null) { + return null; + } + if (value instanceof Number) + return ((Number) value).intValue(); + return Integer.valueOf(value.toString()); + } + + @Nullable + public static String getParameterStringValue(Map values, String parameter) { + if (values.get(parameter) == null) { + return null; + } + + return values.get(parameter).toString().trim(); + } + +} diff --git a/modules/core/test/com/cmobile/unifiedtms/ext/TmsTestContainer.java b/modules/core/test/com/cmobile/unifiedtms/ext/TmsTestContainer.java new file mode 100644 index 0000000..42a66b8 --- /dev/null +++ b/modules/core/test/com/cmobile/unifiedtms/ext/TmsTestContainer.java @@ -0,0 +1,78 @@ +package com.cmobile.unifiedtms.ext; + +import com.haulmont.bali.util.Dom4j; +import com.haulmont.cuba.testsupport.TestContainer; +import org.dom4j.Document; +import org.dom4j.Element; + +import java.io.File; +import java.util.ArrayList; +import java.util.Arrays; + +public class TmsTestContainer extends TestContainer { + + public TmsTestContainer() { + super(); + appComponents = new ArrayList<>(Arrays.asList( + "com.haulmont.cuba" + // add CUBA premium add-ons here + // "com.haulmont.bpm", + // "com.haulmont.charts", + // "com.haulmont.fts", + // "com.haulmont.reports", + // and custom app components if any + )); + appPropertiesFiles = Arrays.asList( + // List the files defined in your web.xml + // in appPropertiesConfig context parameter of the core module + "com/cmobile/unifiedtms/ext/app.properties", + // Add this file which is located in CUBA and defines some properties + // specifically for test environment. You can replace it with your own + // or add another one in the end. + "test-app.properties"); + initDbProperties(); + } + + private void initDbProperties() { + File contextXmlFile = new File("modules/core/web/META-INF/context.xml"); + if (!contextXmlFile.exists()) { + contextXmlFile = new File("web/META-INF/context.xml"); + } + if (!contextXmlFile.exists()) { + throw new RuntimeException("Cannot find 'context.xml' file to read database connection properties. " + + "You can set them explicitly in this method."); + } + Document contextXmlDoc = Dom4j.readDocument(contextXmlFile); + Element resourceElem = contextXmlDoc.getRootElement().element("Resource"); + + dbDriver = resourceElem.attributeValue("driverClassName"); + dbUrl = resourceElem.attributeValue("url"); + dbUser = resourceElem.attributeValue("username"); + dbPassword = resourceElem.attributeValue("password"); + } + + public static class Common extends TmsTestContainer { + + public static final TmsTestContainer.Common INSTANCE = new TmsTestContainer.Common(); + + private static volatile boolean initialized; + + private Common() { + } + + @Override + public void before() throws Throwable { + if (!initialized) { + super.before(); + initialized = true; + } + setupContext(); + } + + @Override + public void after() { + cleanupContext(); + // never stops - do not call super + } + } +} \ No newline at end of file diff --git a/modules/core/test/com/cmobile/unifiedtms/ext/core/SampleIntegrationTest.java b/modules/core/test/com/cmobile/unifiedtms/ext/core/SampleIntegrationTest.java new file mode 100644 index 0000000..b26db0d --- /dev/null +++ b/modules/core/test/com/cmobile/unifiedtms/ext/core/SampleIntegrationTest.java @@ -0,0 +1,53 @@ +package com.cmobile.unifiedtms.ext.core; + +import com.cmobile.unifiedtms.ext.TmsTestContainer; +import com.haulmont.cuba.core.EntityManager; +import com.haulmont.cuba.core.Persistence; +import com.haulmont.cuba.core.Transaction; +import com.haulmont.cuba.core.TypedQuery; +import com.haulmont.cuba.core.global.AppBeans; +import com.haulmont.cuba.core.global.DataManager; +import com.haulmont.cuba.core.global.Metadata; +import com.haulmont.cuba.security.entity.User; +import org.junit.After; +import org.junit.Before; +import org.junit.ClassRule; +import org.junit.Test; + +import java.util.List; + +import static org.junit.Assert.assertEquals; + +public class SampleIntegrationTest { + + @ClassRule + public static TmsTestContainer cont = TmsTestContainer.Common.INSTANCE; + + private Metadata metadata; + private Persistence persistence; + private DataManager dataManager; + + @Before + public void setUp() throws Exception { + metadata = cont.metadata(); + persistence = cont.persistence(); + dataManager = AppBeans.get(DataManager.class); + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testLoadUser() { + try (Transaction tx = persistence.createTransaction()) { + EntityManager em = persistence.getEntityManager(); + TypedQuery query = em.createQuery( + "select u from sec$User u where u.login = :userLogin", User.class); + query.setParameter("userLogin", "admin"); + List users = query.getResultList(); + tx.commit(); + assertEquals(1, users.size()); + } + } +} \ No newline at end of file diff --git a/modules/core/web/META-INF/context.xml b/modules/core/web/META-INF/context.xml new file mode 100644 index 0000000..1eb20fb --- /dev/null +++ b/modules/core/web/META-INF/context.xml @@ -0,0 +1,14 @@ + + + + + + diff --git a/modules/core/web/WEB-INF/web.xml b/modules/core/web/WEB-INF/web.xml new file mode 100644 index 0000000..81ae86c --- /dev/null +++ b/modules/core/web/WEB-INF/web.xml @@ -0,0 +1,30 @@ + + + + + appPropertiesConfig + classpath:com/cmobile/unifiedtms/ext/app.properties + /WEB-INF/local.app.properties + "file:${app.home}/local.app.properties" + + + + appComponents + com.haulmont.cuba + + + com.haulmont.cuba.core.sys.AppContextLoader + + + remoting + com.haulmont.cuba.core.sys.remoting.RemotingServlet + 1 + + + remoting + /remoting/* + + diff --git a/modules/global/.classpath b/modules/global/.classpath new file mode 100644 index 0000000..97c3b58 --- /dev/null +++ b/modules/global/.classpath @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/global/.project b/modules/global/.project new file mode 100644 index 0000000..c616641 --- /dev/null +++ b/modules/global/.project @@ -0,0 +1,18 @@ + + + tms-global + + + + org.eclipse.jdt.core.javanature + org.eclipse.jdt.groovy.core.groovyNature + + + + org.eclipse.jdt.core.javabuilder + + + + + + diff --git a/modules/global/.settings/org.eclipse.jdt.core.prefs b/modules/global/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..6f18724 --- /dev/null +++ b/modules/global/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,13 @@ +# +#Tue Feb 26 15:48:52 ICT 2019 +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error diff --git a/modules/global/private/cache/retriever/192.168.8.1/html/index.html.url_java.sun.com b/modules/global/private/cache/retriever/192.168.8.1/html/index.html.url_java.sun.com new file mode 100644 index 0000000..47c79ff --- /dev/null +++ b/modules/global/private/cache/retriever/192.168.8.1/html/index.html.url_java.sun.com @@ -0,0 +1,516 @@ + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + diff --git a/modules/global/private/cache/retriever/catalog.xml b/modules/global/private/cache/retriever/catalog.xml new file mode 100644 index 0000000..82af8aa --- /dev/null +++ b/modules/global/private/cache/retriever/catalog.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/modules/global/src/com/cmobile/unifiedtms/ext/app-component.xml b/modules/global/src/com/cmobile/unifiedtms/ext/app-component.xml new file mode 100644 index 0000000..9a99549 --- /dev/null +++ b/modules/global/src/com/cmobile/unifiedtms/ext/app-component.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/modules/global/src/com/cmobile/unifiedtms/ext/config/TerminalExtConfig.java b/modules/global/src/com/cmobile/unifiedtms/ext/config/TerminalExtConfig.java new file mode 100644 index 0000000..20c4e47 --- /dev/null +++ b/modules/global/src/com/cmobile/unifiedtms/ext/config/TerminalExtConfig.java @@ -0,0 +1,16 @@ +package com.cmobile.unifiedtms.ext.config; + +import com.haulmont.cuba.core.config.Config; +import com.haulmont.cuba.core.config.Property; +import com.haulmont.cuba.core.config.Source; +import com.haulmont.cuba.core.config.SourceType; +import com.haulmont.cuba.core.config.defaults.Default; + +@Source(type = SourceType.DATABASE) +public interface TerminalExtConfig extends Config { + + @Property("terminal-ext.inquiry.bripoin.nii") + @Default("042") + String getDefaultInquiryBRIPoinNII(); + +} \ No newline at end of file diff --git a/modules/global/src/com/cmobile/unifiedtms/ext/entity/Acquirer.java b/modules/global/src/com/cmobile/unifiedtms/ext/entity/Acquirer.java new file mode 100644 index 0000000..5d3d9e2 --- /dev/null +++ b/modules/global/src/com/cmobile/unifiedtms/ext/entity/Acquirer.java @@ -0,0 +1,302 @@ +package com.cmobile.unifiedtms.ext.entity; + +import com.haulmont.chile.core.annotations.MetaProperty; +import com.haulmont.chile.core.annotations.NamePattern; +import com.haulmont.cuba.core.entity.StandardEntity; +import com.haulmont.cuba.core.entity.annotation.Lookup; +import com.haulmont.cuba.core.entity.annotation.LookupType; +import com.haulmont.cuba.core.entity.annotation.OnDelete; +import com.haulmont.cuba.core.entity.annotation.OnDeleteInverse; +import com.haulmont.cuba.core.global.DeletePolicy; + +import javax.persistence.*; +import java.util.ArrayList; +import java.util.List; + +@NamePattern("%s - %s|acquirerId,acquirerType") +@Table(name = "TMSEXT_ACQUIRER") +@Entity(name = "tms$Acquirer") +public class Acquirer extends StandardEntity { + private static final long serialVersionUID = -4953983810428717839L; + + @Column(name = "NAME", nullable = false, length = 30) + protected String name; + + @OnDeleteInverse(DeletePolicy.CASCADE) + @OnDelete(DeletePolicy.CASCADE) + @OneToMany(mappedBy = "acquirer", cascade = CascadeType.PERSIST) + protected List issuers; + + @Column(name = "HOST_ID", length = 3) + protected String hostID; + + @Column(name = "SETTLEMENT_HOST_ID", length = 3) + protected String settlementHostID; + + @Column(name = "NUMBER_OF_PRINT") + protected Integer numberOfPrint; + + @Column(name = "RESP_TIMEOUT") + protected Integer respTimeout; + + @Column(name = "ACQUIRER_ID", length = 2) + protected String acquirerId; + + @Column(name = "HOST_DESTINATION_ADDR", length = 100) + protected String hostDestinationAddr; + + @Column(name = "HOST_DESTINATION_PORT", length = 6) + protected String hostDestinationPort; + + @Column(name = "SHOW_PRINT_EXP_DATE") + protected Boolean showPrintExpDate; + + @Column(name = "CHECK_CARD_EXP_DATE") + protected Boolean checkCardExpDate; + + @Column(name = "TLE_ACQUIRER") + protected Boolean tleAcquirer; + + @Lookup(type = LookupType.DROPDOWN, actions = {}) + @OnDeleteInverse(DeletePolicy.CASCADE) + @OnDelete(DeletePolicy.UNLINK) + @ManyToOne(fetch = FetchType.LAZY) + @JoinColumn(name = "TLE_SETTING_ID") + protected TLESetting tleSetting; + + @Column(name = "MASTER_KEY_LOCATION", length = 4, nullable = true) + protected String masterKeyLocation; + + @Lob + @Column(name = "MASTER_KEY") + protected String masterKey; + + @Lob + @Column(name = "WORKING_KEY") + protected String workingKey; + + @Column(name = "ACQUIRER_TYPE", nullable = false) + protected String acquirerType; + + @Column(name = "BATCH_NUMBER", length = 6) + protected String batchNumber; + + @Transient + @MetaProperty + protected String merchantID; + + @Transient + @MetaProperty + protected String terminalID; + + @Column(name = "CREDIT_SETTLEMENT") + protected Boolean creditSettlement; + + @Column(name = "DEBIT_SETTLEMENT") + protected Boolean debitSettlement; + + @Column(name = "DESCRIPTION") + protected String description; + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public Boolean getDebitSettlement() { + return debitSettlement; + } + + public void setDebitSettlement(Boolean debitSettlement) { + this.debitSettlement = debitSettlement; + } + + public Boolean getCreditSettlement() { + return creditSettlement; + } + + public void setCreditSettlement(Boolean creditSettlement) { + this.creditSettlement = creditSettlement; + } + + public Boolean getCheckCardExpDate() { + return checkCardExpDate; + } + + public void setCheckCardExpDate(Boolean checkCardExpDate) { + this.checkCardExpDate = checkCardExpDate; + } + + public String getSettlementHostID() { + return settlementHostID; + } + + public void setSettlementHostID(String settlementHostID) { + this.settlementHostID = settlementHostID; + } + + public void setMerchantID(String merchantID) { + this.merchantID = merchantID; + } + + public String getMerchantID() { + return merchantID; + } + + public void setTerminalID(String terminalID) { + this.terminalID = terminalID; + } + + public String getTerminalID() { + return terminalID; + } + + + public void setBatchNumber(String batchNumber) { + this.batchNumber = batchNumber; + } + + public String getBatchNumber() { + return batchNumber; + } + + + public void setIssuers(List issuers) { + this.issuers = issuers; + } + + public List getIssuers() { + if(issuers == null) { + issuers = new ArrayList<>(); + } + return issuers; + } + + + public void setNumberOfPrint(Integer numberOfPrint) { + this.numberOfPrint = numberOfPrint; + } + + public Integer getNumberOfPrint() { + return numberOfPrint; + } + + public void setRespTimeout(Integer respTimeout) { + this.respTimeout = respTimeout; + } + + public Integer getRespTimeout() { + return respTimeout; + } + + public void setAcquirerId(String acquirerId) { + this.acquirerId = acquirerId; + } + + public String getAcquirerId() { + return acquirerId; + } + + public void setHostDestinationAddr(String hostDestinationAddr) { + this.hostDestinationAddr = hostDestinationAddr; + } + + public String getHostDestinationAddr() { + return hostDestinationAddr; + } + + public void setHostDestinationPort(String hostDestinationPort) { + this.hostDestinationPort = hostDestinationPort; + } + + public String getHostDestinationPort() { + return hostDestinationPort; + } + + public void setShowPrintExpDate(Boolean showPrintExpDate) { + this.showPrintExpDate = showPrintExpDate; + } + + public Boolean getShowPrintExpDate() { + return showPrintExpDate; + } + + public void setTleAcquirer(Boolean tleAcquirer) { + this.tleAcquirer = tleAcquirer; + } + + public Boolean getTleAcquirer() { + return tleAcquirer; + } + + public void setTleSetting(TLESetting tleSetting) { + this.tleSetting = tleSetting; + } + + public TLESetting getTleSetting() { + return tleSetting; + } + + public void setMasterKeyLocation(String masterKeyLocation) { + this.masterKeyLocation = masterKeyLocation; + } + + public String getMasterKeyLocation() { + return masterKeyLocation; + } + + public void setMasterKey(String masterKey) { + this.masterKey = masterKey; + } + + public String getMasterKey() { + return masterKey; + } + + public void setWorkingKey(String workingKey) { + this.workingKey = workingKey; + } + + public String getWorkingKey() { + return workingKey; + } + + + + public void setName(String name) { + this.name = name; + } + + public String getName() { + return name; + } + + + + + public void setHostID(String hostID) { + this.hostID = hostID; + } + + public String getHostID() { + return hostID; + } + + + public void setAcquirerType(AcquirerType acquirerType) { + this.acquirerType = acquirerType == null ? null : acquirerType.getId(); + } + + public AcquirerType getAcquirerType() { + return acquirerType == null ? null : AcquirerType.fromId(acquirerType); + } + + @Override + public String toString() { + return "Acquirer{" + "id=" + id + ", name=" + name + ", hostID=" + hostID + ", numberOfPrint=" + numberOfPrint + ", respTimeout=" + respTimeout + ", acquirerId=" + acquirerId + ", hostDestinationAddr=" + hostDestinationAddr + ", hostDestinationPort=" + hostDestinationPort + ", showPrintExpDate=" + showPrintExpDate + ", tleAcquirer=" + tleAcquirer + ", tleSetting=" + tleSetting + ", masterKeyLocation=" + masterKeyLocation + ", masterKey=" + masterKey + ", workingKey=" + workingKey + ", acquirerType=" + acquirerType + ", batchNumber=" + batchNumber + '}'; + } + +} \ No newline at end of file diff --git a/modules/global/src/com/cmobile/unifiedtms/ext/entity/AcquirerType.java b/modules/global/src/com/cmobile/unifiedtms/ext/entity/AcquirerType.java new file mode 100644 index 0000000..2fb93eb --- /dev/null +++ b/modules/global/src/com/cmobile/unifiedtms/ext/entity/AcquirerType.java @@ -0,0 +1,35 @@ +package com.cmobile.unifiedtms.ext.entity; + +import com.haulmont.chile.core.datatypes.impl.EnumClass; + +import javax.annotation.Nullable; + + +public enum AcquirerType implements EnumClass { + + CREDIT("CREDIT"), + DEBIT("DEBIT"), + PREPAID("PREPAID"), + MINI_ATM("MINI_ATM"), + NFC_PAYMENT("NFC_PAYMENT"); + + private String id; + + AcquirerType(String value) { + this.id = value; + } + + public String getId() { + return id; + } + + @Nullable + public static AcquirerType fromId(String id) { + for (AcquirerType at : AcquirerType.values()) { + if (at.getId().equals(id)) { + return at; + } + } + return null; + } +} \ No newline at end of file diff --git a/modules/global/src/com/cmobile/unifiedtms/ext/entity/Aid.java b/modules/global/src/com/cmobile/unifiedtms/ext/entity/Aid.java new file mode 100644 index 0000000..bef5566 --- /dev/null +++ b/modules/global/src/com/cmobile/unifiedtms/ext/entity/Aid.java @@ -0,0 +1,410 @@ +package com.cmobile.unifiedtms.ext.entity; + +import com.haulmont.chile.core.annotations.NamePattern; +import com.haulmont.cuba.core.entity.*; + +import javax.persistence.Entity; +import javax.persistence.*; +import javax.validation.constraints.NotNull; +import java.util.Date; + +@NamePattern("%s|name") +@Table(name = "TMSEXT_AID") +@Entity(name = "tms$Aid") +public class Aid extends BaseUuidEntity implements Versioned, Updatable, Creatable, SoftDelete { + private static final long serialVersionUID = -6154954716218259860L; + + @Column(name = "NAME", nullable = false) + protected String name; + + @Column(name = "TXN_TYPE", nullable = false, length = 8) + protected String txnType; + + @Column(name = "AID", nullable = false, length = 32) + protected String aid; + + @Column(name = "AID_VERSION", nullable = false, length = 4) + protected String aidVersion; + + @Column(name = "TAC_DEFAULT", nullable = false, length = 10) + protected String tacDefault; + + @Column(name = "TAC_DENIAL", nullable = false, length = 10) + protected String tacDenial; + + @Column(name = "TAC_ONLINE", nullable = false, length = 10) + protected String tacOnline; + + @Column(name = "THRESHOLD", nullable = false, length = 12) + protected String threshold; + + @Column(name = "TARGET_PERCENTAGE", nullable = false, length = 4) + protected String targetPercentage; + + @Column(name = "MAX_TARGET_PERCENTAGE", nullable = false, length = 4) + protected String maxTargetPercentage; + + @Lob + @Column(name = "DDOL", nullable = false) + protected String ddol; + + @Lob + @Column(name = "TDOL", nullable = false) + protected String tdol; + + @Column(name = "FLOOR_LIMIT", nullable = false, length = 8) + protected String floorLimit; + + @Column(name = "APP_SELECT", nullable = false, length = 2) + protected String appSelect; + + @Column(name = "AID_PRIORITY", nullable = false, length = 2) + protected String aidPriority; + + @NotNull + @Column(name = "TRX_TYPE9C", nullable = false, length = 2) + protected String trxType9C; + + @Column(name = "CATEGORY_CODE", nullable = false, length = 2) + protected String categoryCode; + + @Column(name = "CL_KERNEL_TO_USE", length = 4) + protected String clKernelToUse; + + @Column(name = "CL_OPTIONS", length = 8) + protected String clOptions; + + @Column(name = "CL_TRX_LIMIT", length = 12) + protected String clTrxLimit; + + @Column(name = "CL_CVM_LIMIT", length = 12) + protected String clCvmLimit; + + @Column(name = "CL_FLOOR_LIMIT", length = 12) + protected String clFloorLimit; + + @Column(name = "REMARK", length = 100) + protected String remark; + + @Column(name = "EMV_CONF_TERM_CAPABILITY", length = 100) + protected String emvConfTermCapability; + + @Column(name = "ADDITIONAL_TERM_CAPABILITY", length = 100) + protected String additionalTermCapability; + + @Column(name = "DATA_TTQ", length = 8) + protected String dataTtq; + + @Version + @Column(name = "VERSION", nullable = false) + protected Integer version; + + @Column(name = "UPDATE_TS") + protected Date updateTs; + + @Column(name = "UPDATED_BY", length = 50) + protected String updatedBy; + + @Column(name = "CREATE_TS") + protected Date createTs; + + @Column(name = "CREATED_BY", length = 50) + protected String createdBy; + + @Column(name = "DELETE_TS") + protected Date deleteTs; + + @Column(name = "DELETED_BY", length = 50) + protected String deletedBy; + + public String getAdditionalTermCapability() { + return additionalTermCapability; + } + + public void setAdditionalTermCapability(String additionalTermCapability) { + this.additionalTermCapability = additionalTermCapability; + } + + public String getEmvConfTermCapability() { + return emvConfTermCapability; + } + + public void setEmvConfTermCapability(String emvConfTermCapability) { + this.emvConfTermCapability = emvConfTermCapability; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getRemark() { + return remark; + } + + + @Override + public Boolean isDeleted() { + return deleteTs != null; + } + + @Override + public void setDeletedBy(String deletedBy) { + this.deletedBy = deletedBy; + } + + @Override + public String getDeletedBy() { + return deletedBy; + } + + @Override + public void setDeleteTs(Date deleteTs) { + this.deleteTs = deleteTs; + } + + @Override + public Date getDeleteTs() { + return deleteTs; + } + + + public void setTxnType(String txnType) { + this.txnType = txnType; + } + + public String getTxnType() { + return txnType; + } + + public void setAid(String aid) { + this.aid = aid; + } + + public String getAid() { + return aid; + } + + public void setAidVersion(String aidVersion) { + this.aidVersion = aidVersion; + } + + public String getAidVersion() { + return aidVersion; + } + + public void setTacDefault(String tacDefault) { + this.tacDefault = tacDefault; + } + + public String getTacDefault() { + return tacDefault; + } + + public void setTacDenial(String tacDenial) { + this.tacDenial = tacDenial; + } + + public String getTacDenial() { + return tacDenial; + } + + public void setTacOnline(String tacOnline) { + this.tacOnline = tacOnline; + } + + public String getTacOnline() { + return tacOnline; + } + + public void setThreshold(String threshold) { + this.threshold = threshold; + } + + public String getThreshold() { + return threshold; + } + + public void setTargetPercentage(String targetPercentage) { + this.targetPercentage = targetPercentage; + } + + public String getTargetPercentage() { + return targetPercentage; + } + + public void setMaxTargetPercentage(String maxTargetPercentage) { + this.maxTargetPercentage = maxTargetPercentage; + } + + public String getMaxTargetPercentage() { + return maxTargetPercentage; + } + + public void setDdol(String ddol) { + this.ddol = ddol; + } + + public String getDdol() { + return ddol; + } + + public void setTdol(String tdol) { + this.tdol = tdol; + } + + public String getTdol() { + return tdol; + } + + public void setFloorLimit(String floorLimit) { + this.floorLimit = floorLimit; + } + + public String getFloorLimit() { + return floorLimit; + } + + public void setAppSelect(String appSelect) { + this.appSelect = appSelect; + } + + public String getAppSelect() { + return appSelect; + } + + public void setAidPriority(String aidPriority) { + this.aidPriority = aidPriority; + } + + public String getAidPriority() { + return aidPriority; + } + + public void setTrxType9C(String trxType9C) { + this.trxType9C = trxType9C; + } + + public String getTrxType9C() { + return trxType9C; + } + + public void setCategoryCode(String categoryCode) { + this.categoryCode = categoryCode; + } + + public String getCategoryCode() { + return categoryCode; + } + + public void setClKernelToUse(String clKernelToUse) { + this.clKernelToUse = clKernelToUse; + } + + public String getClKernelToUse() { + return clKernelToUse; + } + + public void setClOptions(String clOptions) { + this.clOptions = clOptions; + } + + public String getClOptions() { + return clOptions; + } + + public void setClTrxLimit(String clTrxLimit) { + this.clTrxLimit = clTrxLimit; + } + + public String getClTrxLimit() { + return clTrxLimit; + } + + public void setClCvmLimit(String clCvmLimit) { + this.clCvmLimit = clCvmLimit; + } + + public String getClCvmLimit() { + return clCvmLimit; + } + + public void setClFloorLimit(String clFloorLimit) { + this.clFloorLimit = clFloorLimit; + } + + public String getClFloorLimit() { + return clFloorLimit; + } + + public void setDataTtq(String dataTtq) { + this.dataTtq = dataTtq; + } + + public String getDataTtq() { + return dataTtq; + } + + + @Override + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + @Override + public String getCreatedBy() { + return createdBy; + } + + @Override + public void setCreateTs(Date createTs) { + this.createTs = createTs; + } + + @Override + public Date getCreateTs() { + return createTs; + } + + + @Override + public void setUpdatedBy(String updatedBy) { + this.updatedBy = updatedBy; + } + + @Override + public String getUpdatedBy() { + return updatedBy; + } + + @Override + public void setUpdateTs(Date updateTs) { + this.updateTs = updateTs; + } + + @Override + public Date getUpdateTs() { + return updateTs; + } + + + @Override + public void setVersion(Integer version) { + this.version = version; + } + + @Override + public Integer getVersion() { + return version; + } + + + public void setName(String name) { + this.name = name; + } + + public String getName() { + return name; + } + + +} \ No newline at end of file diff --git a/modules/global/src/com/cmobile/unifiedtms/ext/entity/Capk.java b/modules/global/src/com/cmobile/unifiedtms/ext/entity/Capk.java new file mode 100644 index 0000000..b4f1a9e --- /dev/null +++ b/modules/global/src/com/cmobile/unifiedtms/ext/entity/Capk.java @@ -0,0 +1,124 @@ +package com.cmobile.unifiedtms.ext.entity; + +import javax.persistence.Entity; +import javax.persistence.Table; +import javax.persistence.Column; +import com.haulmont.cuba.core.entity.StandardEntity; +import com.haulmont.chile.core.annotations.NamePattern; +import java.util.Date; +import javax.persistence.Lob; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; + +@NamePattern("%s Idx %s|name,idx") +@Table(name = "TMSEXT_CAPK") +@Entity(name = "tms$Capk") +public class Capk extends StandardEntity { + private static final long serialVersionUID = -4953983810428717839L; + + @Column(name = "NAME", nullable = false, length = 50) + protected String name; + + @Column(name = "IDX", nullable = false) + protected String idx; + + @Column(name = "RID", nullable = false, length = 10) + protected String rid; + + @Lob + @Column(name = "MODULUS", nullable = false) + protected String modulus; + + @Column(name = "EXPONENT", nullable = false, length = 4) + protected String exponent; + + @Column(name = "ALGO", nullable = false, length = 2) + protected String algo; + + @Lob + @Column(name = "HASH", nullable = false) + protected String hash; + + @Temporal(TemporalType.DATE) + @Column(name = "EXPIRY_DATE") + protected Date expiryDate; + + @Column(name = "REMARK", length = 100) + protected String remark; + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getRemark() { + return remark; + } + + + public void setRid(String rid) { + this.rid = rid; + } + + public String getRid() { + return rid; + } + + + public void setIdx(String idx) { + this.idx = idx; + } + + public String getIdx() { + return idx; + } + + public void setModulus(String modulus) { + this.modulus = modulus; + } + + public String getModulus() { + return modulus; + } + + public void setExponent(String exponent) { + this.exponent = exponent; + } + + public String getExponent() { + return exponent; + } + + public void setAlgo(String algo) { + this.algo = algo; + } + + public String getAlgo() { + return algo; + } + + public void setHash(String hash) { + this.hash = hash; + } + + public String getHash() { + return hash; + } + + public void setExpiryDate(Date expiryDate) { + this.expiryDate = expiryDate; + } + + public Date getExpiryDate() { + return expiryDate; + } + + + public void setName(String name) { + this.name = name; + } + + public String getName() { + return name; + } + +} \ No newline at end of file diff --git a/modules/global/src/com/cmobile/unifiedtms/ext/entity/Card.java b/modules/global/src/com/cmobile/unifiedtms/ext/entity/Card.java new file mode 100644 index 0000000..9e00aaa --- /dev/null +++ b/modules/global/src/com/cmobile/unifiedtms/ext/entity/Card.java @@ -0,0 +1,184 @@ +package com.cmobile.unifiedtms.ext.entity; + +import com.haulmont.chile.core.annotations.MetaProperty; +import com.haulmont.cuba.core.entity.StandardEntity; +import com.haulmont.cuba.core.entity.annotation.OnDelete; +import com.haulmont.cuba.core.entity.annotation.OnDeleteInverse; +import com.haulmont.cuba.core.global.DeletePolicy; + +import javax.persistence.*; +import javax.validation.constraints.Digits; +import javax.validation.constraints.Max; +import java.util.List; + +@Table(name = "TMSEXT_CARD") +@Entity(name = "tms$Card") +public class Card extends StandardEntity { + private static final long serialVersionUID = 6200425446761442110L; + + @Column(name = "NAME", nullable = false, length = 100) + protected String name; + + @Column(name = "BIN_RANGE_START", nullable = false, length = 10) + protected String binRangeStart; + + @Column(name = "BIN_RANGE_END", nullable = false, length = 10) + protected String binRangeEnd; + + @Digits(message = "{msg://com.cmobile.unifiedtms.ext.entity/cardNumNonNumeric}", integer = 2, fraction = 0) + @Max(message = "{msg://com.cmobile.unifiedtms.ext.entity/cardNumLengthExceeded}", value = 19) + @Column(name = "CARD_NUM_LENGTH", nullable = false) + protected Integer cardNumLength = 16; + + @Column(name = "PAN_DIGIT_UNMASKING", nullable = false, length = 20) + protected String panDigitUnmasking = "1111110000001111111"; + + @Column(name = "PRINT_CARDHOLDER_COPY") + protected Boolean printCardholderCopy = true; + + @Column(name = "PRINT_MERCHANT_COPY") + protected Boolean printMerchantCopy = true; + + @Column(name = "PRINT_BANK_COPY") + protected Boolean printBankCopy = true; + + + @Column(name = "PIN_LENGTH") + protected Integer pinLength = 6; + + @Column(name = "PIN_PROMPT") + protected Boolean pinPrompt; + + + @JoinTable(name = "TMSEXT_ISSUER_CARD_LINK", + joinColumns = @JoinColumn(name = "CARD_ID"), + inverseJoinColumns = @JoinColumn(name = "ISSUER_ID")) + @OnDeleteInverse(DeletePolicy.UNLINK) + @OnDelete(DeletePolicy.DENY) + @ManyToMany + protected List issuers; + + @Transient + @MetaProperty + protected String issuerId; + + @Transient + @MetaProperty + protected String acquirerId; + + public String getAcquirerId() { + return acquirerId; + } + + public void setAcquirerId(String acquirerId) { + this.acquirerId = acquirerId; + } + + public String getIssuerId() { + return issuerId; + } + + public void setIssuerId(String issuerId) { + this.issuerId = issuerId; + } + + public void setIssuers(List issuers) { + this.issuers = issuers; + } + + public List getIssuers() { + return issuers; + } + + + public void setName(String name) { + this.name = name; + } + + public String getName() { + return name; + } + + + + public void setPinLength(Integer pinLength) { + this.pinLength = pinLength; + } + + public Integer getPinLength() { + return pinLength; + } + + public void setPinPrompt(Boolean pinPrompt) { + this.pinPrompt = pinPrompt; + } + + public Boolean getPinPrompt() { + return pinPrompt; + } + + + + public void setBinRangeStart(String binRangeStart) { + this.binRangeStart = binRangeStart; + } + + public String getBinRangeStart() { + return binRangeStart; + } + + public void setBinRangeEnd(String binRangeEnd) { + this.binRangeEnd = binRangeEnd; + } + + public String getBinRangeEnd() { + return binRangeEnd; + } + + public void setCardNumLength(Integer cardNumLength) { + this.cardNumLength = cardNumLength; + } + + public Integer getCardNumLength() { + return cardNumLength; + } + + public void setPanDigitUnmasking(String panDigitUnmasking) { + this.panDigitUnmasking = panDigitUnmasking; + } + + public String getPanDigitUnmasking() { + return panDigitUnmasking; + } + + public void setPrintCardholderCopy(Boolean printCardholderCopy) { + this.printCardholderCopy = printCardholderCopy; + } + + public Boolean getPrintCardholderCopy() { + return printCardholderCopy; + } + + public void setPrintMerchantCopy(Boolean printMerchantCopy) { + this.printMerchantCopy = printMerchantCopy; + } + + public Boolean getPrintMerchantCopy() { + return printMerchantCopy; + } + + public void setPrintBankCopy(Boolean printBankCopy) { + this.printBankCopy = printBankCopy; + } + + public Boolean getPrintBankCopy() { + return printBankCopy; + } + + /* + @Override + public String toString() { + return "Card{" + "id=" + id + ", name=" + name + ", binRangeStart=" + binRangeStart + ", binRangeEnd=" + binRangeEnd + ", cardNumLength=" + cardNumLength + ", panDigitUnmasking=" + panDigitUnmasking + ", printCardholderCopy=" + printCardholderCopy + ", printMerchantCopy=" + printMerchantCopy + ", printBankCopy=" + printBankCopy + ", pinLength=" + pinLength + ", pinPrompt=" + pinPrompt + '}'; + }*/ + +} \ No newline at end of file diff --git a/modules/global/src/com/cmobile/unifiedtms/ext/entity/ExportReportBean.java b/modules/global/src/com/cmobile/unifiedtms/ext/entity/ExportReportBean.java new file mode 100644 index 0000000..6cad514 --- /dev/null +++ b/modules/global/src/com/cmobile/unifiedtms/ext/entity/ExportReportBean.java @@ -0,0 +1,45 @@ +package com.cmobile.unifiedtms.ext.entity; + +import java.io.Serializable; + +public class ExportReportBean implements Serializable { + + private String filename; + private byte[] fileContent; + private boolean written; + private boolean sent; + + public ExportReportBean() {} + + public String getFilename() { + return filename; + } + + public void setFilename(String filename) { + this.filename = filename; + } + + public byte[] getFileContent() { + return fileContent; + } + + public void setFileContent(byte[] fileContent) { + this.fileContent = fileContent; + } + + public boolean isWritten() { + return written; + } + + public void setWritten(boolean written) { + this.written = written; + } + + public boolean isSent() { + return sent; + } + + public void setSent(boolean sent) { + this.sent = sent; + } +} diff --git a/modules/global/src/com/cmobile/unifiedtms/ext/entity/Issuer.java b/modules/global/src/com/cmobile/unifiedtms/ext/entity/Issuer.java new file mode 100644 index 0000000..c2f7e49 --- /dev/null +++ b/modules/global/src/com/cmobile/unifiedtms/ext/entity/Issuer.java @@ -0,0 +1,94 @@ +package com.cmobile.unifiedtms.ext.entity; + +import com.haulmont.chile.core.annotations.NamePattern; +import com.haulmont.cuba.core.entity.StandardEntity; +import com.haulmont.cuba.core.entity.annotation.*; +import com.haulmont.cuba.core.global.DeletePolicy; + +import javax.persistence.*; +import java.util.ArrayList; +import java.util.List; + +@NamePattern("%s|name") +@Table(name = "TMSEXT_ISSUER") +@Entity(name = "tms$Issuer") +public class Issuer extends StandardEntity { + private static final long serialVersionUID = -4953983810428717839L; + + @Column(name = "NAME", nullable = false, length = 30) + protected String name; + + @Column(name = "ISSUER_ID", nullable = false, length = 10) + protected String issuerID; + + @Column(name = "ON_US") + protected Boolean onUs; + + @JoinTable(name = "TMSEXT_ISSUER_CARD_LINK", + joinColumns = @JoinColumn(name = "ISSUER_ID"), + inverseJoinColumns = @JoinColumn(name = "CARD_ID")) + @ManyToMany(cascade = CascadeType.REFRESH) + @OnDeleteInverse(DeletePolicy.UNLINK) + @OnDelete(DeletePolicy.CASCADE) + protected List cards; + + @Lookup(type = LookupType.DROPDOWN, actions = "lookup") + @OnDeleteInverse(DeletePolicy.CASCADE) + @OnDelete(DeletePolicy.CASCADE) + @ManyToOne(fetch = FetchType.LAZY) + @JoinColumn(name = "ACQUIRER_ID") + protected Acquirer acquirer; + + public Boolean getOnUs() { + return onUs; + } + + public void setOnUs(Boolean onUs) { + this.onUs = onUs; + } + + public void setAcquirer(Acquirer acquirer) { + this.acquirer = acquirer; + } + + public Acquirer getAcquirer() { + return acquirer; + } + + + public void setName(String name) { + this.name = name; + } + + public String getName() { + return name; + } + + + + public void setCards(List cards) { + this.cards = cards; + } + + public List getCards() { + if(cards == null) { + cards = new ArrayList<>(); + } + return cards; + } + + + public void setIssuerID(String issuerID) { + this.issuerID = issuerID; + } + + public String getIssuerID() { + return issuerID; + } + + @Override + public String toString() { + return "Issuer{" + "id=" + id + ", name=" + name + ", issuerID=" + issuerID + '}'; + } + +} \ No newline at end of file diff --git a/modules/global/src/com/cmobile/unifiedtms/ext/entity/MerchantType.java b/modules/global/src/com/cmobile/unifiedtms/ext/entity/MerchantType.java new file mode 100644 index 0000000..f3a1028 --- /dev/null +++ b/modules/global/src/com/cmobile/unifiedtms/ext/entity/MerchantType.java @@ -0,0 +1,32 @@ +package com.cmobile.unifiedtms.ext.entity; + +import com.haulmont.chile.core.datatypes.impl.EnumClass; + +import javax.annotation.Nullable; + + +public enum MerchantType implements EnumClass { + + CHAIN("RETAIL"), + RETAIL("RETAIL"); + + private String id; + + MerchantType(String value) { + this.id = value; + } + + public String getId() { + return id; + } + + @Nullable + public static MerchantType fromId(String id) { + for (MerchantType at : MerchantType.values()) { + if (at.getId().equals(id)) { + return at; + } + } + return null; + } +} \ No newline at end of file diff --git a/modules/global/src/com/cmobile/unifiedtms/ext/entity/PublicKeySetting.java b/modules/global/src/com/cmobile/unifiedtms/ext/entity/PublicKeySetting.java new file mode 100644 index 0000000..cbff6ed --- /dev/null +++ b/modules/global/src/com/cmobile/unifiedtms/ext/entity/PublicKeySetting.java @@ -0,0 +1,159 @@ +package com.cmobile.unifiedtms.ext.entity; + +import javax.persistence.Entity; +import javax.persistence.Table; +import javax.persistence.Column; +import javax.persistence.Lob; +import com.haulmont.cuba.core.entity.BaseUuidEntity; +import com.haulmont.cuba.core.entity.Versioned; +import javax.persistence.Version; +import com.haulmont.cuba.core.entity.Updatable; +import java.util.Date; +import com.haulmont.chile.core.annotations.NamePattern; +import com.haulmont.cuba.core.entity.Creatable; + +@NamePattern("%s|idx") +@Table(name = "TMSEXT_PUBLIC_KEY_SETTING") +@Entity(name = "tms$PublicKeySetting") +public class PublicKeySetting extends BaseUuidEntity implements Versioned, Updatable, Creatable { + private static final long serialVersionUID = -1546798966243718345L; + + @Column(name = "IDX", nullable = false, unique = true, length = 5) + protected String idx; + + @Column(name = "RID", nullable = false, length = 10) + protected String rid; + + @Lob + @Column(name = "MODULUS", nullable = false) + protected String modulus; + + @Column(name = "EXPONENT", nullable = false, length = 2) + protected String exponent; + + @Lob + @Column(name = "HASH", nullable = false) + protected String hash; + + @Column(name = "ALGO", nullable = false, length = 2) + protected String algo; + + @Version + @Column(name = "VERSION", nullable = false) + protected Integer version; + + @Column(name = "UPDATE_TS") + protected Date updateTs; + + @Column(name = "UPDATED_BY", length = 50) + protected String updatedBy; + + @Column(name = "CREATE_TS") + protected Date createTs; + + @Column(name = "CREATED_BY", length = 50) + protected String createdBy; + + @Override + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + @Override + public String getCreatedBy() { + return createdBy; + } + + @Override + public void setCreateTs(Date createTs) { + this.createTs = createTs; + } + + @Override + public Date getCreateTs() { + return createTs; + } + + + @Override + public void setUpdatedBy(String updatedBy) { + this.updatedBy = updatedBy; + } + + @Override + public String getUpdatedBy() { + return updatedBy; + } + + @Override + public void setUpdateTs(Date updateTs) { + this.updateTs = updateTs; + } + + @Override + public Date getUpdateTs() { + return updateTs; + } + + + @Override + public void setVersion(Integer version) { + this.version = version; + } + + @Override + public Integer getVersion() { + return version; + } + + + public void setIdx(String idx) { + this.idx = idx; + } + + public String getIdx() { + return idx; + } + + public void setRid(String rid) { + this.rid = rid; + } + + public String getRid() { + return rid; + } + + public void setModulus(String modulus) { + this.modulus = modulus; + } + + public String getModulus() { + return modulus; + } + + public void setExponent(String exponent) { + this.exponent = exponent; + } + + public String getExponent() { + return exponent; + } + + public void setHash(String hash) { + this.hash = hash; + } + + public String getHash() { + return hash; + } + + public void setAlgo(String algo) { + this.algo = algo; + } + + public String getAlgo() { + return algo; + } + + +} \ No newline at end of file diff --git a/modules/global/src/com/cmobile/unifiedtms/ext/entity/TLESetting.java b/modules/global/src/com/cmobile/unifiedtms/ext/entity/TLESetting.java new file mode 100644 index 0000000..9f40182 --- /dev/null +++ b/modules/global/src/com/cmobile/unifiedtms/ext/entity/TLESetting.java @@ -0,0 +1,273 @@ +package com.cmobile.unifiedtms.ext.entity; + +import com.haulmont.chile.core.annotations.NamePattern; +import com.haulmont.cuba.core.entity.StandardEntity; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Lob; +import javax.persistence.Table; + +@NamePattern("%s - %s|tleEftSec,tleID") +@Table(name = "TMSEXT_TLE_SETTING") +@Entity(name = "tms$TLESetting") +public class TLESetting extends StandardEntity { + private static final long serialVersionUID = -4953983810428717839L; + + @Column(name = "TLE_EFT_SEC", nullable = false, unique = true, length = 10) + protected String tleEftSec; + + @Column(name = "TLE_ID", nullable = false, length = 2) + protected String tleID; + + @Column(name = "ACQUIRER_ID", nullable = false, length = 3) + protected String acquirerId; + + @Column(name = "LTMK_AID", nullable = false, length = 3) + protected String ltmkAid; + + @Column(name = "VENDOR_ID", nullable = false, length = 8) + protected String vendorId; + + @Column(name = "TLE_VER", nullable = false, length = 1) + protected String tleVer; + + @Column(name = "KMS_SECURE_NII", length = 4) + protected String kmsSecureNII; + + @Column(name = "EDC_SECURE_NII", length = 4) + protected String edcSecureNII; + + @Column(name = "CAPK_EXPONENT", length = 2) + protected String capkExponent; + + @Column(name = "CAPK_LENGTH") + protected Integer capkLength; + + @Lob + @Column(name = "CAPK_VALUE") + protected String capkValue; + + @Column(name = "AID_LENGTH") + protected Integer aidLength; + + @Lob + @Column(name = "AID_VALUE") + protected String aidValue; + + @Column(name = "FIELD_ENCRYPTED1", length = 3) + protected String fieldEncrypted1; + + @Column(name = "FIELD_ENCRYPTED2", length = 3) + protected String fieldEncrypted2; + + @Column(name = "FIELD_ENCRYPTED3", length = 3) + protected String fieldEncrypted3; + + @Column(name = "FIELD_ENCRYPTED4", length = 3) + protected String fieldEncrypted4; + + @Column(name = "FIELD_ENCRYPTED5", length = 3) + protected String fieldEncrypted5; + + @Column(name = "FIELD_ENCRYPTED6", length = 3) + protected String fieldEncrypted6; + + @Column(name = "FIELD_ENCRYPTED7", length = 3) + protected String fieldEncrypted7; + + @Column(name = "FIELD_ENCRYPTED8", length = 3) + protected String fieldEncrypted8; + + @Column(name = "FIELD_ENCRYPTED9", length = 3) + protected String fieldEncrypted9; + + @Column(name = "FIELD_ENCRYPTED10", length = 3) + protected String fieldEncrypted10; + + public String getFieldEncrypted10() { + return fieldEncrypted10; + } + + public void setFieldEncrypted10(String fieldEncrypted10) { + this.fieldEncrypted10 = fieldEncrypted10; + } + + public String getFieldEncrypted9() { + return fieldEncrypted9; + } + + public void setFieldEncrypted9(String fieldEncrypted9) { + this.fieldEncrypted9 = fieldEncrypted9; + } + + public String getFieldEncrypted8() { + return fieldEncrypted8; + } + + public void setFieldEncrypted8(String fieldEncrypted8) { + this.fieldEncrypted8 = fieldEncrypted8; + } + + public String getFieldEncrypted7() { + return fieldEncrypted7; + } + + public void setFieldEncrypted7(String fieldEncrypted7) { + this.fieldEncrypted7 = fieldEncrypted7; + } + + public void setTleEftSec(String tleEftSec) { + this.tleEftSec = tleEftSec; + } + + public String getTleEftSec() { + return tleEftSec; + } + + public void setTleID(String tleID) { + this.tleID = tleID; + } + + public String getTleID() { + return tleID; + } + + public void setAcquirerId(String acquirerId) { + this.acquirerId = acquirerId; + } + + public String getAcquirerId() { + return acquirerId; + } + + public void setLtmkAid(String ltmkAid) { + this.ltmkAid = ltmkAid; + } + + public String getLtmkAid() { + return ltmkAid; + } + + public void setVendorId(String vendorId) { + this.vendorId = vendorId; + } + + public String getVendorId() { + return vendorId; + } + + public void setTleVer(String tleVer) { + this.tleVer = tleVer; + } + + public String getTleVer() { + return tleVer; + } + + public void setKmsSecureNII(String kmsSecureNII) { + this.kmsSecureNII = kmsSecureNII; + } + + public String getKmsSecureNII() { + return kmsSecureNII; + } + + public void setEdcSecureNII(String edcSecureNII) { + this.edcSecureNII = edcSecureNII; + } + + public String getEdcSecureNII() { + return edcSecureNII; + } + + public void setCapkExponent(String capkExponent) { + this.capkExponent = capkExponent; + } + + public String getCapkExponent() { + return capkExponent; + } + + public void setCapkLength(Integer capkLength) { + this.capkLength = capkLength; + } + + public Integer getCapkLength() { + return capkLength; + } + + public void setCapkValue(String capkValue) { + this.capkValue = capkValue; + } + + public String getCapkValue() { + return capkValue; + } + + public void setAidLength(Integer aidLength) { + this.aidLength = aidLength; + } + + public Integer getAidLength() { + return aidLength; + } + + public void setAidValue(String aidValue) { + this.aidValue = aidValue; + } + + public String getAidValue() { + return aidValue; + } + + public void setFieldEncrypted1(String fieldEncrypted1) { + this.fieldEncrypted1 = fieldEncrypted1; + } + + public String getFieldEncrypted1() { + return fieldEncrypted1; + } + + public void setFieldEncrypted2(String fieldEncrypted2) { + this.fieldEncrypted2 = fieldEncrypted2; + } + + public String getFieldEncrypted2() { + return fieldEncrypted2; + } + + public void setFieldEncrypted3(String fieldEncrypted3) { + this.fieldEncrypted3 = fieldEncrypted3; + } + + public String getFieldEncrypted3() { + return fieldEncrypted3; + } + + public void setFieldEncrypted4(String fieldEncrypted4) { + this.fieldEncrypted4 = fieldEncrypted4; + } + + public String getFieldEncrypted4() { + return fieldEncrypted4; + } + + public void setFieldEncrypted5(String fieldEncrypted5) { + this.fieldEncrypted5 = fieldEncrypted5; + } + + public String getFieldEncrypted5() { + return fieldEncrypted5; + } + + public void setFieldEncrypted6(String fieldEncrypted6) { + this.fieldEncrypted6 = fieldEncrypted6; + } + + public String getFieldEncrypted6() { + return fieldEncrypted6; + } + + +} \ No newline at end of file diff --git a/modules/global/src/com/cmobile/unifiedtms/ext/entity/TerminalExt.java b/modules/global/src/com/cmobile/unifiedtms/ext/entity/TerminalExt.java new file mode 100644 index 0000000..51aabca --- /dev/null +++ b/modules/global/src/com/cmobile/unifiedtms/ext/entity/TerminalExt.java @@ -0,0 +1,983 @@ +package com.cmobile.unifiedtms.ext.entity; + +import com.haulmont.chile.core.annotations.MetaProperty; +import com.haulmont.chile.core.annotations.NamePattern; +import com.haulmont.cuba.core.entity.StandardEntity; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; +import javax.persistence.Transient; +import java.util.List; + +@NamePattern("%s|terminalId") +@Table(name = "TMSEXT_TERMINAL_EXT") +@Entity(name = "tms$TerminalExt") +public class TerminalExt extends StandardEntity { + private static final long serialVersionUID = -3777005290445864985L; + + @Column(name = "TERMINAL_ID", nullable = false, unique = true, length = 8) + protected String terminalId; + + @Column(name = "MERCHANT_ID", nullable = false, length = 15) + protected String merchantId; + + @Column(name = "MERCHANT_NAME1", nullable = false, length = 30) + protected String merchantName1; + + @Column(name = "MERCHANT_NAME2", length = 30) + protected String merchantName2; + + @Column(name = "MERCHANT_NAME3", length = 30) + protected String merchantName3; + + @Column(name = "MERCHANT_NAME4", length = 30) + protected String merchantName4; + + @Column(name = "MERCHANT_NAME5", length = 30) + protected String merchantName5; + + @Column(name = "MERCHANT_PASSWORD", length = 8) + protected String merchantPassword; + + @Column(name = "ADMIN_PASSWORD", length = 8) + protected String adminPassword; + + @Column(name = "SETTLEMENT_PASSWORD", length = 8) + protected String settlementPassword; + + @Column(name = "VOID_PASSWORD", length = 8) + protected String voidPassword; + + @Column(name = "SETTLE_MAX_TRX_COUNT") + protected Integer settleMaxTrxCount; + + @Column(name = "SETTLE_WARNING_TRX_COUNT") + protected Integer settleWarningTrxCount; + + @Column(name = "CALL_CENTER1") + protected String callCenter1; + + @Column(name = "CALL_CENTER2") + protected String callCenter2; + + @Column(name = "MERCHANT_TYPE", nullable = true, length = 30) + protected String merchantType; + + @Column(name = "VENDOR_NAME", nullable = true, length = 100) + protected String vendorName; + + @Column(name = "BRIZZI_DISCOUNT_PERCENTAGE", length = 10) + protected String brizziDiscountPercentage; + + @Column(name = "BRIZZI_DISCOUNT_AMOUNT", length = 30) + protected String brizziDiscountAmount; + + @Column(name = "FALLBACK_ENABLED") + protected Boolean fallbackEnabled; + + @Column(name = "QRIS_COUNT_DOWN") + protected Integer qrisCountDown; + + @Column(name = "REPRINT_ONLINE_RETRY") + protected Integer reprintOnlineRetry; + + @Column(name = "FEATURE_SALE") + protected Boolean featureSale; + + @Column(name = "FEATURE_SALE_TIP") + protected Boolean featureSaleTip; + + @Column(name = "FEATURE_SALE_REDEMPTION") + protected Boolean featureSaleRedemption; + + @Column(name = "FEATURE_CARD_VERIFICATION") + protected Boolean featureCardVerification; + + @Column(name = "FEATURE_SALE_COMPLETION") + protected Boolean featureSaleCompletion; + + @Column(name = "FEATURE_INSTALLMENT") + protected Boolean featureInstallment; + + @Column(name = "FEATURE_SALE_FARE_NON_FARE") + protected Boolean featureSaleFareNonFare; + + @Column(name = "FEATURE_MANUAL_KEY_IN") + protected Boolean featureManualKeyIn; + + @Column(name = "FEATURE_QRIS") + protected Boolean featureQRIS; + + @Column(name = "INSTALLMENT1_OPTIONS", length = 20) + protected String installment1Options = "3, 6, 12, 18, 24"; + + @Column(name = "INSTALLMENT2_OPTIONS", length = 20) + protected String installment2Options = "3, 6, 12, 18, 24"; + + @Column(name = "INSTALLMENT3_OPTIONS", length = 20) + protected String installment3Options = "3, 6, 12, 18, 24"; + + @Column(name = "FEATURE_CONTACTLESS") + protected Boolean featureContactless; + + @Column(name = "FEATURE_SALE_NFC") + protected Boolean featureSaleNfc; + + @Column(name = "FEATURE_REFUND_NFC") + protected Boolean featureRefundNfc; + + @Column(name = "FEATURE_SALE_WITH_BRIPOIN") + protected Boolean featureSaleWithBripoin; + + @Column(name = "INQUIRY_BRIPOIN_TIMEOUT") + protected Integer inquiryBripoinTimeout; + + @Column(name = "INQUIRY_BRIPOIN_NII") + protected String inquiryBripoinNII; + + @Column(name = "FEATURE_RELEASE_CARD_VER") + protected Boolean featureReleaseCardVer; + + @Column(name = "FEATURE_VOID") + protected Boolean featureVoid; + + @Column(name = "FEATURE_SETTLEMENT") + protected Boolean featureSettlement; + + @Column(name = "FEATURE_REPRINT") + protected Boolean featureReprint; + + @Column(name = "FEATURE_REPORT") + protected Boolean featureReport; + + @Column(name = "FEATURE_QRIS_GENERATE") + protected Boolean featureQrisGenerate; + + @Column(name = "FEATURE_QRIS_PAY") + protected Boolean featureQrisPay; + + @Column(name = "FEATURE_QRIS_REFUND") + protected Boolean featureQrisRefund; + + @Column(name = "FEATURE_QRIS_REPORT") + protected Boolean featureQrisReport; + + @Column(name = "FEATURE_BRIZZI_INFO") + protected Boolean featureBrizziInfo; + + @Column(name = "FEATURE_BRIZZI_INFO_DEPOSIT") + protected Boolean featureBrizziInfoDeposit; + + @Column(name = "FEATURE_BRIZZI_UPDATE_DEPOSIT") + protected Boolean featureBrizziUpdateDeposit; + + @Column(name = "FEATURE_BRIZZI_TOPUP") + protected Boolean featureBrizziTopup; + + @Column(name = "FEATURE_BRIZZI_TOPUP_DEPOSIT") + protected Boolean featureBrizziTopupDeposit; + + @Column(name = "FEATURE_BRIZZI_SALE") + protected Boolean featureBrizziSale; + + @Column(name = "FEATURE_BRIZZI_SETTLEMENT") + protected Boolean featureBrizziSettlement; + + @Column(name = "FEATURE_BRIZZI_VOID") + protected Boolean featureBrizziVoid; + + @Column(name = "FEATURE_BRIZZI_INIT") + protected Boolean featureBrizziInit; + + @Column(name = "FEATURE_BRIZZI_CARD_INFO") + protected Boolean featureBrizziCardInfo; + + @Column(name = "FEATURE_BRIZZI_LOG") + protected Boolean featureBrizziLog; + + @Column(name = "FEATURE_BRIZZI_REPRINT") + protected Boolean featureBrizziReprint; + + @Column(name = "FEATURE_BRIZZI_REPORT") + protected Boolean featureBrizziReport; + + @Column(name = "FEATURE_RE_ENG_QRIS") + protected Boolean featureReEngQris; + + @Column(name = "FEATURE_CONTACTLESS_QRIS_TAP") + protected Boolean featureContactlessQristap; + + @Column(name = "RANDOM_PIN_KEYPAD") + protected Boolean randomPinKeypad; + + @Column(name = "BEEP_PIN_KEYPAD") + protected Boolean beepPinKeypad; + + @Column(name = "AUTO_LOGON") + protected Boolean autoLogon; + + @Column(name = "NEXT_LOGON") + protected Integer nextLogon; + + @Column(name = "PUSH_LOGON") + protected Integer pushLogon; + + @Column(name = "HOST_REPORT", nullable = true) + protected Boolean hostReport; + + @Column(name = "PASSWORD_BLOCK_TIME") + protected Integer passwordBlockTime; + + @Transient + @MetaProperty + protected Integer hostReportTimeout; + + @Transient + @MetaProperty + protected String hostReportUrl; + + @Transient + @MetaProperty + protected String hostReportApiKey; + + @Column(name = "HOST_LOGGING", nullable = true) + protected Boolean hostLogging; + + @Transient + @MetaProperty + protected Integer hostLoggingTimeout; + + @Transient + @MetaProperty + protected String hostLoggingUrl; + + @Transient + @MetaProperty + protected String hostLoggingApiKey; + + @Transient + @MetaProperty + protected Boolean autoStartApp; + + @Column(name = "SKIP_PASSWORD", nullable = true) + protected Boolean skipPassword; + + @Column(name = "AUTO_DELETE_QRIS_TRX") + protected Integer autoDeleteQrisTrx; + + @Column(name = "BRIZZI_SETTLEMENT_MAX_COUNT") + protected Integer settleMaxTrxCountBrizzi; + + @Column(name = "BRIZZI_SETTLEMENT_WARN_COUNT") + protected Integer settleWarningTrxCountBrizzi; + + @Column(name = "QRIS_CHECK_INTERVAL") + protected Integer qrisCekInterval; + + @Column(name = "CUSTOM_PAN_MASKING") + protected Boolean customPanMasking; + + @Transient + @MetaProperty + protected List acquirers; + + public void setAcquirers(List acquirers) { + this.acquirers = acquirers; + } + + public List getAcquirers() { + return acquirers; + } + + public Integer getNextLogon() { + return nextLogon; + } + + public void setNextLogon(Integer nextLogon) { + this.nextLogon = nextLogon; + } + + public Boolean getAutoLogon() { + return autoLogon; + } + + public void setAutoLogon(Boolean autoLogon) { + this.autoLogon = autoLogon; + } + + public Boolean getBeepPinKeypad() { + return beepPinKeypad; + } + + public void setBeepPinKeypad(Boolean beepPinKeypad) { + this.beepPinKeypad = beepPinKeypad; + } + + public String getInstallment3Options() { + return installment3Options; + } + + public void setInstallment3Options(String installment3Options) { + this.installment3Options = installment3Options; + } + + public String getInstallment2Options() { + return installment2Options; + } + + public void setInstallment2Options(String installment2Options) { + this.installment2Options = installment2Options; + } + + public String getInstallment1Options() { + return installment1Options; + } + + public void setInstallment1Options(String installment1Options) { + this.installment1Options = installment1Options; + } + + public Boolean getFeatureQRIS() { + return featureQRIS; + } + + public void setFeatureQRIS(Boolean featureQRIS) { + this.featureQRIS = featureQRIS; + } + + public Boolean getFeatureManualKeyIn() { + return featureManualKeyIn; + } + + public void setFeatureManualKeyIn(Boolean featureManualKeyIn) { + this.featureManualKeyIn = featureManualKeyIn; + } + + public Boolean getFeatureSaleFareNonFare() { + return featureSaleFareNonFare; + } + + public void setFeatureSaleFareNonFare(Boolean featureSaleFareNonFare) { + this.featureSaleFareNonFare = featureSaleFareNonFare; + } + + public Boolean getFeatureInstallment() { + return featureInstallment; + } + + public void setFeatureInstallment(Boolean featureInstallment) { + this.featureInstallment = featureInstallment; + } + + public Boolean getFeatureSaleCompletion() { + return featureSaleCompletion; + } + + public void setFeatureSaleCompletion(Boolean featureSaleCompletion) { + this.featureSaleCompletion = featureSaleCompletion; + } + + public Boolean getFeatureCardVerification() { + return featureCardVerification; + } + + public void setFeatureCardVerification(Boolean featureCardVerification) { + this.featureCardVerification = featureCardVerification; + } + + public Boolean getFeatureSaleRedemption() { + return featureSaleRedemption; + } + + public void setFeatureSaleRedemption(Boolean featureSaleRedemption) { + this.featureSaleRedemption = featureSaleRedemption; + } + + public Boolean getFeatureSaleTip() { + return featureSaleTip; + } + + public void setFeatureSaleTip(Boolean featureSaleTip) { + this.featureSaleTip = featureSaleTip; + } + + public Boolean getFeatureSale() { + return featureSale; + } + + public void setFeatureSale(Boolean featureSale) { + this.featureSale = featureSale; + } + + public Boolean getFeatureSaleNfc() { + return featureSaleNfc; + } + + public void setFeatureSaleNfc(Boolean featureSaleNfc) { + this.featureSaleNfc = featureSaleNfc; + } + + public Boolean getFeatureRefundNfc() { + return featureRefundNfc; + } + + public void setFeatureRefundNfc(Boolean featureRefundNfc) { + this.featureRefundNfc = featureRefundNfc; + } + + public Integer getReprintOnlineRetry() { + return reprintOnlineRetry; + } + + public void setReprintOnlineRetry(Integer reprintOnlineRetry) { + this.reprintOnlineRetry = reprintOnlineRetry; + } + + public Integer getQrisCountDown() { + return qrisCountDown; + } + + public void setQrisCountDown(Integer qrisCountDown) { + this.qrisCountDown = qrisCountDown; + } + + public Boolean getFallbackEnabled() { + return fallbackEnabled; + } + + public void setFallbackEnabled(Boolean fallbackEnabled) { + this.fallbackEnabled = fallbackEnabled; + } + + public String getBrizziDiscountAmount() { + return brizziDiscountAmount; + } + + public void setBrizziDiscountAmount(String brizziDiscountAmount) { + this.brizziDiscountAmount = brizziDiscountAmount; + } + + public String getBrizziDiscountPercentage() { + return brizziDiscountPercentage; + } + + public void setBrizziDiscountPercentage(String brizziDiscountPercentage) { + this.brizziDiscountPercentage = brizziDiscountPercentage; + } + + public Integer getSettleWarningTrxCount() { + return settleWarningTrxCount; + } + + public void setSettleWarningTrxCount(Integer settleWarningTrxCount) { + this.settleWarningTrxCount = settleWarningTrxCount; + } + + public String getVoidPassword() { + return voidPassword; + } + + public void setVoidPassword(String voidPassword) { + this.voidPassword = voidPassword; + } + + public String getSettlementPassword() { + return settlementPassword; + } + + public void setSettlementPassword(String settlementPassword) { + this.settlementPassword = settlementPassword; + } + + + public void setCallCenter1(String callCenter1) { + this.callCenter1 = callCenter1; + } + + public String getCallCenter1() { + return callCenter1; + } + + public void setCallCenter2(String callCenter2) { + this.callCenter2 = callCenter2; + } + + public String getCallCenter2() { + return callCenter2; + } + + public void setMerchantType(MerchantType merchantType) { + this.merchantType = merchantType == null ? null : merchantType.getId(); + } + + public MerchantType getMerchantType() { + return merchantType == null ? null : MerchantType.fromId(merchantType); + } + + public String getVendorName() { + return vendorName; + } + + public void setVendorName(String vendorName) { + this.vendorName = vendorName; + } + + public void setTerminalId(String terminalId) { + this.terminalId = terminalId; + } + + public String getTerminalId() { + return terminalId; + } + + + public void setMerchantId(String merchantId) { + this.merchantId = merchantId; + } + + public String getMerchantId() { + return merchantId; + } + + public void setMerchantName1(String merchantName1) { + this.merchantName1 = merchantName1; + } + + public String getMerchantName1() { + return merchantName1; + } + + public void setMerchantName2(String merchantName2) { + this.merchantName2 = merchantName2; + } + + public String getMerchantName2() { + return merchantName2; + } + + public void setMerchantName3(String merchantName3) { + this.merchantName3 = merchantName3; + } + + public String getMerchantName3() { + return merchantName3; + } + + public void setMerchantName4(String merchantName4) { + this.merchantName4 = merchantName4; + } + + public String getMerchantName4() { + return merchantName4; + } + + public void setMerchantName5(String merchantName5) { + this.merchantName5 = merchantName5; + } + + public String getMerchantName5() { + return merchantName5; + } + + public void setMerchantPassword(String merchantPassword) { + this.merchantPassword = merchantPassword; + } + + public String getMerchantPassword() { + return merchantPassword; + } + + public void setAdminPassword(String adminPassword) { + this.adminPassword = adminPassword; + } + + public String getAdminPassword() { + return adminPassword; + } + + public void setSettleMaxTrxCount(Integer settleMaxTrxCount) { + this.settleMaxTrxCount = settleMaxTrxCount; + } + + public Integer getSettleMaxTrxCount() { + return settleMaxTrxCount; + } + + public Boolean getFeatureContactless() { + return featureContactless; + } + + public void setFeatureContactless(Boolean featureContactless) { + this.featureContactless = featureContactless; + } + + public Boolean getFeatureReEngQris() { + return featureReEngQris; + } + + public void setFeatureReEngQris(Boolean featureReEngQris) { + this.featureReEngQris = featureReEngQris; + } + + public Boolean getRandomPinKeypad() { + return randomPinKeypad; + } + + public void setRandomPinKeypad(Boolean randomPinKeypad) { + this.randomPinKeypad = randomPinKeypad; + } +/* + @Override + public String toString() { + return "Terminal{" + "id=" + id + ", terminalId=" + terminalId + ", merchantId=" + merchantId + ", merchantName1=" + merchantName1 + ", merchantName2=" + merchantName2 + ", merchantName3=" + merchantName3 + ", merchantPassword=" + merchantPassword + ", adminPassword=" + adminPassword + ", initialisePassword=" + initialisePassword + ", timeOfSettlement=" + timeOfSettlement + ", settleTime1=" + settleTime1 + ", settleTime2=" + settleTime2 + ", settleTime3=" + settleTime3 + ", passwordVoid=" + passwordVoid + ", passwordAdjust=" + passwordAdjust + ", passwordRefund=" + passwordRefund + ", passwordOffline=" + passwordOffline + ", pushSettleInDays=" + pushSettleInDays + ", settleMaxTrxCount=" + settleMaxTrxCount + ", settlePeriod=" + settlePeriod + ", settleAttempt=" + settleAttempt + ", deviceTerminal=" + deviceTerminal + ", profile=" + profile + ", autoSettle=" + autoSettle + ", track2TopUpTunai=" + track2TopUpTunai + ", redemption=" + redemption + ", smartSpending=" + smartSpending + ", loyaltyPurseID1=" + loyaltyPurseID1 + ", loyaltyPurseID2=" + loyaltyPurseID2 + ", loyaltyPurseID3=" + loyaltyPurseID3 + ", emvInformation=" + emvInformation + ", cvmOnlinePinBypass=" + cvmOnlinePinBypass + ", cvmSignPromptPin=" + cvmSignPromptPin + ", autoInit=" + autoInit + ", autoInitNII=" + autoInitNII + ", callCenter1=" + callCenter1 + ", callCenter2=" + callCenter2 + ", importDefault=" + importDefault + '}'; + }*/ + + public Integer getPushLogon() { + return pushLogon; + } + + public void setPushLogon(Integer pushLogon) { + this.pushLogon = pushLogon; + } + + public Boolean getHostReport() { + return hostReport; + } + + public void setHostReport(Boolean hostReport) { + this.hostReport = hostReport; + } + + public Integer getHostReportTimeout() { + return hostReportTimeout; + } + + public void setHostReportTimeout(Integer hostReportTimeout) { + this.hostReportTimeout = hostReportTimeout; + } + + public String getHostReportUrl() { + return hostReportUrl; + } + + public void setHostReportUrl(String hostReportUrl) { + this.hostReportUrl = hostReportUrl; + } + + public String getHostReportApiKey() { + return hostReportApiKey; + } + + public void setHostReportApiKey(String hostReportApiKey) { + this.hostReportApiKey = hostReportApiKey; + } + + public Boolean getHostLogging() { + return hostLogging; + } + + public void setHostLogging(Boolean hostLogging) { + this.hostLogging = hostLogging; + } + + public Integer getHostLoggingTimeout() { + return hostLoggingTimeout; + } + + public void setHostLoggingTimeout(Integer hostLoggingTimeout) { + this.hostLoggingTimeout = hostLoggingTimeout; + } + + public String getHostLoggingUrl() { + return hostLoggingUrl; + } + + public void setHostLoggingUrl(String hostLoggingUrl) { + this.hostLoggingUrl = hostLoggingUrl; + } + + public String getHostLoggingApiKey() { + return hostLoggingApiKey; + } + + public void setHostLoggingApiKey(String hostLoggingApiKey) { + this.hostLoggingApiKey = hostLoggingApiKey; + } + + public Boolean getAutoStartApp() { + return autoStartApp; + } + + public void setAutoStartApp(Boolean autoStartApp) { + this.autoStartApp = autoStartApp; + } + + public Boolean getSkipPassword() { + return skipPassword; + } + + public void setSkipPassword(Boolean skipPassword) { + this.skipPassword = skipPassword; + } + + public Boolean getFeatureSaleWithBripoin() { + return featureSaleWithBripoin; + } + + public void setFeatureSaleWithBripoin(Boolean featureSaleWithBripoin) { + this.featureSaleWithBripoin = featureSaleWithBripoin; + } + + public Integer getInquiryBripoinTimeout() { + return inquiryBripoinTimeout; + } + + public void setInquiryBripoinTimeout(Integer inquiryBripoinTimeout) { + this.inquiryBripoinTimeout = inquiryBripoinTimeout; + } + + public Boolean getFeatureReleaseCardVer() { + return featureReleaseCardVer; + } + + public void setFeatureReleaseCardVer(Boolean featureReleaseCardVer) { + this.featureReleaseCardVer = featureReleaseCardVer; + } + + public String getInquiryBripoinNII() { + return inquiryBripoinNII; + } + + public void setInquiryBripoinNII(String inquiryBripoinNII) { + this.inquiryBripoinNII = inquiryBripoinNII; + } + + public Boolean getFeatureVoid() { + return featureVoid; + } + + public void setFeatureVoid(Boolean featureVoid) { + this.featureVoid = featureVoid; + } + + public Boolean getFeatureSettlement() { + return featureSettlement; + } + + public void setFeatureSettlement(Boolean featureSettlement) { + this.featureSettlement = featureSettlement; + } + + public Boolean getFeatureReprint() { + return featureReprint; + } + + public void setFeatureReprint(Boolean featureReprint) { + this.featureReprint = featureReprint; + } + + public Boolean getFeatureReport() { + return featureReport; + } + + public void setFeatureReport(Boolean featureReport) { + this.featureReport = featureReport; + } + + public Boolean getFeatureQrisGenerate() { + return featureQrisGenerate; + } + + public void setFeatureQrisGenerate(Boolean featureQrisGenerate) { + this.featureQrisGenerate = featureQrisGenerate; + } + + public Boolean getFeatureQrisPay() { + return featureQrisPay; + } + + public void setFeatureQrisPay(Boolean featureQrisPay) { + this.featureQrisPay = featureQrisPay; + } + + public Boolean getFeatureQrisRefund() { + return featureQrisRefund; + } + + public void setFeatureQrisRefund(Boolean featureQrisRefund) { + this.featureQrisRefund = featureQrisRefund; + } + + public Boolean getFeatureQrisReport() { + return featureQrisReport; + } + + public void setFeatureQrisReport(Boolean featureQrisReport) { + this.featureQrisReport = featureQrisReport; + } + + public Boolean getFeatureBrizziInfo() { + return featureBrizziInfo; + } + + public void setFeatureBrizziInfo(Boolean featureBrizziInfo) { + this.featureBrizziInfo = featureBrizziInfo; + } + + public Boolean getFeatureBrizziInfoDeposit() { + return featureBrizziInfoDeposit; + } + + public void setFeatureBrizziInfoDeposit(Boolean featureBrizziInfoDeposit) { + this.featureBrizziInfoDeposit = featureBrizziInfoDeposit; + } + + public Boolean getFeatureBrizziUpdateDeposit() { + return featureBrizziUpdateDeposit; + } + + public void setFeatureBrizziUpdateDeposit(Boolean featureBrizziUpdateDeposit) { + this.featureBrizziUpdateDeposit = featureBrizziUpdateDeposit; + } + + public Boolean getFeatureBrizziTopup() { + return featureBrizziTopup; + } + + public void setFeatureBrizziTopup(Boolean featureBrizziTopup) { + this.featureBrizziTopup = featureBrizziTopup; + } + + public Boolean getFeatureBrizziTopupDeposit() { + return featureBrizziTopupDeposit; + } + + public void setFeatureBrizziTopupDeposit(Boolean featureBrizziTopupDeposit) { + this.featureBrizziTopupDeposit = featureBrizziTopupDeposit; + } + + public Boolean getFeatureBrizziSale() { + return featureBrizziSale; + } + + public void setFeatureBrizziSale(Boolean featureBrizziSale) { + this.featureBrizziSale = featureBrizziSale; + } + + public Boolean getFeatureBrizziSettlement() { + return featureBrizziSettlement; + } + + public void setFeatureBrizziSettlement(Boolean featureBrizziSettlement) { + this.featureBrizziSettlement = featureBrizziSettlement; + } + + public Boolean getFeatureBrizziVoid() { + return featureBrizziVoid; + } + + public void setFeatureBrizziVoid(Boolean featureBrizziVoid) { + this.featureBrizziVoid = featureBrizziVoid; + } + + public Boolean getFeatureBrizziInit() { + return featureBrizziInit; + } + + public void setFeatureBrizziInit(Boolean featureBrizziInit) { + this.featureBrizziInit = featureBrizziInit; + } + + public Boolean getFeatureBrizziCardInfo() { + return featureBrizziCardInfo; + } + + public void setFeatureBrizziCardInfo(Boolean featureBrizziCardInfo) { + this.featureBrizziCardInfo = featureBrizziCardInfo; + } + + public Boolean getFeatureContactlessQristap() { + return featureContactlessQristap; + } + + public void setFeatureContactlessQristap(Boolean featureContactlessQristap) { + this.featureContactlessQristap = featureContactlessQristap; + } + + public Boolean getFeatureBrizziLog() { + return featureBrizziLog; + } + + public void setFeatureBrizziLog(Boolean featureBrizziLog) { + this.featureBrizziLog = featureBrizziLog; + } + + public Boolean getFeatureBrizziReprint() { + return featureBrizziReprint; + } + + public void setFeatureBrizziReprint(Boolean featureBrizziReprint) { + this.featureBrizziReprint = featureBrizziReprint; + } + + public Boolean getFeatureBrizziReport() { + return featureBrizziReport; + } + + public void setFeatureBrizziReport(Boolean featureBrizziReport) { + this.featureBrizziReport = featureBrizziReport; + } + + public Integer getPasswordBlockTime() { + return passwordBlockTime; + } + + public void setPasswordBlockTime(Integer passwordBlockTime) { + this.passwordBlockTime = passwordBlockTime; + } + + public Integer getAutoDeleteQrisTrx() { + return autoDeleteQrisTrx; + } + + public void setAutoDeleteQrisTrx(Integer autoDeleteQrisTrx) { + this.autoDeleteQrisTrx = autoDeleteQrisTrx; + } + + public void setMerchantType(String merchantType) { + this.merchantType = merchantType; + } + + public Integer getSettleMaxTrxCountBrizzi() { + return settleMaxTrxCountBrizzi; + } + + public void setSettleMaxTrxCountBrizzi(Integer settleMaxTrxCountBrizzi) { + this.settleMaxTrxCountBrizzi = settleMaxTrxCountBrizzi; + } + + public Integer getSettleWarningTrxCountBrizzi() { + return settleWarningTrxCountBrizzi; + } + + public void setSettleWarningTrxCountBrizzi(Integer settleWarningTrxCountBrizzi) { + this.settleWarningTrxCountBrizzi = settleWarningTrxCountBrizzi; + } + + public Integer getQrisCekInterval() { + return qrisCekInterval; + } + + public void setQrisCekInterval(Integer qrisCekInterval) { + this.qrisCekInterval = qrisCekInterval; + } + + public Boolean getCustomPanMasking() { + return customPanMasking; + } + + public void setCustomPanMasking(Boolean customPanMasking) { + this.customPanMasking = customPanMasking; + } +} \ No newline at end of file diff --git a/modules/global/src/com/cmobile/unifiedtms/ext/entity/messages.properties b/modules/global/src/com/cmobile/unifiedtms/ext/entity/messages.properties new file mode 100644 index 0000000..a72a90e --- /dev/null +++ b/modules/global/src/com/cmobile/unifiedtms/ext/entity/messages.properties @@ -0,0 +1,235 @@ +TerminalExt = Terminal Ext +TerminalExt.merchantName1 = Merchant Name 1 +TerminalExt.merchantId = Merchant ID +TerminalExt.merchantName3 = Merchant Name 3 +TerminalExt.merchantName2 = Merchant Name 2 +TerminalExt.merchantName4 = Merchant Name 4 +TerminalExt.merchantName5 = Merchant Name 5 +TerminalExt.adminPassword = Admin Password +TerminalExt.settleMaxTrxCount = Settle Max Trx Count +TerminalExt.merchantPassword = Merchant Password +TerminalExt.terminalId = Terminal ID +TerminalExt.callCenter2 = Call Center 2 +TerminalExt.callCenter1 = Call Center 1 +TerminalExt.settlementPassword=Settlement Password +TerminalExt.voidPassword=Void Password +TerminalExt.settleWarningTrxCount=Settle Warning Trx Count +TerminalExt.brizziDiscountPercentage=Brizzi discount percentage +TerminalExt.brizziDiscountAmount=Brizzi discount amount +TerminalExt.fallbackEnabled=Fallback enabled +TerminalExt.qrisCountDown=QRIS Count Down (Seconds) +TerminalExt.reprintOnlineRetry=Reprint Online Retry +TerminalExt.featureSale=Sale +TerminalExt.featureSaleTip=Sale Tip +TerminalExt.featureSaleRedemption=Sale Redemption +TerminalExt.featureCardVerification=Card Verification +TerminalExt.featureSaleCompletion=Sale Completion +TerminalExt.featureInstallment=Installment +TerminalExt.featureSaleFareNonFare=Sale Fare non Fare +TerminalExt.featureManualKeyIn=Manual Key In +TerminalExt.featureQRIS=QRIS +TerminalExt.featureContactless=Contactless +TerminalExt.featureSaleNfc=Sale NFC +TerminalExt.featureRefundNfc=Refund NFC +TerminalExt.featureSaleWithBripoin=Sale with BRIPoin +TerminalExt.featureReleaseCardVer=Release CardVer +TerminalExt.installment1Options=Installment 1 Options +TerminalExt.installment2Options=Installment 2 Options +TerminalExt.installment3Options=Installment 3 Options +TerminalExt.randomPinKeypad=Random PIN Keypad +TerminalExt.beepPinKeypad=Beep PIN Keypad +TerminalExt.autoLogon=Auto Logon +TerminalExt.nextLogon=Next Logon (in Hour) +TerminalExt.pushLogon=Push Logon +TerminalExt.hostReport=Host Report +TerminalExt.hostReportUrl=Host Report URL +TerminalExt.hostReportApiKey=Host Report API Key +TerminalExt.hostReportTimeout=Host Report Timeout +TerminalExt.hostLogging=Host Logging +TerminalExt.hostLoggingUrl=Host Logging URL +TerminalExt.hostLoggingApiKey=Host Logging API Key +TerminalExt.hostLoggingTimeout=Host Logging Timeout +TerminalExt.skipPassword=ByPass Login Page +TerminalExt.inquiryBripoinTimeout=Inquiry BRIPoin Timeout +TerminalExt.acquirers=Acquirers +TerminalExt.inquiryBripoinNII=Inquiry BRIPoin NII +TerminalExt.featureVoid=Void +TerminalExt.featureSettlement=Settlement +TerminalExt.featureReprint=Reprint +TerminalExt.featureReport=Report +TerminalExt.featureQrisGenerate=QRIS Generate +TerminalExt.featureQrisPay=QRIS Pay +TerminalExt.featureQrisRefund=QRIS Refund +TerminalExt.featureQrisReport=QRIS Report +TerminalExt.featureBrizziInfo=Brizzi Info +TerminalExt.featureBrizziInfoDeposit=Brizzi Info Deposit +TerminalExt.featureBrizziUpdateDeposit=Brizzi Update Deposit +TerminalExt.featureBrizziTopup=Brizzi Topup +TerminalExt.featureBrizziTopupDeposit=Brizzi Topup Deposit +TerminalExt.featureBrizziSale=Brizzi Sale +TerminalExt.featureBrizziSettlement=Brizzi Settlement +TerminalExt.featureBrizziVoid=Brizzi Void +TerminalExt.featureBrizziInit=Brizzi Init +TerminalExt.featureBrizziCardInfo=Brizzi Card Info +TerminalExt.featureBrizziLog=Brizzi Log +TerminalExt.featureBrizziReprint=Brizzi Reprint +TerminalExt.featureBrizziReport=Brizzi Report +TerminalExt.featureReEngQris=Rest API/ISO QRIS +TerminalExt.featureContactlessQristap=QRIS TAP Contactless +TerminalExt.passwordBlockTime=Password Block Time (minutes) +TerminalExt.autoDeleteQrisTrx=Auto Delete QRIS Trx +TerminalExt.merchantType=Merchant Type +TerminalExt.vendorName=Vendor Name +TerminalExt.settleMaxTrxCountBrizzi=Brizzi Settlement Max Count +TerminalExt.settleWarningTrxCountBrizzi=Brizzi Settlement Warn Count +TerminalExt.qrisCekInterval=QRIS Check Interval (seconds) +TerminalExt.customPanMasking=Custom PAN Masking +cardNumLengthExceeded = Card Num Length Exceeded +cardNumNonNumeric = Card Num Non Numeric +Card.binRangeStart = Card Num Range From +Card.printCardholderCopy = Print Cardholder Copy +Card.cardNumLength = Card Num Length +Card.printBankCopy = Print Bank Copy +Card.panDigitUnmasking = Pan Digit Unmasking +Card.binRangeEnd = Card Num Range End +Card.printMerchantCopy = Print Merchant Copy +Card = Card +Card.pinLength = Pin Length +Card.pinPrompt = Pin Prompt +Card.name = Name +Card.issuers = Issuers +Card.issuerId=Issuer id +Card.acquirerId=Acquirer id +TLESetting.fieldEncrypted5 = Field Encrypted 5 +TLESetting.aidValue = AID Value +TLESetting.fieldEncrypted6 = Field Encrypted 6 +TLESetting.capkValue = Capk Value +TLESetting.fieldEncrypted3 = Field Encrypted 3 +TLESetting.fieldEncrypted2 = Field Encrypted 2 +TLESetting.vendorId = Vendor ID +TLESetting.fieldEncrypted4 = Field Encrypted 4 +TLESetting.tleID = TLE ID +TLESetting.kmsSecureNII = Kms Secure NII +TLESetting.tleVer = TLE Ver +TLESetting.capkExponent = CAPK Exponent +TLESetting.aidLength = AID Length +TLESetting.fieldEncrypted1 = Field Encrypted 1 +TLESetting.tleEftSec = TLE EFT Sec +TLESetting.edcSecureNII = Edc Secure NII +TLESetting.acquirerId = Acquirer ID +TLESetting.ltmkAid = LTMK AID +TLESetting.capkLength = CAPK Length +TLESetting = TLE Setting +TLESetting.fieldEncrypted7=Field encrypted7 +TLESetting.fieldEncrypted8=Field encrypted8 +TLESetting.fieldEncrypted9=Field encrypted9 +TLESetting.fieldEncrypted10=Field encrypted10 +TLESetting.version = Version +TLESetting.updateTs = Update Ts +TLESetting.updatedBy = Updated by +TLESetting.createTs = Create Ts +TLESetting.createdBy = Created by +TLESetting.deleteTs = Delete ts +TLESetting.deletedBy = Deleted by +PublicKeySetting.rid = RID +PublicKeySetting.hash = Hash +PublicKeySetting.modulus = Modulus +PublicKeySetting.idx = Idx +PublicKeySetting.exponent = Exponent +PublicKeySetting.algo = Algo +PublicKeySetting = Public Key Setting +PublicKeySetting.version = Version +PublicKeySetting.updateTs = Update Ts +PublicKeySetting.updatedBy = Updated by +PublicKeySetting.createTs = Create Ts +PublicKeySetting.createdBy = Created by +AcquirerType.CREDIT = Credit +AcquirerType.DEBIT = Debit +AcquirerType.PREPAID = Prepaid +AcquirerType.MINI_ATM = Mini ATM +AcquirerType.NFC_PAYMENT = NFC Payment +Acquirer = Acquirer +Acquirer.acquirerType = Acquirer Type +Acquirer.hostID = Host ID +Acquirer.name = Name +Acquirer.showPrintExpDate = Show Print Exp Date +Acquirer.tleAcquirer = Tle Acquirer +Acquirer.acquirerId = Acquirer ID +Acquirer.workingKey = Working Key +Acquirer.tleSetting = Tle Setting +Acquirer.numberOfPrint = Number of Print +Acquirer.respTimeout = Resp Timeout (ms) +Acquirer.masterKeyLocation = Master Key Location +Acquirer.masterKey = Master Key +Acquirer.hostDestinationPort = Host Destination Port +Acquirer.hostDestinationAddr = Host Destination Addr +Acquirer.issuers = Issuer +Acquirer.batchNumber = Batch number +Acquirer.terminalID = Terminal ID +Acquirer.merchantID = Merchant ID +Acquirer.settlementHostID=Settlement host ID +Acquirer.checkCardExpDate=Check Card Exp Date +Acquirer.creditSettlement=Credit Settlement +Acquirer.debitSettlement=Debit settlement +Acquirer.description=Description +Issuer = Issuer +Issuer.issuerID = Issuer ID +Issuer.cards = Cards +Issuer.name = Name +Issuer.acquirer = Acquirer +Capk.idx = Idx +Capk.modulus = Modulus +Capk.exponent = Exponent +Capk.hash = Hash +Capk.algo = Algo +Capk.expiryDate = Expiry Date +Capk = CAPK +Capk.name = Name +Capk.rid = RID +Capk.remark = Remark +Capk.version = Version +Capk.updateTs = Update Ts +Capk.updatedBy = Updated by +Capk.createTs = Create Ts +Capk.createdBy = Created by +Capk.deleteTs = Delete ts +Capk.deletedBy = Deleted by +Aid.targetPercentage = Target Percentage +Aid.trxType9C = Trx Type9 C +Aid.appSelect = App Select +Aid.categoryCode = Category Code +Aid.txnType = Txn Type +Aid.tacDenial = TAC Denial +Aid.tacOnline = TAC Online +Aid.tacDefault = TAC Default +Aid.aidVersion = AID Version +Aid.aid = AID +Aid.aidPriority = AID Priority +Aid.clTrxLimit = CL Trx Limit +Aid.clOptions = CL Options +Aid.maxTargetPercentage = Max Target Percentage +Aid.clKernelToUse = CL Kernel to Use +Aid.threshold = Threshold +Aid.clCvmLimit = CCL CVM Limit +Aid.ddol = DDOL +Aid.tdol = TDOL +Aid.floorLimit = Floor Limit +Aid.clFloorLimit = CL Floor Limit +Aid = AID +Aid.name = Name +Aid.version = Version +Aid.updateTs = Update Ts +Aid.updatedBy = Updated by +Aid.createTs = Create Ts +Aid.createdBy = Created by +Aid.deleteTs = Delete ts +Aid.deletedBy = Deleted by +Aid.remark = Remark +Aid.emvConfTermCapability=Emv conf term capability +Aid.additionalTermCapability=Additional term capability +Aid.dataTtq=Data TTQ +Issuer.onUs=On us +MerchantType=Merchant Type +MerchantType.CHAIN=Chain +MerchantType.RETAIL=Retail + diff --git a/modules/global/src/com/cmobile/unifiedtms/ext/exception/ImportFileEofEvaluationException.java b/modules/global/src/com/cmobile/unifiedtms/ext/exception/ImportFileEofEvaluationException.java new file mode 100644 index 0000000..f44c056 --- /dev/null +++ b/modules/global/src/com/cmobile/unifiedtms/ext/exception/ImportFileEofEvaluationException.java @@ -0,0 +1,29 @@ +/* + * TODO Copyright + */ + +package com.cmobile.unifiedtms.ext.exception; + +/** + * Created by aleksey on 21/10/2016. + */ +public class ImportFileEofEvaluationException extends Exception { + public ImportFileEofEvaluationException() { + } + + public ImportFileEofEvaluationException(String message) { + super(message); + } + + public ImportFileEofEvaluationException(String message, Throwable cause) { + super(message, cause); + } + + public ImportFileEofEvaluationException(Throwable cause) { + super(cause); + } + + public ImportFileEofEvaluationException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { + super(message, cause, enableSuppression, writableStackTrace); + } +} diff --git a/modules/global/src/com/cmobile/unifiedtms/ext/metadata.xml b/modules/global/src/com/cmobile/unifiedtms/ext/metadata.xml new file mode 100644 index 0000000..fa0e31f --- /dev/null +++ b/modules/global/src/com/cmobile/unifiedtms/ext/metadata.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/modules/global/src/com/cmobile/unifiedtms/ext/persistence.xml b/modules/global/src/com/cmobile/unifiedtms/ext/persistence.xml new file mode 100644 index 0000000..a6ca370 --- /dev/null +++ b/modules/global/src/com/cmobile/unifiedtms/ext/persistence.xml @@ -0,0 +1,15 @@ + + + + com.cmobile.unifiedtms.ext.entity.TerminalExt + com.cmobile.unifiedtms.ext.entity.TLESetting + com.cmobile.unifiedtms.ext.entity.PublicKeySetting + com.cmobile.unifiedtms.ext.entity.Card + com.cmobile.unifiedtms.ext.entity.Acquirer + com.cmobile.unifiedtms.ext.entity.Issuer + com.cmobile.unifiedtms.ext.entity.Capk + com.cmobile.unifiedtms.ext.entity.Aid + + diff --git a/modules/global/src/com/cmobile/unifiedtms/ext/service/CardImporterService.java b/modules/global/src/com/cmobile/unifiedtms/ext/service/CardImporterService.java new file mode 100644 index 0000000..53af1d6 --- /dev/null +++ b/modules/global/src/com/cmobile/unifiedtms/ext/service/CardImporterService.java @@ -0,0 +1,12 @@ +package com.cmobile.unifiedtms.ext.service; + +import com.haulmont.cuba.core.entity.FileDescriptor; +import com.cmobile.unifiedtms.ext.entity.Card; +import java.util.List; + +public interface CardImporterService { + String NAME = "tms_CardImporterService"; + + List parseCardsFromFile(FileDescriptor fd) throws Exception; + +} \ No newline at end of file diff --git a/modules/global/src/com/cmobile/unifiedtms/ext/service/ExportService.java b/modules/global/src/com/cmobile/unifiedtms/ext/service/ExportService.java new file mode 100644 index 0000000..fd23c47 --- /dev/null +++ b/modules/global/src/com/cmobile/unifiedtms/ext/service/ExportService.java @@ -0,0 +1,9 @@ +package com.cmobile.unifiedtms.ext.service; + +import com.cmobile.unifiedtms.ext.entity.ExportReportBean; + +public interface ExportService { + String NAME = "tms_ExportService"; + + ExportReportBean exportEntities(Class entityClass); +} \ No newline at end of file diff --git a/modules/global/src/com/cmobile/unifiedtms/ext/views.xml b/modules/global/src/com/cmobile/unifiedtms/ext/views.xml new file mode 100644 index 0000000..dcc6900 --- /dev/null +++ b/modules/global/src/com/cmobile/unifiedtms/ext/views.xml @@ -0,0 +1,184 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/web/.classpath b/modules/web/.classpath new file mode 100644 index 0000000..d58f367 --- /dev/null +++ b/modules/web/.classpath @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/web/.project b/modules/web/.project new file mode 100644 index 0000000..6389a59 --- /dev/null +++ b/modules/web/.project @@ -0,0 +1,18 @@ + + + tms-web + + + + org.eclipse.jdt.core.javanature + org.eclipse.jdt.groovy.core.groovyNature + + + + org.eclipse.jdt.core.javabuilder + + + + + + diff --git a/modules/web/.settings/org.eclipse.jdt.core.prefs b/modules/web/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..dfd883c --- /dev/null +++ b/modules/web/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,13 @@ +# +#Tue Feb 26 15:48:53 ICT 2019 +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error diff --git a/modules/web/private/cache/retriever/catalog.xml b/modules/web/private/cache/retriever/catalog.xml new file mode 100644 index 0000000..e69de29 diff --git a/modules/web/src/com/cmobile/unifiedtms/ext/rest-services.xml b/modules/web/src/com/cmobile/unifiedtms/ext/rest-services.xml new file mode 100644 index 0000000..dd3706e --- /dev/null +++ b/modules/web/src/com/cmobile/unifiedtms/ext/rest-services.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/modules/web/src/com/cmobile/unifiedtms/ext/web-app.properties b/modules/web/src/com/cmobile/unifiedtms/ext/web-app.properties new file mode 100644 index 0000000..61487ef --- /dev/null +++ b/modules/web/src/com/cmobile/unifiedtms/ext/web-app.properties @@ -0,0 +1,47 @@ +############################################################################### +# Configuration # +############################################################################### + +cuba.springContextConfig = +/com/cmobile/unifiedtms/ext/web-spring.xml + +cuba.dispatcherSpringContextConfig = +/com/cmobile/unifiedtms/ext/web-dispatcher-spring.xml + +cuba.persistenceConfig = +/com/cmobile/unifiedtms/ext/persistence.xml + +cuba.metadataConfig = +/com/cmobile/unifiedtms/ext/metadata.xml + +cuba.viewsConfig = +/com/cmobile/unifiedtms/ext/views.xml + +cuba.windowConfig = +/com/cmobile/unifiedtms/ext/web-screens.xml + +cuba.menuConfig = +/com/cmobile/unifiedtms/ext/web-menu.xml + +cuba.permissionConfig = +/com/cmobile/unifiedtms/ext/web-permissions.xml + +cuba.mainMessagePack = +com.cmobile.unifiedtms.ext.web + +cuba.anonymousSessionId = 6c3922a3-53bf-e557-aded-dfb4ec1f5d64 + +cuba.creditsConfig = + + +############################################################################### +# Other # +############################################################################### + +# Middleware connection +cuba.connectionUrlList = http://localhost:8080/tmsext-core + +# Set to false if the middleware works on different JVM +cuba.useLocalServiceInvocation = true + +cuba.webContextName = tmsext + +# Web session inactivity timeout in seconds +cuba.httpSessionExpirationTimeoutSec = 1800 + +cuba.web.theme = halo +cuba.web.foldersPaneEnabled=false +cuba.availableLocales = English|en +cuba.localeSelectVisible = false +cuba.webAppUrl = http://localhost:8080/tmsext +cuba.restApiUrl=http://localhost:8080/tmsext-portal/api diff --git a/modules/web/src/com/cmobile/unifiedtms/ext/web-dispatcher-spring.xml b/modules/web/src/com/cmobile/unifiedtms/ext/web-dispatcher-spring.xml new file mode 100644 index 0000000..5a2c54d --- /dev/null +++ b/modules/web/src/com/cmobile/unifiedtms/ext/web-dispatcher-spring.xml @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/modules/web/src/com/cmobile/unifiedtms/ext/web-menu.xml b/modules/web/src/com/cmobile/unifiedtms/ext/web-menu.xml new file mode 100644 index 0000000..f7bca64 --- /dev/null +++ b/modules/web/src/com/cmobile/unifiedtms/ext/web-menu.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + diff --git a/modules/web/src/com/cmobile/unifiedtms/ext/web-permissions.xml b/modules/web/src/com/cmobile/unifiedtms/ext/web-permissions.xml new file mode 100644 index 0000000..0c52ab0 --- /dev/null +++ b/modules/web/src/com/cmobile/unifiedtms/ext/web-permissions.xml @@ -0,0 +1,3 @@ + + + diff --git a/modules/web/src/com/cmobile/unifiedtms/ext/web-screens.xml b/modules/web/src/com/cmobile/unifiedtms/ext/web-screens.xml new file mode 100644 index 0000000..d712467 --- /dev/null +++ b/modules/web/src/com/cmobile/unifiedtms/ext/web-screens.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + diff --git a/modules/web/src/com/cmobile/unifiedtms/ext/web-spring.xml b/modules/web/src/com/cmobile/unifiedtms/ext/web-spring.xml new file mode 100644 index 0000000..105a46c --- /dev/null +++ b/modules/web/src/com/cmobile/unifiedtms/ext/web-spring.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + diff --git a/modules/web/src/com/cmobile/unifiedtms/ext/web/BrowseExportHelper.java b/modules/web/src/com/cmobile/unifiedtms/ext/web/BrowseExportHelper.java new file mode 100644 index 0000000..5f6e6f3 --- /dev/null +++ b/modules/web/src/com/cmobile/unifiedtms/ext/web/BrowseExportHelper.java @@ -0,0 +1,29 @@ +package com.cmobile.unifiedtms.ext.web; + +import com.cmobile.unifiedtms.ext.entity.ExportReportBean; +import com.cmobile.unifiedtms.ext.service.ExportService; +import com.haulmont.cuba.gui.export.ByteArrayDataProvider; +import com.haulmont.cuba.gui.export.ExportDisplay; +import org.springframework.stereotype.Component; + +import javax.inject.Inject; + +@Component(BrowseExportHelper.NAME) +public class BrowseExportHelper { + + public static final String NAME = "tmsxt_BrowseExportHelper"; + + @Inject + private ExportService exportService; + + @Inject + private ExportDisplay exportDisplay; + + public void exportEntity(Class entityClass) { + ExportReportBean exportReportBean = exportService.exportEntities(entityClass); + exportDisplay.show( + new ByteArrayDataProvider(exportReportBean.getFileContent()), + exportReportBean.getFilename() + ); + } +} diff --git a/modules/web/src/com/cmobile/unifiedtms/ext/web/acquirer/AcquirerBrowse.java b/modules/web/src/com/cmobile/unifiedtms/ext/web/acquirer/AcquirerBrowse.java new file mode 100644 index 0000000..70ae594 --- /dev/null +++ b/modules/web/src/com/cmobile/unifiedtms/ext/web/acquirer/AcquirerBrowse.java @@ -0,0 +1,6 @@ +package com.cmobile.unifiedtms.ext.web.acquirer; + +import com.haulmont.cuba.gui.components.AbstractLookup; + +public class AcquirerBrowse extends AbstractLookup { +} \ No newline at end of file diff --git a/modules/web/src/com/cmobile/unifiedtms/ext/web/acquirer/AcquirerEdit.java b/modules/web/src/com/cmobile/unifiedtms/ext/web/acquirer/AcquirerEdit.java new file mode 100644 index 0000000..2a99073 --- /dev/null +++ b/modules/web/src/com/cmobile/unifiedtms/ext/web/acquirer/AcquirerEdit.java @@ -0,0 +1,34 @@ +package com.cmobile.unifiedtms.ext.web.acquirer; + +import com.haulmont.cuba.gui.components.AbstractEditor; +import com.haulmont.cuba.gui.components.FieldGroup; +import com.cmobile.unifiedtms.ext.entity.Acquirer; +import java.util.Map; +import javax.inject.Inject; + +public class AcquirerEdit extends AbstractEditor { + + @Inject + private FieldGroup fieldGroup; + + @Override + public void init(Map params) { + super.init(params); + } + + @Override + protected void initNewItem(Acquirer item) { + super.initNewItem(item); + + item.setCheckCardExpDate(Boolean.TRUE); + } + + @Override + protected void postInit() { + super.postInit(); + + //FieldGroup.FieldConfig field = fieldGroup.getField("masterKeyLocation"); + //field.setEditable(false); + } + +} \ No newline at end of file diff --git a/modules/web/src/com/cmobile/unifiedtms/ext/web/acquirer/acquirer-browse.xml b/modules/web/src/com/cmobile/unifiedtms/ext/web/acquirer/acquirer-browse.xml new file mode 100644 index 0000000..1b8150d --- /dev/null +++ b/modules/web/src/com/cmobile/unifiedtms/ext/web/acquirer/acquirer-browse.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +