浏览代码

数据迁移接口 机构结构调整

denny 1 年之前
父节点
当前提交
a54f9cdc79

+ 21 - 0
Tools/Flyinsono.DBCopy.Tool/Entities/VideoCategories.cs

@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Flyinsono.DBCopy.Tool.Entities
+{
+    internal class VideoCategories
+    {
+        public string Id { get; private set; }
+
+        public DateTime CreateTime { get; set; } = DateTime.MinValue;
+
+        public DateTime UpdateTime { get; set; } = DateTime.MinValue;
+
+        public bool IsDeleted { get; set; }
+        public string Name { get; set; }
+        public IList<string> VideoIds { get; set; }
+    }
+}

+ 22 - 0
Tools/Flyinsono.DBCopy.Tool/Entities/VideoSecoundCategories.cs

@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Flyinsono.DBCopy.Tool.Entities
+{
+    internal class VideoSecoundCategories
+    {
+        public string Id { get; private set; }
+
+        public DateTime CreateTime { get; set; } = DateTime.MinValue;
+
+        public DateTime UpdateTime { get; set; } = DateTime.MinValue;
+
+        public bool IsDeleted { get; set; }
+        public string Name { get; set; }
+        public string ParentId { get; set; }
+        public IList<string> VideoIds { get; set; }
+    }
+}

+ 5 - 7
Tools/Flyinsono.DBCopy.Tool/ViewModels/MainWindowViewModel.cs

@@ -242,13 +242,11 @@ namespace Flyinsono.DBCopy.Tool
         private void OnConnectDb(object obj) // 新增OnConnectDb方法
         {
             var service = AppManager.Instance.GetManager<IClientTestManager>();
-            service.ConnectDb("E:\\Arthur\\20230420175958.zip\\20230420175958");
-            //if (string.IsNullOrEmpty(DbPath))
-            //{
-            //    Logger.WriteLineWarn($"Mongodb server path is empty.");
-            //    return;
-            //}
-            //service.ConnectDb(DbPath);
+            if (string.IsNullOrEmpty(DbPath))
+            {
+                DbPath = "E:\\Arthur\\20230420175958.zip\\20230420175958";
+            }
+            service.ConnectDb(DbPath);
         }
 
         private void OnMigrateStatic(object obj)