using System; using Microsoft.EntityFrameworkCore.Migrations; using MySql.EntityFrameworkCore.Metadata; namespace WebUI.Migrations { public partial class _202207221635 : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "NEW_TABLE_UPDATE_TIME_MARK", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "id,自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), NEW_DB_TABLE_NAME = table.Column(type: "nvarchar(100)", nullable: true, comment: "同步的表名 "), LAST_UPDATE_TIME = table.Column(type: "DATETIME", nullable: true, comment: "最后同步时间") }, constraints: table => { table.PrimaryKey("PK_NEW_TABLE_UPDATE_TIME_MARK", x => x.ID); }, comment: "数据同步对照表"); migrationBuilder.CreateTable( name: "TBL_CSERIES_BASICDATA", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), PROJECTNAME = table.Column(type: "nvarchar(20)", nullable: true, comment: "项目名称"), ROOMNUMBER = table.Column(type: "int", nullable: false, comment: "房间号"), ROOMTYPE = table.Column(type: "nvarchar(20)", nullable: true, comment: "房型"), MAC = table.Column(type: "nvarchar(20)", nullable: true, comment: "MAC地址"), INNERNETIP = table.Column(type: "nvarchar(20)", nullable: true, comment: "内网IP"), PUBLICIP = table.Column(type: "nvarchar(20)", nullable: true, comment: "公网IP"), ENTERNETTIME = table.Column(type: "datetime", nullable: false, comment: "入网时间") }, constraints: table => { table.PrimaryKey("PK_TBL_CSERIES_BASICDATA", x => x.ID); }); migrationBuilder.CreateTable( name: "TBL_CSERIES_CONFIGDATA", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), CONFIGVERSION = table.Column(type: "text", nullable: true), CONFIGDATA = table.Column(type: "varbinary(4000)", nullable: true) }, constraints: table => { table.PrimaryKey("PK_TBL_CSERIES_CONFIGDATA", x => x.ID); }); migrationBuilder.CreateTable( name: "TBL_CSERIES_DEVCONFIGLISTS", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), PROJECTNUMBER = table.Column(type: "text", nullable: true), ROOMTYPE = table.Column(type: "text", nullable: true), CONFIGVERSION = table.Column(type: "text", nullable: true), HOSTTYPENUMBER = table.Column(type: "text", nullable: true), DEVPORT = table.Column(type: "text", nullable: true), DEVNAME = table.Column(type: "text", nullable: true), DEVTYPE = table.Column(type: "text", nullable: true), DEVTYPENUMBER = table.Column(type: "text", nullable: true), DEVPROTOCOL = table.Column(type: "text", nullable: true), DEVBAUD = table.Column(type: "text", nullable: true), DEVADDRESS = table.Column(type: "int", nullable: true), REMARKS = table.Column(type: "text", nullable: true) }, constraints: table => { table.PrimaryKey("PK_TBL_CSERIES_DEVCONFIGLISTS", x => x.ID); }); migrationBuilder.CreateTable( name: "TBL_CSERIES_DEVLISTS", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), DEVTYPENUMBER = table.Column(type: "text", nullable: true), DEVTYPE = table.Column(type: "text", nullable: true), DEVNAME = table.Column(type: "text", nullable: true), DEVPROTOCOL = table.Column(type: "text", nullable: true), DEVBAUD = table.Column(type: "text", nullable: true), FUNCTIONALEXPLAIN = table.Column(type: "text", nullable: true), REMARKS = table.Column(type: "text", nullable: true) }, constraints: table => { table.PrimaryKey("PK_TBL_CSERIES_DEVLISTS", x => x.ID); }); migrationBuilder.CreateTable( name: "TBL_CSERIES_HOSTTYPENUMBERLISTS", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), HOSTTYPENUMBER = table.Column(type: "nvarchar(20)", nullable: true, comment: "主机型号"), PORTNUMBER = table.Column(type: "nvarchar(20)", nullable: true, comment: "端口号"), PORTEXPLAIN = table.Column(type: "nvarchar(250)", nullable: true, comment: "端口说明"), REMARKS = table.Column(type: "nvarchar(520)", nullable: true, comment: "备注") }, constraints: table => { table.PrimaryKey("PK_TBL_CSERIES_HOSTTYPENUMBERLISTS", x => x.ID); }); migrationBuilder.CreateTable( name: "TBL_CSERIES_PROJECTLISTS", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), PROJECTNUMBER = table.Column(type: "nvarchar(20)", nullable: true, comment: "项目编号"), PROJECTNAME = table.Column(type: "nvarchar(20)", nullable: true, comment: "房间编号"), PROJECTADDRESS = table.Column(type: "nvarchar(250)", nullable: true, comment: "项目地址"), REMARKS = table.Column(type: "nvarchar(520)", nullable: true, comment: "备注") }, constraints: table => { table.PrimaryKey("PK_TBL_CSERIES_PROJECTLISTS", x => x.ID); }); migrationBuilder.CreateTable( name: "TBL_CSERIES_PROJECTROOMLISTS", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), PROJECTNUMBER = table.Column(type: "int", nullable: true, comment: "项目编号"), ROOMNUMBER = table.Column(type: "nvarchar(20)", nullable: true, comment: "房间编号"), ROOMTYPE = table.Column(type: "nvarchar(20)", nullable: true, comment: "房型"), CURRENTSTATE = table.Column(type: "nvarchar(20)", nullable: true, comment: "当前状态"), HOSTMAC = table.Column(type: "nvarchar(50)", nullable: true, comment: "主机MAC地址"), CONFIGVERSION = table.Column(type: "nvarchar(50)", nullable: true, comment: "配置版本号"), LASTCOMMTIME = table.Column(type: "nvarchar(50)", nullable: true, comment: "最后一次通讯时间"), REMARKS = table.Column(type: "nvarchar(520)", nullable: true, comment: "备注") }, constraints: table => { table.PrimaryKey("PK_TBL_CSERIES_PROJECTROOMLISTS", x => x.ID); }); migrationBuilder.CreateTable( name: "TBL_CSERIES_ROOMTYPELISTS", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), PROJECTNUMBER = table.Column(type: "nvarchar(20)", nullable: true, comment: "项目编号"), ROOMTYPE = table.Column(type: "nvarchar(20)", nullable: true, comment: "房型"), REMARKS = table.Column(type: "nvarchar(520)", nullable: true, comment: "备注") }, constraints: table => { table.PrimaryKey("PK_TBL_CSERIES_ROOMTYPELISTS", x => x.ID); }); migrationBuilder.CreateTable( name: "TBL_DEV_INFO", columns: table => new { DEV_ID = table.Column(type: "int", nullable: false, comment: "id,自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), ERP_PN = table.Column(type: "nvarchar(100)", nullable: true, comment: "ERP对应的料号 "), DEV_TYPE = table.Column(type: "int", nullable: false, comment: "设备类型 "), DEV_NAME = table.Column(type: "nvarchar(100)", nullable: true, comment: "设备名称 "), DEV_TYPE_DATA = table.Column(type: "nvarchar(100)", nullable: true, comment: "设备类型数据编码 "), PROTOCOL = table.Column(type: "nvarchar(100)", nullable: true, comment: "设备协议 "), PROTOCOL_DATA = table.Column(type: "nvarchar(100)", nullable: true, comment: "设备协议数据编码 "), PROTOCOL_VER = table.Column(type: "nvarchar(100)", nullable: true, comment: "协议版本 "), DEV_INTERFACE = table.Column(type: "nvarchar(100)", nullable: true, comment: "设备接口类型 "), DEV_BRAND = table.Column(type: "nvarchar(100)", nullable: true, comment: "设备厂牌 "), DEV_MN = table.Column(type: "nvarchar(100)", nullable: true, comment: "设备型号 "), DEV_DESCRIPTION = table.Column(type: "nvarchar(100)", nullable: true, comment: "设备详细描述 "), DEV_DATA_MODEL = table.Column(type: "nvarchar(100)", nullable: true, comment: "数据模型(XML格式的文件) "), DEV_DATA_MODEL_VER = table.Column(type: "nvarchar(100)", nullable: true, comment: "数据模型版本 "), DEV_STATUS = table.Column(type: "int", nullable: false, comment: "设备状态 "), DEV_UNIT = table.Column(type: "nvarchar(100)", nullable: true, comment: "设备单位 "), DEV_NET_WEIGHT = table.Column(type: "int", nullable: false, comment: "设备重量 "), DEV_REF_PRICE_CURR = table.Column(type: "nvarchar(100)", nullable: true, comment: "价格币种 "), DEV_REF_PRICE = table.Column(type: "decimal(18, 2)", nullable: false, comment: "参考价格 "), CREATE_BY = table.Column(type: "nvarchar(100)", nullable: true, comment: "录入人 "), CREATE_DATETIME = table.Column(type: "datetime", nullable: false, comment: "录入时间"), APP_BY = table.Column(type: "nvarchar(100)", nullable: true, comment: "批准人 "), APP_DATETIME = table.Column(type: "datetime", nullable: true, comment: "批准时间"), REMARK = table.Column(type: "nvarchar(520)", nullable: true, comment: "备注") }, constraints: table => { table.PrimaryKey("PK_TBL_DEV_INFO", x => x.DEV_ID); }, comment: "设备信息列表 记录所有设备的信息列表,供配置工具调用"); migrationBuilder.CreateTable( name: "TBL_DEV_INFO_CHG_LOG", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "id,自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), DEV_ID = table.Column(type: "int", nullable: false, comment: "设备id"), TYPE = table.Column(type: "int", nullable: false, comment: "日志类型"), DATETIME = table.Column(type: "datetime", nullable: false, comment: "日期"), DESCRIPTION = table.Column(type: "nvarchar(100)", nullable: true, comment: "描述"), ACCOUNT = table.Column(type: "nvarchar(100)", nullable: true, comment: "操作账号"), LOCATION = table.Column(type: "nvarchar(100)", nullable: true, comment: "地址"), IP = table.Column(type: "nvarchar(100)", nullable: true, comment: "操作IP"), UPDATE_TIMEMARK = table.Column(type: "datetime", nullable: true, comment: "记录更新时间"), REMARK = table.Column(type: "nvarchar(520)", nullable: true, comment: "备注") }, constraints: table => { table.PrimaryKey("PK_TBL_DEV_INFO_CHG_LOG", x => x.ID); }, comment: "设备信息列表更新日志"); migrationBuilder.CreateTable( name: "TBL_EVENTLOGGING", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "id,自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), EVENT_TYPE = table.Column(type: "nvarchar(50)", nullable: true, comment: "type类型"), EVENTLOGGING_ID = table.Column(type: "nvarchar(100)", nullable: true, comment: "事件id,一个事件多个记录id唯一"), REGISTRAR = table.Column(type: "nvarchar(100)", nullable: true, comment: "记录创建者 不是事件创建者 最早一条记录创建者才是 事件创建者"), INPUT_DATeTime = table.Column(type: "datetime", nullable: false, comment: "创建时间"), REMARK = table.Column(type: "nvarchar(520)", nullable: true, comment: "备注"), STEPRECORDING = table.Column(type: "nvarchar(100)", nullable: true, comment: "步骤记录"), INFO = table.Column(type: "nvarchar(500)", nullable: true, comment: "信息"), ROLE = table.Column(type: "nvarchar(100)", nullable: true, comment: "角色 RCU WEB RLS"), MAC = table.Column(type: "nvarchar(100)", nullable: true, comment: "MAC"), HOTEL_ID = table.Column(type: "int", nullable: false, comment: "酒店id"), HOTEL_OLD_ID = table.Column(type: "int", nullable: false, comment: " 酒店编号 巫工 "), ROOM_ID = table.Column(type: "int", nullable: false, comment: "房间id"), ROOM_OLD_ID = table.Column(type: "int", nullable: false, comment: " 房间id 巫工 "), OUTPUT_DATETIME = table.Column(type: "datetime", nullable: false, comment: "输出时间") }, constraints: table => { table.PrimaryKey("PK_TBL_EVENTLOGGING", x => x.ID); }, comment: "事件记录表"); migrationBuilder.CreateTable( name: "TBL_FIRMWARE_UPLOAD_LOGS", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "id,自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), DateTime = table.Column(type: "datetime", nullable: false, comment: "日期"), AppType = table.Column(type: "nvarchar(100)", nullable: true, comment: "AppType 适用类型(Launcher、App、etc.)"), AppForModel = table.Column(type: "nvarchar(100)", nullable: true, comment: "AppForModel 适用机型"), FilePath = table.Column(type: "nvarchar(100)", nullable: true, comment: "FilePath 文件存放路径(以BLV_Studio为相对根路径)"), FileName = table.Column(type: "nvarchar(100)", nullable: true, comment: "FileName 固件文件名"), Ver = table.Column(type: "nvarchar(50)", nullable: true, comment: "Ver 固件版本"), MD5Val = table.Column(type: "nvarchar(50)", nullable: true, comment: "MD5Val 固件MD5校验值"), Handler = table.Column(type: "nvarchar(50)", nullable: true, comment: "Handler 处理人"), Remark = table.Column(type: "nvarchar(520)", nullable: true, comment: "Remark 备注"), PC_MAC = table.Column(type: "nvarchar(50)", nullable: true, comment: "PC_MAC 上传人PC网卡MAC"), PC_NAME = table.Column(type: "nvarchar(50)", nullable: true, comment: "PC_NAME 上传人PC用户名"), Luncher_Ver = table.Column(type: "nvarchar(50)", nullable: true, comment: "LUNCHER_VER 版本"), IsValid = table.Column(type: "tinyint(1)", nullable: false, comment: "是否有效"), ROOM_TYPE_ID = table.Column(type: "int", nullable: false, comment: "房型id q取值的 ROOM_TYPE_OLD_ID 房型id"), HOTEL_ID = table.Column(type: "int", nullable: false, comment: "酒店id q取值 TBL_ROOM_TYPE_LIST表 HOTEL_OLD_ID 酒店id ") }, constraints: table => { table.PrimaryKey("PK_TBL_FIRMWARE_UPLOAD_LOGS", x => x.ID); }, comment: "RCU 固件上传记录:"); migrationBuilder.CreateTable( name: "TBL_HOTEL_BASIC_INFO", columns: table => new { HOTEL_ID = table.Column(type: "int", nullable: false, comment: "酒店id,自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), PROJECT_NUMBER = table.Column(type: "nvarchar(20)", nullable: false, comment: "项目编号"), HOTEL_NAME_CN = table.Column(type: "nvarchar(100)", nullable: false, comment: "酒店名称,简体中文,必要"), HOTEL_NAME_EN = table.Column(type: "nvarchar(100)", nullable: true, comment: "酒店名称-英文 "), HOTEL_NAME_TW = table.Column(type: "nvarchar(100)", nullable: true, comment: "酒店名称-繁中 "), NATIONAL = table.Column(type: "nvarchar(50)", nullable: true, comment: "国家"), PROVICE = table.Column(type: "nvarchar(50)", nullable: true, comment: "省"), CITY = table.Column(type: "nvarchar(50)", nullable: true, comment: "市"), TOWN = table.Column(type: "nvarchar(50)", nullable: true, comment: "区"), DETAIL_ADD = table.Column(type: "nvarchar(255)", nullable: true, comment: "详细地址"), KEY_Name = table.Column(type: "nvarchar(50)", nullable: true, comment: "录入人"), KEY_ID = table.Column(type: "INT", nullable: false, comment: "录入人id"), KEY_IN_DATETIME = table.Column(type: "datetime", nullable: false, comment: "录入时间"), IsApprove = table.Column(type: "bit", nullable: false, comment: "是否授权 审核"), APPROVE = table.Column(type: "int", nullable: true, comment: "审核人"), APPROVE_DATE = table.Column(type: "datetime", nullable: true, comment: "审核时间"), HOTEL_BRAND = table.Column(type: "nvarchar(50)", nullable: true, comment: "品牌"), HOTEL_GROUP = table.Column(type: "int", nullable: false, comment: "酒店分组"), LOG_IMAGE = table.Column(type: "nvarchar(255)", nullable: true, comment: "Logo图片"), UPDATE_TIMEMARK = table.Column(type: "datetime", nullable: true, comment: "记录更新时间"), VALID_DATETIME = table.Column(type: "datetime", nullable: true, comment: "到期时间"), VALID_STATUS = table.Column(type: "int", nullable: false, comment: "状态"), STATUS = table.Column(type: "int", nullable: false, comment: "状态"), SALES = table.Column(type: "nvarchar(50)", nullable: true, comment: "销售人员"), SALES_PHONE = table.Column(type: "nvarchar(50)", nullable: true, comment: "销售人员电话"), HOTEL_CONTACT = table.Column(type: "nvarchar(50)", nullable: true, comment: "酒店联系人"), HOTEL_CONTACT_PHONE = table.Column(type: "nvarchar(50)", nullable: true, comment: "酒店联系人电话"), SORT = table.Column(type: "int", nullable: false, comment: "排序"), REMARK = table.Column(type: "nvarchar(520)", nullable: true, comment: "备注"), IDOLD = table.Column(type: "int", nullable: false, comment: " 酒店编号 巫工 "), PASSWORD = table.Column(type: "nvarchar(50)", nullable: true, comment: " 房型密码 "), IsDel = table.Column(type: "int", nullable: false, comment: "数据 是否在 巫工 库删除 0 未 1 已经删除 2 在系统删除"), HOTEL_OLD_GROUP = table.Column(type: "int", nullable: false, comment: "酒店分组 巫工") }, constraints: table => { table.PrimaryKey("PK_TBL_HOTEL_BASIC_INFO", x => x.HOTEL_ID); }); migrationBuilder.CreateTable( name: "TBL_HOTEL_GROUP_INFO", columns: table => new { HOTEL_GROUP_ID = table.Column(type: "int", nullable: false, comment: "HOTEL_GROUP__ID,自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), HOTEL_GROUP_NAME = table.Column(type: "nvarchar(50)", nullable: false, comment: "酒店组名"), PARENT_ID = table.Column(type: "int", nullable: false, comment: "父级ID"), SORT = table.Column(type: "int", nullable: false, comment: "排序"), KEY_IN = table.Column(type: "int", nullable: false, comment: "录入人"), KEY_IN_DATETIME = table.Column(type: "datetime", nullable: false, comment: "录入时间,插入时自动赋值"), APPROVE = table.Column(type: "int", nullable: true, comment: "审核人"), APPROVE_DATE = table.Column(type: "datetime", nullable: true, comment: "审核时间"), UPDATE_TIMEMARK = table.Column(type: "datetime", nullable: true, comment: "记录更新时间"), REMARK = table.Column(type: "nvarchar(520)", nullable: true, comment: "备注"), IsDel = table.Column(type: "int", nullable: false, comment: "数据 是否在 巫工 库删除 0 未 1 已经删除 2 在系统删除"), HOTEL_GROUP_OLD_ID = table.Column(type: "int", nullable: false), PARENT_OLD_ID = table.Column(type: "int", nullable: false, comment: "父级ID 旧") }, constraints: table => { table.PrimaryKey("PK_TBL_HOTEL_GROUP_INFO", x => x.HOTEL_GROUP_ID); }, comment: "酒店组 基本信息"); migrationBuilder.CreateTable( name: "TBL_HOTEL_SEASON", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "id,自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), HOTELID = table.Column(type: "int", nullable: false, comment: "酒店id"), HOTELID_OLD = table.Column(type: "int", nullable: false, comment: "巫工 酒店id"), MONTH1 = table.Column(type: "int", nullable: false, comment: "月份列 对应的季节 春夏冬 是 123"), MONTH2 = table.Column(type: "int", nullable: false, comment: "月份列 对应的季节 春夏秋冬 是 1234"), MONTH3 = table.Column(type: "int", nullable: false, comment: "月份列 对应的季节 春夏冬 是 123"), MONTH4 = table.Column(type: "int", nullable: false, comment: "月份列 对应的季节 春夏冬 是 123"), MONTH5 = table.Column(type: "int", nullable: false, comment: "月份列 对应的季节 春夏冬 是 123"), MONTH6 = table.Column(type: "int", nullable: false, comment: "月份列 对应的季节 春夏冬 是 123"), MONTH7 = table.Column(type: "int", nullable: false, comment: "月份列 对应的季节 春夏冬 是 123"), MONTH8 = table.Column(type: "int", nullable: false, comment: "月份列 对应的季节 春夏冬 是 123"), MONTH9 = table.Column(type: "int", nullable: false, comment: "月份列 对应的季节 春夏冬 是 123"), MONTH10 = table.Column(type: "int", nullable: false, comment: "月份列 对应的季节 春夏冬 是 123"), MONTH11 = table.Column(type: "int", nullable: false, comment: "月份列 对应的季节 春夏冬 是 123"), MONTH12 = table.Column(type: "int", nullable: false, comment: "月份列 对应的季节 春夏冬 是 123") }, constraints: table => { table.PrimaryKey("PK_TBL_HOTEL_SEASON", x => x.ID); }); migrationBuilder.CreateTable( name: "TBL_HOTEL_STATUS_INFO", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "ID,自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), HOTEL_ID = table.Column(type: "int", nullable: false, comment: "酒店id"), HOTEL_STATUS_ID = table.Column(type: "int", nullable: false, comment: "酒店状态id"), KEY_IN_DATETIME = table.Column(type: "datetime", nullable: false, comment: "录入时间,插入时自动赋值") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), KEY_IN = table.Column(type: "int", nullable: false, comment: "录入人"), VALID_DATETIME = table.Column(type: "datetime", nullable: false, comment: "有效日期"), UPDATE_TIMEMARK = table.Column(type: "datetime", nullable: true, comment: "记录更新时间"), REMARK = table.Column(type: "nvarchar(520)", nullable: true, comment: "备注") }, constraints: table => { table.PrimaryKey("PK_TBL_HOTEL_STATUS_INFO", x => x.ID); }, comment: "酒店 状态信息"); migrationBuilder.CreateTable( name: "TBL_HOTEL_STATUS_LOG", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "ID,自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), HOTEL_ID = table.Column(type: "int", nullable: false, comment: "酒店id"), LOG_TYPE = table.Column(type: "int", nullable: false, comment: "日志类型"), HOTEL_STATUS_ID = table.Column(type: "int", nullable: false, comment: "酒店状态id"), KEY_IN_DATETIME = table.Column(type: "datetime", nullable: false, comment: "录入时间,插入时自动赋值") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), KEY_IN = table.Column(type: "int", nullable: false, comment: "录入人"), VALID_DATETIME = table.Column(type: "datetime", nullable: false, comment: "有效日期"), UPDATE_TIMEMARK = table.Column(type: "datetime", nullable: true, comment: "记录更新时间"), REMARK = table.Column(type: "nvarchar(520)", nullable: true, comment: "备注") }, constraints: table => { table.PrimaryKey("PK_TBL_HOTEL_STATUS_LOG", x => x.ID); }, comment: "酒店 状态信息变化日志"); migrationBuilder.CreateTable( name: "TBL_HW_ERR_LOG", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "ID,自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), RCU_ID = table.Column(type: "int", nullable: false, comment: "RCU_ID 主机id"), DATETIME = table.Column(type: "datetime", nullable: false, comment: "日期"), ERR_MSG_SOURCE_ID = table.Column(type: "int", nullable: false, comment: "信息来源"), DEV_TYPE_ID = table.Column(type: "int", nullable: false, comment: "硬件类型"), LOOP_ADD = table.Column(type: "nvarchar(50)", nullable: false, comment: "回路地址"), ERR_ID = table.Column(type: "int", nullable: false, comment: "日志类型id"), ONLINE_SATATUS = table.Column(type: "int", nullable: false, comment: "是否在线 0 不在 1在"), PUBLIC_IP = table.Column(type: "nvarchar(50)", nullable: true, comment: "公网IP"), INTEANL_IP = table.Column(type: "nvarchar(50)", nullable: true, comment: "内网IP"), UDP_PORT = table.Column(type: "nvarchar(50)", nullable: true, comment: "UDP端口"), PUBLIC_PORT = table.Column(type: "nvarchar(50)", nullable: true, comment: "公网端口"), REMARK = table.Column(type: "nvarchar(520)", nullable: true, comment: "备注"), UPDATE_TIMEMARK = table.Column(type: "datetime", nullable: true, comment: "记录更新时间") }, constraints: table => { table.PrimaryKey("PK_TBL_HW_ERR_LOG", x => x.ID); }, comment: "RCU 连接日志"); migrationBuilder.CreateTable( name: "TBL_LUNCHER_LIST", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "id,自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), Luncher_Name = table.Column(type: "nvarchar(100)", nullable: true, comment: "Luncher_Name "), Remark = table.Column(type: "nvarchar(520)", nullable: true, comment: "Remark 备注") }, constraints: table => { table.PrimaryKey("PK_TBL_LUNCHER_LIST", x => x.ID); }, comment: "TBL_LUNCHER_LIST"); migrationBuilder.CreateTable( name: "TBL_LUNCHER_UPLOAD_LOGS", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "id,自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), DateTime = table.Column(type: "datetime", nullable: false, comment: "日期"), AppType = table.Column(type: "nvarchar(100)", nullable: true, comment: "AppType 适用类型(Launcher、App、etc.)"), AppForModel = table.Column(type: "nvarchar(100)", nullable: true, comment: "AppForModel 适用机型"), FilePath = table.Column(type: "nvarchar(100)", nullable: true, comment: "FilePath 文件存放路径(以BLV_Studio为相对根路径)"), FileName = table.Column(type: "nvarchar(100)", nullable: true, comment: "FileName 固件文件名"), Ver = table.Column(type: "nvarchar(50)", nullable: true, comment: "Ver 固件版本"), MD5Val = table.Column(type: "nvarchar(50)", nullable: true, comment: "MD5Val 固件MD5校验值"), Handler = table.Column(type: "nvarchar(50)", nullable: true, comment: "Handler 处理人"), Remark = table.Column(type: "nvarchar(520)", nullable: true, comment: "Remark 备注"), PC_MAC = table.Column(type: "nvarchar(50)", nullable: true, comment: "PC_MAC 上传人PC网卡MAC"), PC_NAME = table.Column(type: "nvarchar(50)", nullable: true, comment: "PC_NAME 上传人PC用户名") }, constraints: table => { table.PrimaryKey("PK_TBL_LUNCHER_UPLOAD_LOGS", x => x.ID); }, comment: "RCU LUNCHER上传记录:"); migrationBuilder.CreateTable( name: "TBL_MODEL_FILE_DATA", columns: table => new { MFD_ID = table.Column(type: "int", nullable: false, comment: "模型文件数据id,自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), Available = table.Column(type: "int", nullable: false, comment: "是否可用 0 不可以 1 可用"), Brand = table.Column(type: "nvarchar(100)", nullable: true, comment: "厂牌"), ModelNo = table.Column(type: "nvarchar(50)", nullable: true, comment: "机型编号"), ModelName = table.Column(type: "nvarchar(50)", nullable: true, comment: "机型名称"), Description = table.Column(type: "nvarchar(100)", nullable: true, comment: "功能描述"), Image = table.Column(type: "nvarchar(100)", nullable: true, comment: "图片"), Directory = table.Column(type: "nvarchar(100)", nullable: true, comment: "目录名"), XML_FileName = table.Column(type: "nvarchar(255)", nullable: true, comment: "XML文件名"), DAT_FileName = table.Column(type: "nvarchar(255)", nullable: true, comment: "DAT文件名"), Version = table.Column(type: "nvarchar(100)", nullable: true, comment: "版本号"), UploadDateTime = table.Column(type: "datetime", nullable: false, comment: "上传日期"), Author = table.Column(type: "nvarchar(100)", nullable: true, comment: "作者"), XLM_MD5 = table.Column(type: "nvarchar(255)", nullable: true, comment: "XLM_MD5"), DAT_MD5 = table.Column(type: "nvarchar(255)", nullable: true, comment: "DAT_MD5"), PartNumber = table.Column(type: "nvarchar(100)", nullable: true, comment: "料号"), Remark = table.Column(type: "nvarchar(520)", nullable: true, comment: "备注") }, constraints: table => { table.PrimaryKey("PK_TBL_MODEL_FILE_DATA", x => x.MFD_ID); }); migrationBuilder.CreateTable( name: "TBL_MULTILINGUAL", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "id,自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), LANGUAGE = table.Column(type: "nvarchar(100)", nullable: true, comment: "语言"), APPLICATIONID = table.Column(type: "nvarchar(100)", nullable: true, comment: "appID"), VERSION = table.Column(type: "int", nullable: false, comment: "版本 int") }, constraints: table => { table.PrimaryKey("PK_TBL_MULTILINGUAL", x => x.ID); }, comment: "多种语言"); migrationBuilder.CreateTable( name: "TBL_MULTILINGUAL_APPS", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "id,自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), APPLICATION = table.Column(type: "nvarchar(100)", nullable: true, comment: "APP"), REMARK = table.Column(type: "nvarchar(520)", nullable: true, comment: "备注") }, constraints: table => { table.PrimaryKey("PK_TBL_MULTILINGUAL_APPS", x => x.ID); }, comment: "APP "); migrationBuilder.CreateTable( name: "TBL_MULTILINGUAL_DATA", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "id,自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), 中文 = table.Column(type: "nvarchar(100)", nullable: true, comment: "APP"), ENGLISH = table.Column(type: "nvarchar(100)", nullable: true, comment: "APP"), APPLICATIONID = table.Column(type: "nvarchar(100)", nullable: true, comment: "应用区域") }, constraints: table => { table.PrimaryKey("PK_TBL_MULTILINGUAL_DATA", x => x.ID); }, comment: "app多语言数据"); migrationBuilder.CreateTable( name: "TBL_PROFILE_UPLOAD_LOGS", columns: table => new { ConfigFile_ID = table.Column(type: "int", nullable: false, comment: "模型 ID id,自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), Directory = table.Column(type: "nvarchar(100)", nullable: true, comment: "目录名"), XML_FileName = table.Column(type: "nvarchar(255)", nullable: true, comment: "XML文件名"), DAT_FileName = table.Column(type: "nvarchar(255)", nullable: true, comment: "DAT文件名"), Version = table.Column(type: "nvarchar(100)", nullable: true, comment: "版本号"), UploadDateTime = table.Column(type: "datetime", nullable: false, comment: "上传日期"), Author = table.Column(type: "nvarchar(100)", nullable: true, comment: "作者"), XLM_MD5 = table.Column(type: "nvarchar(255)", nullable: true, comment: "XLM_MD5"), DAT_MD5 = table.Column(type: "nvarchar(255)", nullable: true, comment: "DAT_MD5"), HotelID = table.Column(type: "int", nullable: false, comment: "酒店id"), RoomTypeID = table.Column(type: "int", nullable: false, comment: "房型id"), RCU_Model = table.Column(type: "nvarchar(50)", nullable: true, comment: "RCU 机型"), ConfigApp_Ver = table.Column(type: "nvarchar(50)", nullable: true, comment: "配置工具版本号"), Remark = table.Column(type: "nvarchar(520)", nullable: true, comment: "备注"), PC_NAME = table.Column(type: "nvarchar(100)", nullable: true, comment: "pc电脑名"), PC_MAC = table.Column(type: "nvarchar(100)", nullable: true, comment: "pc MAC") }, constraints: table => { table.PrimaryKey("PK_TBL_PROFILE_UPLOAD_LOGS", x => x.ConfigFile_ID); }); migrationBuilder.CreateTable( name: "TBL_RCU_BASIC_INFO", columns: table => new { RCU_ID = table.Column(type: "int", nullable: false, comment: "RCUid,自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), MAC = table.Column(type: "nvarchar(50)", nullable: false, comment: "MAC"), UUID = table.Column(type: "nvarchar(50)", nullable: true, comment: "UUID"), BRAND = table.Column(type: "nvarchar(50)", nullable: true, comment: "商标"), MODEL = table.Column(type: "nvarchar(50)", nullable: true, comment: "机型"), CORE_MODUEL = table.Column(type: "nvarchar(50)", nullable: true, comment: "核心模组"), REGISTER_DATE = table.Column(type: "datetime", nullable: false, comment: "注册时间"), REGISTER_STATUS = table.Column(type: "int", nullable: false, defaultValue: 0, comment: "注册状态"), UDP_KEY = table.Column(type: "nvarchar(50)", nullable: true, comment: "密钥"), UPDATE_TIMEMARK = table.Column(type: "datetime", nullable: true, comment: "记录更新时间"), IsImport = table.Column(type: "int", nullable: false, comment: "是否巫工导入"), ISREGISTRATION = table.Column(type: "int", nullable: false, comment: "是否注册") }, constraints: table => { table.PrimaryKey("PK_TBL_RCU_BASIC_INFO", x => x.RCU_ID); }); migrationBuilder.CreateTable( name: "TBL_RCU_CONN_INFO", columns: table => new { RCU_INFO_CONN_ID = table.Column(type: "int", nullable: false, comment: "RCU_INFO_CONN_ID,自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), MAC = table.Column(type: "nvarchar(50)", nullable: true, comment: "RCU_BASIC_INFO表MAC "), ONLINE_SATATUS = table.Column(type: "int", nullable: false, comment: "是否在线 0 不在 1在"), PUBLIC_IP = table.Column(type: "nvarchar(50)", nullable: true, comment: "公网IP"), INTEANL_IP = table.Column(type: "nvarchar(50)", nullable: true, comment: "内网IP"), UDP_PORT = table.Column(type: "nvarchar(50)", nullable: true, comment: "UDP端口"), PUBLIC_PORT = table.Column(type: "nvarchar(50)", nullable: true, comment: "公网端口"), COMM_TIMEMARK = table.Column(type: "datetime", nullable: true, comment: "记录最后一次通讯时间"), UPDATE_TIMEMARK = table.Column(type: "datetime", nullable: true, comment: "记录更新时间") }, constraints: table => { table.PrimaryKey("PK_TBL_RCU_CONN_INFO", x => x.RCU_INFO_CONN_ID); }); migrationBuilder.CreateTable( name: "TBL_RCU_CONN_LOG", columns: table => new { CONN_LOG_ID = table.Column(type: "int", nullable: false, comment: "RCU_INFO_CONN_ID,自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), MAC = table.Column(type: "nvarchar(50)", nullable: true, comment: "RCU_BASIC_INFO表MAC "), DATETIME = table.Column(type: "datetime", nullable: false, comment: "日期"), CONN_LOG_TYPE_ID = table.Column(type: "int", nullable: false, comment: "日志类型id"), ONLINE_SATATUS = table.Column(type: "int", nullable: false, comment: "是否在线 0 不在 1在"), PUBLIC_IP = table.Column(type: "nvarchar(50)", nullable: true, comment: "公网IP"), INTEANL_IP = table.Column(type: "nvarchar(50)", nullable: true, comment: "内网IP"), UDP_PORT = table.Column(type: "nvarchar(50)", nullable: true, comment: "UDP端口"), PUBLIC_PORT = table.Column(type: "nvarchar(50)", nullable: true, comment: "公网端口"), UPDATE_TIMEMARK = table.Column(type: "datetime", nullable: true, comment: "记录更新时间") }, constraints: table => { table.PrimaryKey("PK_TBL_RCU_CONN_LOG", x => x.CONN_LOG_ID); }); migrationBuilder.CreateTable( name: "TBL_RCU_ERR_LIST", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "ID,自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), MAC = table.Column(type: "nvarchar(50)", nullable: false, comment: "MAC,唯一性"), UUID = table.Column(type: "nvarchar(50)", nullable: false, comment: "UUID,唯一性"), PUBLIC_IP = table.Column(type: "nvarchar(50)", nullable: true, comment: " 公网ip"), INTEANL_IP = table.Column(type: "nvarchar(50)", nullable: true, comment: "内网ip"), PUBLIC_PROT = table.Column(type: "INT", nullable: false, comment: "公网端口号"), UDP_PROT = table.Column(type: "INT", nullable: false, comment: "UDP通讯端口号"), COMM_TIMEMARK = table.Column(type: "datetime", nullable: false, comment: "记录最后一次通讯时间"), DATETIME = table.Column(type: "datetime", nullable: false, comment: "创建时间") }, constraints: table => { table.PrimaryKey("PK_TBL_RCU_ERR_LIST", x => x.ID); }); migrationBuilder.CreateTable( name: "TBL_RCU_MODEL_LIST", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "id,自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), RCU_Model_Name = table.Column(type: "nvarchar(100)", nullable: true, comment: "RCU_MODEL_Name "), Remark = table.Column(type: "nvarchar(520)", nullable: true, comment: "Remark 备注") }, constraints: table => { table.PrimaryKey("PK_TBL_RCU_MODEL_LIST", x => x.ID); }, comment: "TBL_RCU_MODEL_LIST"); migrationBuilder.CreateTable( name: "TBL_ROOM_BASIC_INFO", columns: table => new { ROOM_ID = table.Column(type: "int", nullable: false, comment: "房间id,自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), HOTEL_ID = table.Column(type: "int", nullable: false, comment: "酒店编号"), ROOM_TYPE_ID = table.Column(type: "int", nullable: false, comment: "房型ID"), ROOM_NUMBER = table.Column(type: "nvarchar(20)", nullable: false, comment: "房间号"), DESCRPTION = table.Column(type: "nvarchar(200)", nullable: true, comment: "房间描述"), MAC = table.Column(type: "nvarchar(50)", nullable: true, comment: "RCU_BASIC_INFO表MAC 主外键关系"), UPDATE_TIMEMARK = table.Column(type: "datetime", nullable: true, comment: "记录更新时间"), REMARK = table.Column(type: "nvarchar(520)", nullable: true, comment: "备注"), ROOM_TYPE_OLD_ID = table.Column(type: "int", nullable: false, comment: "房型ID 巫工"), RoomStatusID = table.Column(type: "int", nullable: false, comment: "房间状态 空房 16 出租中 2 退房中 8 待租 4"), HOTEL_OLD_ID = table.Column(type: "int", nullable: false, comment: "酒店编号 巫工"), ROOM_OLD_ID = table.Column(type: "int", nullable: false, comment: "房间id 巫工"), AUTH_DATETIME = table.Column(type: "datetime", nullable: true, comment: "授权到期时间") }, constraints: table => { table.PrimaryKey("PK_TBL_ROOM_BASIC_INFO", x => x.ROOM_ID); }); migrationBuilder.CreateTable( name: "TBL_ROOM_CONFIG_LOG", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "id,自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), ROOM_ID = table.Column(type: "int", nullable: false, comment: "房间ID"), EVENT_DATETIME = table.Column(type: "datetime", nullable: false, comment: "变化发生时间"), MODIFIED_TYPE = table.Column(type: "int", nullable: false, comment: "变化发生类型(SET、READ)"), MODI_ITEM = table.Column(type: "int", nullable: false, comment: "变化发生项目"), DESCRIPTION = table.Column(type: "nvarchar(100)", nullable: true, comment: "变化发生内容"), OPERATOR = table.Column(type: "nvarchar(100)", nullable: true, comment: "变化发生录入人"), IP = table.Column(type: "nvarchar(100)", nullable: true, comment: "录入人IP"), LOCATION = table.Column(type: "nvarchar(100)", nullable: true, comment: "录入人地址定位"), UPDATE_TIMEMARK = table.Column(type: "datetime", nullable: true, comment: "记录更新时间"), REMARK = table.Column(type: "nvarchar(520)", nullable: true, comment: "备注") }, constraints: table => { table.PrimaryKey("PK_TBL_ROOM_CONFIG_LOG", x => x.ID); }, comment: "房间配置信息变化日志 配置录入或上报状态变化,都记录到本日志内 "); migrationBuilder.CreateTable( name: "TBL_ROOM_DEV_INFO", columns: table => new { DEV_INFO_ID = table.Column(type: "int", nullable: false, comment: "设备信息id,自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), ROOM_ID = table.Column(type: "nvarchar(20)", nullable: false, comment: "房间ID"), DEV_BRAND = table.Column(type: "nvarchar(20)", nullable: false, comment: "设备厂商"), DEV_TYPE_ID = table.Column(type: "nvarchar(20)", nullable: false, comment: "设备类型"), DEV_SN = table.Column(type: "nvarchar(20)", nullable: false, comment: "设备SN"), DEV_MAC = table.Column(type: "nvarchar(20)", nullable: false, comment: "设备MAC地址"), INTERFACE = table.Column(type: "nvarchar(20)", nullable: false, comment: "接口"), INTERFACE_URL = table.Column(type: "nvarchar(100)", nullable: false, comment: "接口地址"), REMARK = table.Column(type: "nvarchar(520)", nullable: true, comment: "备注"), UPDATE_TIMEMARK = table.Column(type: "datetime", nullable: true) }, constraints: table => { table.PrimaryKey("PK_TBL_ROOM_DEV_INFO", x => x.DEV_INFO_ID); }); migrationBuilder.CreateTable( name: "TBL_ROOM_LOG", columns: table => new { ROOM_ID = table.Column(type: "int", nullable: false, comment: "日志id,自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), LOG_TYPE = table.Column(type: "int", nullable: false, comment: "日志类型"), DESCRIPTION = table.Column(type: "nvarchar(200)", nullable: false, comment: "描述"), REMARK = table.Column(type: "nvarchar(520)", nullable: true, comment: "备注"), UPDATE_TIMEMARK = table.Column(type: "datetime", nullable: false) }, constraints: table => { table.PrimaryKey("PK_TBL_ROOM_LOG", x => x.ROOM_ID); }); migrationBuilder.CreateTable( name: "TBL_ROOM_REAL_CONFIG", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "ID,自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), ROOM_ID = table.Column(type: "int", nullable: false, comment: "房间ID "), ROOM_OLD_ID = table.Column(type: "int", nullable: false, comment: "房间 old ID"), RCU_ROOM_NUMBER = table.Column(type: "nvarchar(50)", nullable: true, comment: "房间号"), RCU_PRODUCT_CODE = table.Column(type: "nvarchar(50)", nullable: true, comment: "项目编号"), RCU_SEASON = table.Column(type: "int", nullable: false, comment: "RCU_SEASON 季节 0 未知 1 春天 2 夏天 3 秋天 4 冬天 这个根据 TBL_SEASONS表获取对应信息"), RCU_AUTH_DATETIME = table.Column(type: "datetime", nullable: true, comment: "授权到期时间"), RCU_VALID_STATUS = table.Column(type: "int", nullable: false, comment: "锁定状态"), RCU_ROOM_DESCRIPTION = table.Column(type: "nvarchar(100)", nullable: true, comment: "房间备注"), RCU_FW_VER = table.Column(type: "nvarchar(100)", nullable: true, comment: "固件版本"), RCU_CONFIG_VER = table.Column(type: "nvarchar(100)", nullable: true, comment: "配置文件版本"), RCU_IP_MODE = table.Column(type: "nvarchar(100)", nullable: true, comment: "RCU IP获取方式"), RCU_LOCAL_PORT = table.Column(type: "nvarchar(100)", nullable: true, comment: "RCU 本地端口"), RCU_LOCAL_IP = table.Column(type: "nvarchar(100)", nullable: true, comment: "RCU RCU 内网IP地址"), RCU_SUB_MASK = table.Column(type: "nvarchar(100)", nullable: true, comment: "RCU RCU 子网掩码"), RCU_GETWAY = table.Column(type: "nvarchar(100)", nullable: true, comment: "RCU RCU 网关"), RCU_DNS_SERVER = table.Column(type: "nvarchar(100)", nullable: true, comment: "RCU DNS服务器"), RCU_CLOUD_SVR_IP = table.Column(type: "nvarchar(100)", nullable: true, comment: " 云端服务器 IP"), RCU_CLOUD_SVR_URL = table.Column(type: "nvarchar(100)", nullable: true, comment: " 云端服务器网址"), RCU_CLOUD_SVR_PORT_MODE = table.Column(type: "nvarchar(100)", nullable: true, comment: " 云端端口确定方式"), RCU_CLOUD_SVR_PORT = table.Column(type: "nvarchar(100)", nullable: true, comment: " 云端端口"), RCU_SOCKET3_FUN = table.Column(type: "nvarchar(100)", nullable: true, comment: " Socket3 功能"), RCU_LOCAL_SVR_IP = table.Column(type: "nvarchar(100)", nullable: true, comment: "内网服务器 IP"), RCU_LOCAL_SVR_PORT_MODE = table.Column(type: "nvarchar(100)", nullable: true, comment: "内网服务器端口确定方式"), RCU_LOCAL_SVR_PORT = table.Column(type: "nvarchar(100)", nullable: true, comment: "内网服务器端口"), RCU_MQTT_PRODUCT_SECRET = table.Column(type: "nvarchar(100)", nullable: true, comment: "MQTT产品密钥"), RCU_MQTT_DEV_NAME = table.Column(type: "nvarchar(100)", nullable: true, comment: "MQTT设备名称"), RCU_MQTT_DEV_SECRET = table.Column(type: "nvarchar(100)", nullable: true, comment: "MQTT设备密钥"), RCU_MQTT_PUB_TOPIC = table.Column(type: "nvarchar(100)", nullable: true, comment: "MQTT发布主题"), RCU_MQTT_SUB_TOPIC = table.Column(type: "nvarchar(100)", nullable: true, comment: "MQTT发布主题"), RCU_MQTT_KEEPALIVE = table.Column(type: "int", nullable: false, comment: "MQTT保活时间"), RCU_HEARTBEAT_TIMEOUT = table.Column(type: "int", nullable: false, comment: "心跳包间隔时间"), RCU_HEARTBEAT_RETRY = table.Column(type: "int", nullable: false, comment: "心跳包重发次数"), RCU_HEARTBEAT_FAIL_THD = table.Column(type: "int", nullable: false, comment: "重发失败判定断联次数"), RCU_TFTP_LOG_SVR_IP = table.Column(type: "nvarchar(100)", nullable: true, comment: "文件日志服务器 IP "), RCU_TFTP_LOG_CFG = table.Column(type: "nvarchar(100)", nullable: true, comment: "文件日志配置字"), RCU_TFTP_LOG_SVR_PORT = table.Column(type: "nvarchar(100)", nullable: true, comment: "文件日志服务器TFTP端口"), RCU_SECRET_MODE = table.Column(type: "nvarchar(100)", nullable: true, comment: "通讯加密"), RCU_CFG_LAST_WRITE = table.Column(type: "datetime", nullable: false, comment: "最后一次配置写入到设备的时间"), RCU_CFG_LAST_REPORT = table.Column(type: "datetime", nullable: false, comment: "最后一次配置上报时间"), UPDATE_TIMEMARK = table.Column(type: "datetime", nullable: false, comment: "记录更新时间"), REMARK = table.Column(type: "nvarchar(520)", nullable: true, comment: "备注") }, constraints: table => { table.PrimaryKey("PK_TBL_ROOM_REAL_CONFIG", x => x.ID); }, comment: " 房间实时配置信息 房间实时配置信息由主机上报,表示房间真实状态"); migrationBuilder.CreateTable( name: "TBL_ROOM_REAL_DEV_INFO", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "id,自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), ROOM_ID = table.Column(type: "int", nullable: false, comment: "房间ID"), ROOM_OLD_ID = table.Column(type: "int", nullable: false, comment: "房间 old ID"), ROOM_STATUS_BY_PMS = table.Column(type: "int", nullable: false, comment: "PMS房态"), POWER_STATUS = table.Column(type: "int", nullable: false, comment: "PMS房态"), LAST_PWR_STAS_CHG = table.Column(type: "datetime", nullable: false, comment: "取电状态最后一次改变时间"), LOCKER_BATT_LEVEL = table.Column(type: "int", nullable: false, comment: "门锁电量"), LOCKER_STATUS = table.Column(type: "int", nullable: false, comment: "门锁状态"), LOCKER_STAS_LAST_CHG = table.Column(type: "datetime", nullable: true, comment: "门锁状态最后一次改变时间"), SERVICE_REQUEST_INFO = table.Column(type: "int", nullable: false, comment: "服务信息"), SERVICE_INFO_LAST_CHG = table.Column(type: "datetime", nullable: true, comment: "服务信息最后一次改变状态"), REAL_BRIGHT = table.Column(type: "int", nullable: false, comment: "房间实时亮度"), REAL_HUMIDITY = table.Column(type: "int", nullable: false, comment: "房间实时湿度"), REAL_TEMP = table.Column(type: "int", nullable: false, comment: "房间实时温度"), SET_TEMP = table.Column(type: "int", nullable: false, comment: "房间设定温度"), AC_PWR = table.Column(type: "int", nullable: false, comment: "空调电源状态"), AC_MODE = table.Column(type: "int", nullable: false, comment: "空调模式"), AC_FAN = table.Column(type: "int", nullable: false, comment: "空调风量"), REAL_ENERGY_CONSUM = table.Column(type: "int", nullable: false, comment: "即时能耗"), LAST_PWR_ON_MODE = table.Column(type: "datetime", nullable: true, comment: "本次取电时间"), LAST_PWR_ON_STATUS = table.Column(type: "int", nullable: false, comment: " 本次取电方式(插卡或无插卡) "), ENG_CON_FRM_PWRON = table.Column(type: "int", nullable: false, comment: " 本次取电累计能耗(断电后清零) "), ENG_CON_FRM_ROOMOPEN = table.Column(type: "int", nullable: false, comment: " 本次开房累计能耗(退房后清零) "), RCU_PUBLIC_IP = table.Column(type: "nvarchar(100)", nullable: true, comment: " RCU 公网IP "), RCU_LOCAL_PORT = table.Column(type: "nvarchar(100)", nullable: true, comment: "RCU 本地端口 "), RCU_LOCAL_IP = table.Column(type: "nvarchar(100)", nullable: true, comment: " RCU 内网IP地址 "), ROOM_ERR_MASK = table.Column(type: "int", nullable: false, comment: "房间错误标记 "), ROOM_WARRNING_MASK = table.Column(type: "int", nullable: false, comment: "房间警告标记 "), UPDATE_TIMEMARK = table.Column(type: "datetime", nullable: false, comment: "记录更新时间"), REMARK = table.Column(type: "nvarchar(520)", nullable: true, comment: "备注") }, constraints: table => { table.PrimaryKey("PK_TBL_ROOM_REAL_DEV_INFO", x => x.ID); }, comment: "房间设备实时信息 房间设备实时信息由主机上报,表示房间目前真实状态 "); migrationBuilder.CreateTable( name: "TBL_ROOM_SET_CONFIG", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "ID,自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), ROOM_ID = table.Column(type: "int", nullable: false, comment: "房间ID"), ROOM_OLD_ID = table.Column(type: "int", nullable: false, comment: "房间 old ID"), RCU_ROOM = table.Column(type: "nvarchar(50)", nullable: true, comment: "写入到RCU的房间号"), PRODUCT_CODE = table.Column(type: "nvarchar(50)", nullable: true, comment: "写入到RCU的项目编号"), RCU_SEASON = table.Column(type: "int", nullable: false, comment: "RCU_SEASON 季节 0 未知 1 春天 2 夏天 3 冬天 "), AUTH_DATETIME = table.Column(type: "datetime", nullable: true, comment: "授权到期时间"), VALID_STATUS = table.Column(type: "int", nullable: false, comment: "锁定状态"), ROOM_DESCRIPTION = table.Column(type: "nvarchar(100)", nullable: true, comment: "房间备注"), FW_VER = table.Column(type: "nvarchar(100)", nullable: true, comment: "固件版本"), CONFIG_VER = table.Column(type: "nvarchar(100)", nullable: true, comment: "配置文件版本"), FW_AUTO_UPGRADE = table.Column(type: "int", nullable: false, comment: "固件自动下发方式"), CFG_AUTO_UPDATE = table.Column(type: "int", nullable: false, comment: "配置文件自动下发方式"), RCU_LOCAL_PORT = table.Column(type: "nvarchar(100)", nullable: true, comment: "RCU 本地端口"), RCU_LOCAL_IP = table.Column(type: "nvarchar(100)", nullable: true, comment: "RCU RCU 内网IP地址"), RCU_SUB_MASK = table.Column(type: "nvarchar(100)", nullable: true, comment: "RCU RCU 子网掩码"), RCU_GETWAY = table.Column(type: "nvarchar(100)", nullable: true, comment: "RCU RCU 网关"), RCU_DNS_SERVER = table.Column(type: "nvarchar(100)", nullable: true, comment: "RCU DNS服务器"), RCU_CLOUD_SVR_IP = table.Column(type: "nvarchar(100)", nullable: true, comment: " 云端服务器 IP"), RCU_CLOUD_SVR_URL = table.Column(type: "nvarchar(100)", nullable: true, comment: " 云端服务器网址"), RCU_CLOUD_SVR_PORT_MODE = table.Column(type: "nvarchar(100)", nullable: true, comment: " 云端端口确定方式"), RCU_CLOUD_SVR_PORT = table.Column(type: "nvarchar(100)", nullable: true, comment: " 云端端口"), RCU_SOCKET3_FUN = table.Column(type: "nvarchar(100)", nullable: true, comment: " Socket3 功能"), RCU_LOCAL_SVR_IP = table.Column(type: "nvarchar(100)", nullable: true, comment: "内网服务器 IP"), RCU_LOCAL_SVR_PORT_MODE = table.Column(type: "nvarchar(100)", nullable: true, comment: "内网服务器端口确定方式"), RCU_LOCAL_SVR_PORT = table.Column(type: "nvarchar(100)", nullable: true, comment: "内网服务器端口"), RCU_MQTT_PRODUCT_SECRET = table.Column(type: "nvarchar(100)", nullable: true, comment: "MQTT产品密钥"), RCU_MQTT_DEV_NAME = table.Column(type: "nvarchar(100)", nullable: true, comment: "MQTT设备名称"), RCU_MQTT_DEV_SECRET = table.Column(type: "nvarchar(100)", nullable: true, comment: "MQTT设备密钥"), RCU_MQTT_PUB_TOPIC = table.Column(type: "nvarchar(100)", nullable: true, comment: "MQTT发布主题"), RCU_MQTT_SUB_TOPIC = table.Column(type: "nvarchar(100)", nullable: true, comment: "MQTT发布主题"), RCU_MQTT_KEEPALIVE = table.Column(type: "int", nullable: false, comment: "MQTT保活时间"), RCU_HEARTBEAT_TIMEOUT = table.Column(type: "int", nullable: false, comment: "心跳包间隔时间"), RCU_HEARTBEAT_RETRY = table.Column(type: "int", nullable: false, comment: "心跳包重发次数"), RCU_HEARTBEAT_FAIL_THD = table.Column(type: "int", nullable: false, comment: "重发失败判定断联次数"), RCU_TFTP_LOG_SVR_IP = table.Column(type: "nvarchar(100)", nullable: true, comment: "文件日志服务器 IP "), RCU_TFTP_LOG_CFG = table.Column(type: "nvarchar(100)", nullable: true, comment: "文件日志配置字"), RCU_TFTP_LOG_SVR_PORT = table.Column(type: "nvarchar(100)", nullable: true, comment: "文件日志服务器TFTP端口"), RCU_SECRET_MODE = table.Column(type: "nvarchar(100)", nullable: true, comment: "通讯加密"), CFG_MODIFIED_FLAG = table.Column(type: "nvarchar(100)", nullable: true, comment: "配置修改标记位"), CFG_READY_FLAG = table.Column(type: "nvarchar(100)", nullable: true, comment: "配置可用标记 (避免编辑到一半的数据被下发)"), UPDATE_TIMEMARK = table.Column(type: "datetime", nullable: false, comment: "记录更新时间"), REMARK = table.Column(type: "nvarchar(520)", nullable: true, comment: "备注") }, constraints: table => { table.PrimaryKey("PK_TBL_ROOM_SET_CONFIG", x => x.ID); }, comment: "房间配置信息 房间配置状态由人工录入,表示房间配置设定目标"); migrationBuilder.CreateTable( name: "TBL_ROOM_STATUS_LIST", columns: table => new { ROOM_STATUS_ID = table.Column(type: "int", nullable: false, comment: "ROOM_STATUS_ID,自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), ROOM_STATUS_CN = table.Column(type: "nvarchar(50)", nullable: false, comment: "房态名称"), SORT = table.Column(type: "int", nullable: false, comment: "排序"), UPDATE_TIMEMARK = table.Column(type: "datetime", nullable: false, comment: "记录更新时间"), REMARK = table.Column(type: "nvarchar(520)", nullable: true, comment: "备注") }, constraints: table => { table.PrimaryKey("PK_TBL_ROOM_STATUS_LIST", x => x.ROOM_STATUS_ID); }, comment: "房态管理 房态管理"); migrationBuilder.CreateTable( name: "TBL_ROOM_TYPE_LIST", columns: table => new { ROOM_TYPE_ID = table.Column(type: "int", nullable: false, comment: "房型id,自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), HOTEL_ID = table.Column(type: "int", nullable: false, comment: "酒店编号"), ROOM_TYPE_NAME = table.Column(type: "nvarchar(50)", nullable: false, comment: "房型名称"), DESCRIPTION = table.Column(type: "nvarchar(520)", nullable: true, comment: "描述"), UPDATE_TIMEMARK = table.Column(type: "datetime", nullable: false, comment: "记录更新时间"), REMARK = table.Column(type: "nvarchar(520)", nullable: true, comment: "备注"), CONFIG_XML = table.Column(type: "nvarchar(200)", nullable: true, comment: "配置文件名"), CONFIG_BIN = table.Column(type: "nvarchar(200)", nullable: true, comment: " 二进制配置数据 "), CONFIG_BIN_MD5 = table.Column(type: "nvarchar(200)", nullable: true, comment: " 二进制配置数据校验值 "), ROOM_TYPE_OLD_ID = table.Column(type: "int", nullable: false, comment: " 房型 编号 巫工 "), PASSWORD = table.Column(type: "nvarchar(50)", nullable: true, comment: " 房型密码 "), IsDel = table.Column(type: "int", nullable: false, comment: "数据 是否在 巫工 库删除 0 未 1 已经删除 2 在系统删除"), HOTEL_OLD_ID = table.Column(type: "int", nullable: false, comment: " 房型所属酒店编号 巫工"), CFG_CURR_VER = table.Column(type: "int", nullable: false, comment: " CFG咕咕叫版本"), Firmware_FileName = table.Column(type: "nvarchar(100)", nullable: true, comment: " 固件文件名"), Firmware_Version = table.Column(type: "nvarchar(100)", nullable: true, comment: " 固件版本"), Firmware_MD5 = table.Column(type: "nvarchar(100)", nullable: true, comment: " 固件MD5"), Firmware_Approve = table.Column(type: "nvarchar(100)", nullable: true, comment: " 固件批准人"), Firmware_ApproveDate = table.Column(type: "datetime", nullable: true, comment: " 固件批准日期"), ConfigData_Approve = table.Column(type: "nvarchar(100)", nullable: true, comment: " 配置批准人"), ConfigData_ApproveDate = table.Column(type: "datetime", nullable: true, comment: " 配置批准日期"), Creation_Time = table.Column(type: "datetime", nullable: false, comment: " 数据创建时间"), ConfigUploadDateTime = table.Column(type: "datetime", nullable: true, comment: " 数据创建时间"), FirmwareUploadDateTime = table.Column(type: "datetime", nullable: true, comment: " 固件更新日期"), CONFIG_XML_MD5 = table.Column(type: "nvarchar(100)", nullable: true, comment: " 配置文件md5"), LUNCHER_HEX = table.Column(type: "nvarchar(100)", nullable: true, comment: " LUNCHER_HEX"), LUNCHER_MD5 = table.Column(type: "nvarchar(100)", nullable: true, comment: " LUNCHER_MD5 md5"), Cfg_Type = table.Column(type: "nvarchar(100)", nullable: true, comment: "Cfg_Type"), App_Cfg_For_L4 = table.Column(type: "nvarchar(100)", nullable: true, comment: "App_Cfg_For_L4"), App_Cfg_For_L4_MD5 = table.Column(type: "nvarchar(35)", nullable: true, comment: "App_Cfg_For_L4_MD5"), App_Cfg_For_L2 = table.Column(type: "nvarchar(100)", nullable: true, comment: "App_Cfg_For_L2"), App_Cfg_For_L2_MD5 = table.Column(type: "nvarchar(35)", nullable: true, comment: "App_Cfg_For_L2_MD5"), Hex_Code_For_L4 = table.Column(type: "nvarchar(100)", nullable: true, comment: "Hex_Code_For_L4"), Hex_Code_For_L4_MD5 = table.Column(type: "nvarchar(35)", nullable: true, comment: "Hex_Code_For_L4_MD5"), Hex_Code_For_L2 = table.Column(type: "nvarchar(100)", nullable: true, comment: "Hex_Code_For_L2"), Hex_Code_For_L2_MD5 = table.Column(type: "nvarchar(35)", nullable: true, comment: "Hex_Code_For_L2_MD5"), Hex_Code_For_Model = table.Column(type: "nvarchar(100)", nullable: true, comment: "Hex_Code_For_Model"), APPTYPE = table.Column(type: "nvarchar(100)", nullable: true, comment: "APP类型") }, constraints: table => { table.PrimaryKey("PK_TBL_ROOM_TYPE_LIST", x => x.ROOM_TYPE_ID); }); migrationBuilder.CreateTable( name: "TBL_SEASON", columns: table => new { ID = table.Column(type: "int", nullable: false, comment: "ID,自增长") .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), NAME = table.Column(type: "nvarchar(50)", nullable: true, comment: "季节名字"), BeginDate = table.Column(type: "nvarchar(50)", nullable: false, comment: "开始时间"), EndDate = table.Column(type: "nvarchar(50)", nullable: false, comment: "结束日期") }, constraints: table => { table.PrimaryKey("PK_TBL_SEASON", x => x.ID); }, comment: "季节表 暂未用到"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "NEW_TABLE_UPDATE_TIME_MARK"); migrationBuilder.DropTable( name: "TBL_CSERIES_BASICDATA"); migrationBuilder.DropTable( name: "TBL_CSERIES_CONFIGDATA"); migrationBuilder.DropTable( name: "TBL_CSERIES_DEVCONFIGLISTS"); migrationBuilder.DropTable( name: "TBL_CSERIES_DEVLISTS"); migrationBuilder.DropTable( name: "TBL_CSERIES_HOSTTYPENUMBERLISTS"); migrationBuilder.DropTable( name: "TBL_CSERIES_PROJECTLISTS"); migrationBuilder.DropTable( name: "TBL_CSERIES_PROJECTROOMLISTS"); migrationBuilder.DropTable( name: "TBL_CSERIES_ROOMTYPELISTS"); migrationBuilder.DropTable( name: "TBL_DEV_INFO"); migrationBuilder.DropTable( name: "TBL_DEV_INFO_CHG_LOG"); migrationBuilder.DropTable( name: "TBL_EVENTLOGGING"); migrationBuilder.DropTable( name: "TBL_FIRMWARE_UPLOAD_LOGS"); migrationBuilder.DropTable( name: "TBL_HOTEL_BASIC_INFO"); migrationBuilder.DropTable( name: "TBL_HOTEL_GROUP_INFO"); migrationBuilder.DropTable( name: "TBL_HOTEL_SEASON"); migrationBuilder.DropTable( name: "TBL_HOTEL_STATUS_INFO"); migrationBuilder.DropTable( name: "TBL_HOTEL_STATUS_LOG"); migrationBuilder.DropTable( name: "TBL_HW_ERR_LOG"); migrationBuilder.DropTable( name: "TBL_LUNCHER_LIST"); migrationBuilder.DropTable( name: "TBL_LUNCHER_UPLOAD_LOGS"); migrationBuilder.DropTable( name: "TBL_MODEL_FILE_DATA"); migrationBuilder.DropTable( name: "TBL_MULTILINGUAL"); migrationBuilder.DropTable( name: "TBL_MULTILINGUAL_APPS"); migrationBuilder.DropTable( name: "TBL_MULTILINGUAL_DATA"); migrationBuilder.DropTable( name: "TBL_PROFILE_UPLOAD_LOGS"); migrationBuilder.DropTable( name: "TBL_RCU_BASIC_INFO"); migrationBuilder.DropTable( name: "TBL_RCU_CONN_INFO"); migrationBuilder.DropTable( name: "TBL_RCU_CONN_LOG"); migrationBuilder.DropTable( name: "TBL_RCU_ERR_LIST"); migrationBuilder.DropTable( name: "TBL_RCU_MODEL_LIST"); migrationBuilder.DropTable( name: "TBL_ROOM_BASIC_INFO"); migrationBuilder.DropTable( name: "TBL_ROOM_CONFIG_LOG"); migrationBuilder.DropTable( name: "TBL_ROOM_DEV_INFO"); migrationBuilder.DropTable( name: "TBL_ROOM_LOG"); migrationBuilder.DropTable( name: "TBL_ROOM_REAL_CONFIG"); migrationBuilder.DropTable( name: "TBL_ROOM_REAL_DEV_INFO"); migrationBuilder.DropTable( name: "TBL_ROOM_SET_CONFIG"); migrationBuilder.DropTable( name: "TBL_ROOM_STATUS_LIST"); migrationBuilder.DropTable( name: "TBL_ROOM_TYPE_LIST"); migrationBuilder.DropTable( name: "TBL_SEASON"); } } }