namespace Common; public class DirFileConfig { /// /// 相对路径 /// public required string DirPath { get; set; } /// /// 排除的文件,它是根目录的相对路径 /// public List? Excludes { get; set; } /// /// 除此外全部忽略,最高优先级,若有值,ExcludeFiles 将被忽略,它是根目录的相对路径 /// public List? CherryPicks { get; set; } /// public Dir? LocalDirInfo { get; set; } public Dir? DiffDirInfo{ get; set; } public Dir? RemoteDirInfo{ get; set; } } public class MSSqlConfig { /// /// 数据库地址 /// public required string ServerName { get; set; } /// /// db名称 /// public required string DatebaseName { get; set; } /// /// 用户 /// public required string User { get; set; } /// /// 密码 /// public required string Password { get; set; } /// /// 通常是:True /// public required string TrustServerCertificate { get; set; } /// /// 同步数据的表格 !!! 通常是 dbo.TableName !!! 注意dbo. /// public List? SyncTablesData{get;set;} } public class Config { /// /// 发布的项目名称 /// public required string Name { get; set; } public Guid Id { get; set; } = Guid.NewGuid(); /// /// 远程Url /// public required string RemoteUrl { get; set; } /// /// 链接到远程的密码 /// public required string RemotePwd { get; set; } /// /// 是否发布数据库 /// public required bool IsDeployDb { get; set; } /// /// 源数据库连接(ip地址相对LocalServer) /// public required MSSqlConfig SrcDb { get; set; } /// /// 目标数据库(ip地址相对RemoteServer) /// public required MSSqlConfig DstDb { get; set; } /// /// 是否发布项目 /// public required bool IsDeployProject { get; set; } /// /// 项目的绝对路径 空字符串表示不发布,不为空LocalRootPath将是发布路径。 /// public required string LocalProjectAbsolutePath { get; set; } /// /// 本地父文件路径 /// public required string LocalRootPath { get; set; } /// /// 远程父路径 /// public required string RemoteRootPath { get; set; } /// /// 同步的文件夹配置 /// public required List DirFileConfigs { get; set; } }