FileSqlServerSync/Server/Common/Message.cs

31 lines
590 B
C#
Raw Normal View History

2024-07-31 09:14:07 +00:00
namespace Common;
2024-09-05 01:59:57 +00:00
public enum SyncMsgType
2024-07-31 09:14:07 +00:00
{
2024-09-05 01:59:57 +00:00
Error = 0,
General = 1,
Process = 2,
DirFilePack = 3
}
public enum SyncProcessStep
{
Connect = 1,
DeployProject = 2,
DiffFileAndPack = 3,
PackSqlServer = 4,
Upload = 5,
Publish = 6
}
public class SyncMsg(SyncMsgType msgType, SyncProcessStep step, string body)
{
public SyncMsgType? Type { get; set; } = msgType;
public SyncProcessStep Step {get;set;} = step;
public bool IsSuccess
{
get { return Type != SyncMsgType.Error; }
}
2024-07-31 09:14:07 +00:00
public string Body { get; set; } = body;
}