using Newtonsoft.Json; using System; using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Threading.Tasks; namespace Winsoft.GOV.XF.WebApi.WXCore.Models { [JsonObject(MemberSerialization.OptOut)] public class Bundle { public Bundle() { CreateDate = DateTime.Now; Key = Guid.NewGuid().ToString(); } public Guid Id { get; set; } public int UserId { get; set; } public string Title { get; set; } public string Name { get; set; } public int Type { get; set; } public string Advice { get; set; } public int IsPublic { get; set; } public string Mobile { get; set; } public string Describe { get; set; } public IEnumerable Assets { get; set; } [JsonIgnore] public string Key { get; set; } public string County_id { get; set; } public string Unit_id { get; set; } public string SearchCode { get; set; } [JsonConverter(typeof(ChinaDateTimeConverter))] public DateTime CreateDate { get; set; } public Dictionary ToDictionary() { Dictionary d = new Dictionary(); d.Add("advice", Advice); d.Add("type", Type.ToString()); d.Add("name", Name); d.Add("phone", Mobile); d.Add("is_public", IsPublic.ToString()); d.Add("content", Describe); d.Add("title", Title); d.Add("county_id", County_id); d.Add("unit_id", Unit_id); d.Add("sswz", "8"); d.Add("ly", "2"); return d; } } //丽水市 331100000000 //开发区 331101000000 //莲都区 331102000000 //青田县 331121000000 //缙云县 331122000000 //遂昌县 331123000000 //松阳县 331124000000 //云和县 331125000000 //龙泉市 331181000000 //庆元县 331126000000 //景宁县 331127000000 }