using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Post
{
    public class ConstValuesConfig
    {
        public string CONST_EXTRACT_DBCONN = "DBCONN";
        public string CONST_EXTRACT_TABLE = "TABLE";
        public string CONST_EXTRACT_SEQUENCE = "SEQUENCE";
        public string CONST_EXTRACT_DDL = "DDL";
        public string CONST_EXTRACT_TRACINGFILE_DEST = "TRACINGFILE_DEST";
        public string CONST_EXTRACT_TRACINGFILE_SIZE = "TRACINGFILE_SIZE";
        public string CONST_EXTRACT_IN_MEMORY_TX_SIZE = "IN_MEMORY_TX_SIZE";
        public string CONST_EXTRACT_LARGE_TRANSACTION_SIZE = "LARGE_TRANSACTION_SIZE";
        public string CONST_EXTRACT_CACHE_FILE_DEST = "CACHE_FILE_DEST";
        public string CONST_EXTRACT_CACHE_MAX_SIZE = "CACHE_MAX_SIZE";
        public string CONST_EXTRACT_CONVERT_LOB_TO_CHAR = "CONVERT_LOB_TO_CHAR";
        public string CONST_EXTRACT_LOB_TO_NULL = "LOB_TO_NULL";
        public string CONST_EXTRACT_FAILED_FETCH_LOB_TO_EMPTY = "FAILED_FETCH_LOB_TO_EMPTY";
        public string CONST_EXTRACT_ARK_TDE_FILENAME = "ARK_TDE_FILENAME";
        public string CONST_EXTRACT_MAP = "MAP";
        public string CONST_EXTRACT_ARCHIVE_ONLY = "ARCHIVE_ONLY";
        public string CONST_EXTRACT_ARCHIVE_DEST = "ARCHIVE_DEST";
        public string CONST_EXTRACT_LOG_LEVEL = "LOG_LEVEL";
        public string CONST_EXTRACT_LOG_BACKUP = "LOG_BACKUP";
        public string CONST_EXTRACT_QOS = "QOS";

        public string CONST_SEND_TARGET_IP = "TARGET_IP";
        public string CONST_SEND_TARGET_PORT = "TARGET_PORT";
        public string CONST_SEND_SOURCE_TRACINGFILE = "SOURCE_TRACINGFILE";
        public string CONST_SEND_SOURCE_TRACINGFILE_DEST = "SOURCE_TRACINGFILE_DEST";
        public string CONST_SEND_TARGET_TRACINGFILE = "TARGET_TRACINGFILE";
        public string CONST_SEND_TARGET_TRACINGFILE_DEST = "TARGET_TRACINGFILE_DEST";
        public string CONST_SEND_TRANSMISSION_UNIT = "TRANSMISSION_UNIT";
        public string CONST_SEND_AUTO_DELETE = "AUTO_DELETE";
        public string CONST_SEND_SECURITY = "SECURITY";
        public string CONST_SEND_LOG_LEVEL = "LOG_LEVEL";
        public string CONST_SEND_LOG_BACKUP = "LOG_BACKUP";
        public string CONST_SEND_QOS = "QOS";

        public string CONST_POST_DBCONN = "DBCONN";
        public string CONST_POST_TRACINGFILE_DEST = "TRACINGFILE_DEST";
        public string CONST_POST_TRACINGFILE = "TRACINGFILE";
        public string CONST_POST_AUTO_DELETE = "AUTO_DELETE";
        public string CONST_POST_TABLE = "TABLE";
        public string CONST_POST_MAP = "MAP";
        public string CONST_POST_SQL_LOGGING_TYPE = "SQL_LOGGING_TYPE";
        public string CONST_POST_LOG_LEVEL = "LOG_LEVEL";
        public string CONST_POST_LOG_BACKUP = "LOG_BACKUP";
        public string CONST_POST_ADJUST_COLLISIONS = "ADJUST_COLLISIONS";
        public string CONST_POST_GROUP_TRANSACTION = "GROUP_TRANSACTION";
        public string CONST_POST_MULTI_DML_SIZE = "MULTI_DML_SIZE";
        public string CONST_POST_IGNORE_DB_ERROR = "IGNORE_DB_ERROR";
        public string CONST_POST_IGNORE_DB_ERROR_CODE = "IGNORE_DB_ERROR_CODE";
        public string CONST_POST_QOS = "QOS";
        public string CONST_POST_DELAY = "DELAY";
        public string CONST_POST_LAST_SCN = "LAST_SCN";
        public string CONST_POST_LAST_TIMESTAMP = "LAST_TIMESTAMP";
        public string CONST_POST_EXECUTE_DML = "EXECUTE_DML";
        public string CONST_POST_EXECUTE_DDL = "EXECUTE_DDL";
        // # 추가
        public string CONST_POST_DB_TYPE = "DB_TYPE";
        public string CONST_POST_CREATE_TABLE = "CREATE_TABLE";

        public string CONST_CONN_IP = "IP";
        public string CONST_CONN_PORT = "PORT";
        public string CONST_CONN_DBNAME = "DBNAME";
        public string CONST_CONN_USERNAME = "USERNAME";
        public string CONST_CONN_PASSWORD = "PASSWORD";

        public string CONST_GLOBAL_DBCONN = "DBCONN";
        public string CONST_GLOBAL_TRACINGFILE_DEST = "TRACINGFILE_DEST";
        public string CONST_GLOBAL_TRACINGFILE_SIZE = "TRACINGFILE_SIZE";
        public string CONST_GLOBAL_AUTO_DELETE = "AUTO_DELETE";
        public string CONST_GLOBAL_LARGE_TRANSACTION_SIZE = "LARGE_TRANSACTION_SIZE";
        public string CONST_GLOBAL_CACHE_FILE_DEST = "CACHE_FILE_DEST";
        public string CONST_GLOBAL_CACHE_MAX_SIZE = "CACHE_MAX_SIZE";
        public string CONST_GLOBAL_SQL_LOGGING_TYPE = "SQL_LOGGING_TYPE";
        public string CONST_GLOBAL_LOG_LEVEL = "LOG_LEVEL";
        public string CONST_GLOBAL_LOG_BACKUP = "LOG_BACKUP";
        public string CONST_GLOBAL_SECURITY = "SECURITY";

        public string CONST_AGENT_IP = "IP";
        public string CONST_AGENT_PORT = "PORT";
        public string CONST_AGENT_PROTOCOL_TYPE = "PROTOCOL_TYPE";
        public string CONST_AGENT_RECV_PORTRANGE = "RECV_PORTRANGE";
        public string CONST_AGENT_DATA_PORTRANGE = "DATA_PORTRANGE";
        public string CONST_AGENT_LOG_LEVEL = "LOG_LEVEL";
        public string CONST_AGENT_LOG_BACKUP = "LOG_BACKUP";
        public string CONST_AGENT_SEND_EMAIL_ALERT = "SEND_EMAIL_ALERT";
        public string CONST_AGENT_EMAIL_SEND_ADDRESS = "EMAIL_SEND_ADDRESS";
        public string CONST_AGENT_EMAIL_RECV_ADDRESS = "EMAIL_RECV_ADDRESS";
        public string CONST_AGENT_SMTP_TYPE = "SMTP_TYPE";
        public string CONST_AGENT_SMTP_SERVER = "SMTP_SERVER";
        public string CONST_AGENT_SMTP_PORT = "SMTP_PORT";
        public string CONST_AGENT_SMTP_ID = "SMTP_ID";
        public string CONST_AGENT_SMTP_PASSWORD = "SMTP_PASSWORD";

        public string CONST_APC_PID = "process id";
        public string CONST_APC_HOSTNAME = "hostname";
        public string CONST_APC_USER = "user";
        public string CONST_APC_DBTYPE = "dbtype";
        public string CONST_APC_ID = "id";
        public string CONST_APC_STIME = "start time";

        public string CONST_MPC_PID = "process id";
        public string CONST_MPC_HOSTNAME = "hostname";
        public string CONST_MPC_USER = "user";
        public string CONST_MPC_DBTYPE = "dbtype";
        public string CONST_MPC_STIME = "start time";
        public string CONST_MPC_STATUS = "status";
        public string CONST_MPC_CODE = "code";

        public string CONST_STATISTICS_START_SCN = "START SCN";
        public string CONST_STATISTICS_END_SCN = "END SCN";
        public string CONST_STATISTICS_DML = "DML";
        public string CONST_STATISTICS_INSERT = "INSERT";
        public string CONST_STATISTICS_UPDATE = "UPDATE";
        public string CONST_STATISTICS_DELETE = "DELETE";
        public string CONST_STATISTICS_FILTERED_INSERT = "FILTERED - INSERT";
        public string CONST_STATISTICS_FILTERED_UPDATE = "FILTERED - UPDATE";
        public string CONST_STATISTICS_FILTERED_DELETE = "FILTERED - DELETE";
        public string CONST_STATISTICS_IGNORED = "IGNORED";
        public string CONST_STATISTICS_DDL = "DDL";
        public string CONST_STATISTICS_CREATE = "CREATE";
        public string CONST_STATISTICS_ALTER = "ALTER";
        public string CONST_STATISTICS_DROP = "DROP";
        public string CONST_STATISTICS_TRUNCATE = "TRUNCATE";
        public string CONST_STATISTICS_GRANT_REVOKE = "GRANT/REVOKE";
        public string CONST_STATISTICS_DEFINITION = "DEFINITION";
        public string CONST_STATISTICS_OUTLINE_LOB = "OUTLINE LOB";

        public string CONST_DEFAULT_TRACINGFILE_DEST = "trace";
        public string CONST_DEFAULT_DBCONN = "default";
        public string CONST_DEFAULT_AUTO_DELETE = "no";
        public string CONST_DEFAULT_SECURITY = "plain";
        public string CONST_DEFAULT_TRACINGFILE_SIZE = "50M";     // 52428800
        public string CONST_DEFAULT_LARGE_TRANSACTION_SIZE = "128M";    // 134217728
        public string CONST_DEFAULT_CACHE_FILE_DEST = "cache";
        public string CONST_DEFAULT_IN_MEMORY_TX_SIZE = "128M";   // 134217728
        public string CONST_DEFAULT_CACHE_MAX_SIZE = "64G";   // 4294967296
        public string CONST_DEFAULT_LOG_LEVEL = "INFO";
        public string CONST_DEFAULT_LOG_BACKUP = "all";
        public string CONST_DEFAULT_LOGGING_TYPE = "no";
        public string CONST_DEFAULT_SEND_EMAIL_ALERT = "no";
        public string CONST_DEFAULT_ADJUST_COLLISIONS = "no";
        public string CONST_DEFAULT_PROTOCOL_TYPE = "http";
        public string CONST_DEFAULT_CONN_IP = "127.0.0.1";
        public string CONST_DEFAULT_SQL_LOGGING_TYPE = "no";
        public string CONST_DEFAULT_DELAY = "0";
        public string CONST_DEFAULT_ARCHIVE_ONLY = "no";
        public string CONST_DEFAULT_TRANSMISSION_UNIT = "8M";
        public string CONST_DEFAULT_LOB_TO_NULL = "no";
        public string CONST_DEFAULT_FAILED_FETCH_LOB_TO_EMPTY = "no";
        public string CONST_DEFAULT_IGNORE_DB_ERROR = "no";
        public string CONST_DEFAULT_EXECUTE_DML = "yes";
        public string CONST_DEFAULT_EXECUTE_DDL = "yes";
        public string CONST_DEFAULT_SMTP_TYPE = "UNKNOWN";
        public int CONST_DEFAULT_QOS = 0;
        public int CONST_DEFAULT_PORT = 11811;
        public int CONST_DEFAULT_CONN_PORT_ORACLE = 1521;
        public int CONST_DEFAULT_CONN_PORT_SQLSERVER = 1433;
        public int CONST_DEFAULT_GROUP_TRANSACTION = 1000;
        public int CONST_DEFAULT_SMTP_PORT = 25;
        public int CONST_DEFAULT_MULTI_DML_SIZE = 100;

        public int CONST_STATUS_MODULE_CODE_RUNNING = 1;
        public int CONST_STATUS_MODULE_CODE_WAITING = 2;
        public int CONST_STATUS_MODULE_CODE_STOPPED = 3;
        public int CONST_STATUS_MODULE_CODE_ERROR = 4;

        public string CONST_STATUS_MODULE_MSG_RUNNING = "Running";
        public string CONST_STATUS_MODULE_MSG_WAITING = "Waiting";
        public string CONST_STATUS_MODULE_MSG_STOPPED = "Stopped";
        public string CONST_STATUS_MODULE_MSG_ERROR = "Error";

        public int CONST_STATUS_AGENT_ERROR_DB_CONN = 1001;
        public int CONST_STATUS_AGENT_ERROR_LICENSE_EXPIRED = 1002;
        public int CONST_STATUS_AGENT_ERROR_LICENSE_WRONG = 1003;
        public int CONST_STATUS_AGENT_ERROR_LICENSE_MISSING = 1004;
        public int CONST_STATUS_AGENT_ERROR_CONFIG_LOAD = 1005;
        public int CONST_STATUS_AGENT_ERROR_UNKNOWN = 1000;

        public int CONST_STATUS_EXTRACT_MPC_CODE_RUNNING = 10001;
        public int CONST_STATUS_EXTRACT_MPC_CODE_STOPPED = 10002;
        public int CONST_STATUS_EXTRACT_MPC_CODE_WAIT_REDO = 10003;
        public int CONST_STATUS_EXTRACT_MPC_CODE_ERROR_UNKNOWN = 10000;
        public int CONST_STATUS_EXTRACT_MPC_CODE_ERROR_CONFIG_ERROR = 10100;
        public int CONST_STATUS_EXTRACT_MPC_CODE_ERROR_DB_CONNECT_FAIL = 10200;
        public int CONST_STATUS_EXTRACT_MPC_CODE_ERROR_DB_PWD_DECRYPT_FAIL = 10001;

        public string CONST_STATUS_EXTRACT_MPC_MSG_RUNNING = "The module is running.";
        public string CONST_STATUS_EXTRACT_MPC_MSG_STOPPED = "The module has been stopped.";
        public string CONST_STATUS_EXTRACT_MPC_MSG_WAIT_REDO = "Waiting for redo record";
        public string CONST_STATUS_EXTRACT_MPC_MSG_ERROR_UNKNOWN = "Module stopped for UNKNOWN ERROR";
        public string CONST_STATUS_EXTRACT_MPC_MSG_ERROR_CONFIG_ERROR = "There is an error in the configuration.";
        public string CONST_STATUS_EXTRACT_MPC_MSG_ERROR_DB_CONNECT_FAIL = "Database connection failed.";
        public string CONST_STATUS_EXTRACT_MPC_MSG_ERROR_DB_PWD_DECRYPT_FAIL = "Failed to decrypt the Database Password.";

        public int CONST_STATUS_SEND_RECV_MPC_CODE_RUNNING = 20001;
        public int CONST_STATUS_SEND_RECV_MPC_CODE_STOPPED = 20002;
        public int CONST_STATUS_SEND_RECV_MPC_CODE_WAITING = 20003;
        public int CONST_STATUS_SEND_RECV_MPC_CODE_ERROR_UNKNOWN = 20000;
        public int CONST_STATUS_SEND_RECV_MPC_CODE_ERROR_SOCKET = 20004;
        public int CONST_STATUS_SEND_RECV_MPC_CODE_ERROR_CONFIG = 20005;
        public int CONST_STATUS_SEND_RECV_MPC_CODE_ERROR_REJECT = 20006;

        public string CONST_STATUS_SEND_RECV_MPC_MSG_RUNNING = "The module is running.";
        public string CONST_STATUS_SEND_RECV_MPC_MSG_STOPPED = "The module has been stopped.";
        public string CONST_STATUS_SEND_RECV_MPC_MSG_WAITING = "Waiting for record to transfer.";
        public string CONST_STATUS_SEND_RECV_MPC_MSG_ERROR_UNKNOWN = "The state is unknown.";
        public string CONST_STATUS_SEND_RECV_MPC_MSG_ERROR_SOCKET = "The socket connection has been disconnected.";
        public string CONST_STATUS_SEND_RECV_MPC_MSG_ERROR_CONFIG = "There is an error in the configuration.";
        public string CONST_STATUS_SEND_RECV_MPC_MSG_ERROR_REJECT = "The recv request was rejected.";

        public int CONST_STATUS_POST_MPC_CODE_RUNNING = 30001;
        public int CONST_STATUS_POST_MPC_CODE_STOPPED = 30002;
        public int CONST_STATUS_POST_MPC_CODE_WAITING = 30003;
        public int CONST_STATUS_POST_MPC_CODE_ERROR_UNKNOWN = 30000;
        public int CONST_STATUS_POST_MPC_CODE_ERROR_CONFIG = 30100;
        public int CONST_STATUS_POST_MPC_CODE_ERROR_DB_CONNECT = 30200;
        public int CONST_STATUS_POST_MPC_CODE_ERROR_DB_PWD = 30201;
        public int CONST_STATUS_POST_MPC_CODE_ERROR_DDL = 30202;
        public int CONST_STATUS_POST_MPC_CODE_ERROR_DML = 30203;

        public string CONST_STATUS_POST_MPC_MSG_RUNNING = "The module is running.";
        public string CONST_STATUS_POST_MPC_MSG_STOPPED = "The module has been stopped.";
        public string CONST_STATUS_POST_MPC_MSG_WAITING = "Waiting for Tracing record reading.";
        public string CONST_STATUS_POST_MPC_MSG_ERROR_UNKNOWN = "Module stopped for UNKNOWN ERROR.";
        public string CONST_STATUS_POST_MPC_MSG_ERROR_CONFIG = "There is an error in the configuration.";
        public string CONST_STATUS_POST_MPC_MSG_ERROR_DB_CONNECT = "Database connection failed.";
        public string CONST_STATUS_POST_MPC_MSG_ERROR_DB_PWD = "Failed to decrypt the Database Password.";
        public string CONST_STATUS_POST_MPC_MSG_ERROR_DDL = "DDL statement execution failed.";
        public string CONST_STATUS_POST_MPC_MSG_ERROR_DML = "DML statement execution failed.";

        #region mapper
        // convert type
        public int CONST_MAPPER_TYPE_CONVERT_TONUM = 1;    // 타입을 숫자로 변경
        public int CONST_MAPPER_TYPE_CONVERT_TOSTR = 2;    // 타입을 문자열로 변경        
        public int CONST_MAPPER_TYPE_CONVERT_TODATE = 3;    // 타입을 DATE로 변경         
        public int CONST_MAPPER_TYPE_CONVERT_TOTIMESTAMP = 4;    // 타입을 TIMESTAMP로 변경        
        public int CONST_MAPPER_TYPE_CONVERT_TOINTERVALYM = 5;    // 타입을 INTERVALYM로 변경
        public int CONST_MAPPER_TYPE_CONVERT_TOINTERVALDS = 6;    // 타입을 INTERVALDS로 변경        

        // condition type
        public int CONST_MAPPER_TYPE_CONDITION_NORMAL = 1;    // column = value
        public int CONST_MAPPER_TYPE_CONDITION_RANGE = 2;    // RANGE(기준값,시작값,끝값), 
        public int CONST_MAPPER_TYPE_CONDITION_RANGE_NOT = 3;    // !RANGE(기준값,시작값,끝값)
        public int CONST_MAPPER_TYPE_CONDITION_NOT = 4;    // NOT(조건)
        public int CONST_MAPPER_TYPE_CONDITION_NOT_NOT = 5;    // !NOT(조건)

        // comparision type 
        public int CONST_MAPPER_TYPE_COMPARISION_EQUAL = 1;
        public int CONST_MAPPER_TYPE_COMPARISION_NOT_EQUAL = 2;
        public int CONST_MAPPER_TYPE_COMPARISION_GREATER = 3;
        public int CONST_MAPPER_TYPE_COMPARISION_GREATER_EQUAL = 4;
        public int CONST_MAPPER_TYPE_COMPARISION_LESS = 5;
        public int CONST_MAPPER_TYPE_COMPARISION_LESS_EQUAL = 6;

        // math type
        public int CONST_MAPPER_TYPE_MATH_PLUS = 1;
        public int CONST_MAPPER_TYPE_MATH_MINUS = 2;
        public int CONST_MAPPER_TYPE_MATH_MULTIPLY = 3;
        public int CONST_MAPPER_TYPE_MATH_DIVIDE = 4;
        public int CONST_MAPPER_TYPE_MATH_REMAINDER = 5;
        public int CONST_MAPPER_TYPE_MATH_REPLACE = 6;

        // replace type
        public int CONST_MAPPER_TYPE_REPLACE_STRREP = 100;
        public int CONST_MAPPER_TYPE_REPLACE_STRUPPER = 101;
        public int CONST_MAPPER_TYPE_REPLACE_STRLOWER = 102;
        public int CONST_MAPPER_TYPE_REPLACE_STRTRIM = 103;
        public int CONST_MAPPER_TYPE_REPLACE_STRADD = 104;
        public int CONST_MAPPER_TYPE_REPLACE_STRSUB = 105;
        public int CONST_MAPPER_TYPE_REPLACE_STRTOK = 106;
        public int CONST_MAPPER_TYPE_REPLACE_STRSTR = 107;
        public int CONST_MAPPER_TYPE_REPLACE_STRMASK = 108;
        public int CONST_MAPPER_TYPE_REPLACE_STRLEN = 109;
        public int CONST_MAPPER_TYPE_REPLACE_STREXT = 110;
        public int CONST_MAPPER_TYPE_REPLACE_NUM = 200;

        // mapper string
        public string CONST_MAPPER_STR_PREFIX = "prefix";
        public string CONST_MAPPER_STR_SUFFIX = "suffix";
        public string CONST_MAPPER_STR_TONUM = "TONUM";
        public string CONST_MAPPER_STR_TOSTR = "TOSTR";
        public string CONST_MAPPER_STR_TODATE = "TODATE";
        public string CONST_MAPPER_STR_TOTIMESTAMP = "TOTIMESTAMP";
        public string CONST_MAPPER_STR_TOINTERVALYM = "TOINTERVALYM";
        public string CONST_MAPPER_STR_TOINTERVALDS = "TOINTERVALDS";
        public string CONST_MAPPER_STR_WHERE = "where";
        public string CONST_MAPPER_STR_FILTER = "filter";
        public string CONST_MAPPER_STR_REPLACE = "replace";
        public string CONST_MAPPER_STR_CHANGELOG = "changelog";
        public string CONST_MAPPER_STR_KEYCOLUMNS = "key_columns";
        public string CONST_MAPPER_STR_NUM = "NUM";
        public string CONST_MAPPER_STR_STRREP = "STRREP";
        public string CONST_MAPPER_STR_STRUPPER = "STRUPPER";
        public string CONST_MAPPER_STR_STRLOWER = "STRLOWER";
        public string CONST_MAPPER_STR_STRTRIM = "STRTRIM";
        public string CONST_MAPPER_STR_STRADD = "STRADD";
        public string CONST_MAPPER_STR_STRSUB = "STRSUB";
        public string CONST_MAPPER_STR_STRTOK = "STRTOK";
        public string CONST_MAPPER_STR_STRSTR = "STRSTR";
        public string CONST_MAPPER_STR_STRMASK = "STRMASK";
        public string CONST_MAPPER_STR_STRLEN = "STRLEN";
        public string CONST_MAPPER_STR_STREXT = "STREXT";

        public string CONST_MAPPER_STR_ONINSERT = "ONINSERT";
        public string CONST_MAPPER_STR_ONUPDATE = "ONUPDATE";
        public string CONST_MAPPER_STR_ONDELETE = "ONDELETE";
        public string CONST_MAPPER_STR_CHGFLAG = "CHGFLAG";
        public string CONST_MAPPER_STR_SYSTIMESTAMP = "SYSTIMESTAMP";
        public string CONST_MAPPER_STR_NOT = "NOT";
        public string CONST_MAPPER_STR_NOT_NOT = "!NOT";
        public string CONST_MAPPER_STR_RANGE = "RANGE";
        public string CONST_MAPPER_STR_RANGE_NOT = "!RANGE";
        #endregion





        // version 1
        public int CONST_MAPPER_TYPE_REPLACE_STR = 1;
        public string CONST_MAPPER_STR_STR = "STR";
    }
}
