Commit ece41251 authored by yangxiaodong's avatar yangxiaodong

refactor

parent e5d11f1a
......@@ -5,7 +5,7 @@ namespace Cap.Consistency.Infrastructure
/// <summary>
/// The default implementation of <see cref="ConsistencyMessage{TKey}"/> which uses a string as a primary key.
/// </summary>
public class ConsistencyMessage : ConsistencyMessage<string>
public class ConsistencyMessage
{
/// <summary>
/// Initializes a new instance of <see cref="ConsistencyMessage"/>.
......@@ -19,6 +19,16 @@ namespace Cap.Consistency.Infrastructure
UpdateTime = SendTime;
Status = MessageStatus.WaitForSend;
}
public string Id { get; set; }
public DateTime SendTime { get; set; }
public string Payload { get; set; }
public MessageStatus Status { get; set; }
public virtual DateTime? UpdateTime { get; set; }
}
/// <summary>
......@@ -31,21 +41,4 @@ namespace Cap.Consistency.Infrastructure
RollbackSuccessed = 3,
RollbackFailed = 4
}
/// <summary>
/// Represents a message in the consistency system
/// </summary>
/// <typeparam name="TKey">The type used for the primary key for the message.</typeparam>
public class ConsistencyMessage<TKey> where TKey : IEquatable<TKey>
{
public virtual TKey Id { get; set; }
public virtual DateTime SendTime { get; set; }
public string Payload { get; set; }
public MessageStatus Status { get; set; }
public virtual DateTime? UpdateTime { get; set; }
}
}
\ No newline at end of file
......@@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Text;
using Cap.Consistency.Abstractions;
using Cap.Consistency.Routing;
namespace Cap.Consistency.Infrastructure
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment