Bundle.cs 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. using Newtonsoft.Json;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel;
  5. using System.ComponentModel.DataAnnotations.Schema;
  6. using System.Linq;
  7. using System.Threading.Tasks;
  8. namespace Winsoft.GOV.XF.WebApi.WXCore.Models
  9. {
  10. [JsonObject(MemberSerialization.OptOut)]
  11. public class Bundle
  12. {
  13. public Bundle()
  14. {
  15. CreateDate = DateTime.Now;
  16. Key = Guid.NewGuid().ToString();
  17. }
  18. public Guid Id { get; set; }
  19. public int UserId { get; set; }
  20. public string Title { get; set; }
  21. public string Name { get; set; }
  22. public int Type { get; set; }
  23. public string Advice { get; set; }
  24. public int IsPublic { get; set; }
  25. public string Mobile { get; set; }
  26. public string Describe { get; set; }
  27. public IEnumerable<Asset> Assets { get; set; }
  28. [JsonIgnore]
  29. public string Key { get; set; }
  30. public string County_id { get; set; }
  31. public string Unit_id { get; set; }
  32. public string SearchCode { get; set; }
  33. [JsonConverter(typeof(ChinaDateTimeConverter))]
  34. public DateTime CreateDate { get; set; }
  35. [JsonIgnore]
  36. public string OpenID { get; set; }
  37. public Dictionary<string, string> ToDictionary()
  38. {
  39. Dictionary<string, string> d = new Dictionary<string, string>();
  40. d.Add("advice", Advice);
  41. d.Add("type", Type.ToString());
  42. d.Add("name", Name);
  43. d.Add("phone", Mobile);
  44. d.Add("is_public", IsPublic.ToString());
  45. d.Add("content", Describe);
  46. d.Add("title", Title);
  47. d.Add("county_id", County_id);
  48. d.Add("unit_id", Unit_id);
  49. d.Add("sswz", "8");
  50. d.Add("ly", "2");
  51. return d;
  52. }
  53. }
  54. //丽水市 331100000000
  55. //开发区 331101000000
  56. //莲都区 331102000000
  57. //青田县 331121000000
  58. //缙云县 331122000000
  59. //遂昌县 331123000000
  60. //松阳县 331124000000
  61. //云和县 331125000000
  62. //龙泉市 331181000000
  63. //庆元县 331126000000
  64. //景宁县 331127000000
  65. }