GraphRelationItem.cs 720 B

12345678910111213141516171819202122232425262728
  1. using Newtonsoft.Json;
  2. namespace SAGA.GplotRelationComputerManage
  3. {
  4. /// <summary>
  5. /// 图关系类型
  6. /// </summary>
  7. public class GraphRelationItem
  8. {
  9. [JsonProperty("rel_type")]
  10. public string RelType { get; set; }
  11. [JsonProperty("from_id")]
  12. public string FromId { get; set; }
  13. [JsonProperty("to_id")]
  14. public string ToId { get; set; }
  15. [JsonProperty("graph_id")]
  16. public string GraphId { get; set; }
  17. public bool IsValid
  18. {
  19. get
  20. {
  21. return !string.IsNullOrWhiteSpace(GraphId)&&!string.IsNullOrWhiteSpace(FromId) && !string.IsNullOrWhiteSpace(ToId);
  22. }
  23. }
  24. }
  25. }