Imports System.Text

Namespace UTSModule.DbTableModel.Manage
    ''' <summary>
    ''' 用户测试命令总表
    ''' </summary>
    Public Class UtsCmdListTable
        Enum ColNamesEnum
            ID
            CmdType
            CmdName
            CmdDesc

            ''' <summary>
            ''' 修改日期
            ''' </summary>
            UpdateTime

            ParamCount

            ParamDesc1
            ParamType1
            ParamLower1
            ParamUpper1
            ParamValue1

            ParamDesc2
            ParamType2
            ParamLower2
            ParamUpper2
            ParamValue2

            ParamDesc3
            ParamType3
            ParamLower3
            ParamUpper3
            ParamValue3

            ParamDesc4
            ParamType4
            ParamLower4
            ParamUpper4
            ParamValue4

            ParamDesc5
            ParamType5
            ParamLower5
            ParamUpper5
            ParamValue5

            ParamDesc6
            ParamType6
            ParamLower6
            ParamUpper6
            ParamValue6
        End Enum

        Shared ReadOnly Property TableName() As String = "TBL_UTS_Manage_UtsCmdList"


        ''' <summary>
        ''' 建表语句
        ''' </summary>
        ''' <returns>建表语句</returns>
        Public Shared Function CreateTableString() As String
            Dim createStr As New StringBuilder
            createStr.Append($"Create Table If Not Exists `{TableName}`")
            createStr.Append(" (")
            createStr.Append($"`{ColNamesEnum.ID}` int(11) NOT NULL AUTO_INCREMENT,")
            createStr.Append($"`{ColNamesEnum.CmdType}` varchar(254) NOT NULL,")
            createStr.Append($"`{ColNamesEnum.CmdName}` varchar(254) NOT NULL,")
            createStr.Append($"`{ColNamesEnum.CmdDesc}` varchar(254) DEFAULT NULL,")

            ' createStr.Append($"{ColNamesEnum.ParamName1} varchar(64) DEFAULT NULL,")
            createStr.Append($"`{ColNamesEnum.ParamDesc1}` varchar(254) DEFAULT NULL,")
            createStr.Append($"`{ColNamesEnum.ParamType1}` varchar(254) DEFAULT NULL,")
            createStr.Append($"`{ColNamesEnum.ParamLower1}` varchar(254) DEFAULT NULL,")
            createStr.Append($"`{ColNamesEnum.ParamUpper1}` varchar(254) DEFAULT NULL,")
            createStr.Append($"`{ColNamesEnum.ParamValue1}` varchar(254) DEFAULT NULL,")

            '  createStr.Append($"{ColNamesEnum.ParamName2} varchar(64) DEFAULT NULL,")
            createStr.Append($"`{ColNamesEnum.ParamDesc2}` varchar(254) DEFAULT NULL,")
            createStr.Append($"`{ColNamesEnum.ParamType2}` varchar(254) DEFAULT NULL,")
            createStr.Append($"`{ColNamesEnum.ParamLower2}` varchar(254) DEFAULT NULL,")
            createStr.Append($"`{ColNamesEnum.ParamUpper2}` varchar(254) DEFAULT NULL,")
            createStr.Append($"`{ColNamesEnum.ParamValue2}` varchar(254) DEFAULT NULL,")

            '  createStr.Append($"{ColNamesEnum.ParamName3} varchar(64) DEFAULT NULL,")
            createStr.Append($"`{ColNamesEnum.ParamDesc3}` varchar(254) DEFAULT NULL,")
            createStr.Append($"`{ColNamesEnum.ParamType3}` varchar(254) DEFAULT NULL,")
            createStr.Append($"`{ColNamesEnum.ParamLower3}` varchar(254) DEFAULT NULL,")
            createStr.Append($"`{ColNamesEnum.ParamUpper3}` varchar(254) DEFAULT NULL,")
            createStr.Append($"`{ColNamesEnum.ParamValue3}` varchar(254) DEFAULT NULL,")

            '  createStr.Append($"{ColNamesEnum.ParamName4} varchar(64) DEFAULT NULL,")
            createStr.Append($"`{ColNamesEnum.ParamDesc4}` varchar(254) DEFAULT NULL,")
            createStr.Append($"`{ColNamesEnum.ParamType4}` varchar(254) DEFAULT NULL,")
            createStr.Append($"`{ColNamesEnum.ParamLower4}` varchar(254) DEFAULT NULL,")
            createStr.Append($"`{ColNamesEnum.ParamUpper4}` varchar(254) DEFAULT NULL,")
            createStr.Append($"`{ColNamesEnum.ParamValue4}` varchar(254) DEFAULT NULL,")

            ' createStr.Append($"{ColNamesEnum.ParamName5} varchar(64) DEFAULT NULL,")
            createStr.Append($"`{ColNamesEnum.ParamDesc5}` varchar(254) DEFAULT NULL,")
            createStr.Append($"`{ColNamesEnum.ParamType5}` varchar(254) DEFAULT NULL,")
            createStr.Append($"`{ColNamesEnum.ParamLower5}` varchar(254) DEFAULT NULL,")
            createStr.Append($"`{ColNamesEnum.ParamUpper5}` varchar(254) DEFAULT NULL,")
            createStr.Append($"`{ColNamesEnum.ParamValue5}` varchar(254) DEFAULT NULL,")

            ' createStr.Append($"{ColNamesEnum.ParamName6} varchar(64) DEFAULT NULL,")
            createStr.Append($"`{ColNamesEnum.ParamDesc6}` varchar(254) DEFAULT NULL,")
            createStr.Append($"`{ColNamesEnum.ParamType6}` varchar(254) DEFAULT NULL,")
            createStr.Append($"`{ColNamesEnum.ParamLower6}` varchar(254) DEFAULT NULL,")
            createStr.Append($"`{ColNamesEnum.ParamUpper6}` varchar(254) DEFAULT NULL,")
            createStr.Append($"`{ColNamesEnum.ParamValue6}` varchar(254) DEFAULT NULL,")

            createStr.Append($"PRIMARY KEY (`{ColNamesEnum.ID}`)")
            createStr.Append(" );")
            Return createStr.ToString()
        End Function

    End Class
End Namespace