123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368 |
- using CZFW.Core;
- using CZFW.Framework.Attributes;
- using CZFW.Framework.Model.Entity;
- using System;
- using System.ComponentModel.DataAnnotations;
- using System.ComponentModel.DataAnnotations.Schema;
- namespace CZKJ.GBRS2.Entity
- {
- /// <summary>
- /// 产品中心
- /// </summary>
- [Table("cz_gbrs2_product")]
- public class ProductEntity : EntityBase,ISeo,IShare
- {
- /// <summary>
- /// 标题
- /// </summary>
- [Display(Name = "标题")]
- [StringLength(64)]
- [Required(ErrorMessage = "不能为空")]
- public string Title { get; set; }
- /// <summary>
- /// 类型
- /// </summary>
- [Display(Name = "类型")]
- [Invisible(AddVisible = true, FormVisible = true)]
- [DropdownSrc(SrcUrl = "/Manage/Type/GetTypeListByParentId?parentId=")]
- [Required]
- public int TypeId { get; set; }
- /// <summary>
- /// 图片
- /// </summary>
- [Display(Name = "列表图片", Description = "图片尺寸:280*200px")]
- [StringLength(512)]
- [DataType(DataType.ImageUrl)]
- [Required]
- public string Image { get; set; }
- /// <summary>
- /// 主图
- /// </summary>
- [Display(Name = "主图", Description = "图片尺寸:1920*690px")]
- [StringLength(512)]
- [DataType(DataType.ImageUrl)]
- public string MainImage { get; set; }
- /// <summary>
- /// 移动主图
- /// </summary>
- [Display(Name = "移动主图", Description = "图片尺寸:750*422px")]
- [StringLength(512)]
- [DataType(DataType.ImageUrl)]
- public string MobileMainImage { get; set; }
- /// <summary>
- /// 简介
- /// </summary>
- [Display(Name = "简介")]
- [StringLength(1024)]
- [DataType(DataType.MultilineText)]
- public string Summary { get; set; }
- /// <summary>
- /// 产品特色背景色
- /// </summary>
- [Display(Name = "产品特色背景色")]
- [StringLength(16)]
- [DataType("Color")]
- [Invisible(AddVisible = true, FormVisible = true)]
- public string FeatureColor { get; set; }
- /// <summary>
- /// 产品特色
- /// </summary>
- [Display(Name = "产品特色")]
- [DataType(DataType.Html)]
- [Invisible(AddVisible = true, FormVisible = true)]
- public string Feature { get; set; }
- /// <summary>
- /// 产品特色(Mobile)
- /// </summary>
- [Display(Name = "产品特色(Mobile)")]
- [DataType(DataType.Html)]
- [Invisible(AddVisible = true, FormVisible = true)]
- public string MobileFeature { get; set; }
- /// <summary>
- /// 产品说明背景色
- /// </summary>
- [Display(Name = "产品说明背景色")]
- [DataType("Color")]
- [StringLength(16)]
- [Invisible(AddVisible = true, FormVisible = true)]
- public string ExplainColor { get; set; }
- /// <summary>
- /// 产品说明
- /// </summary>
- [Display(Name = "产品说明")]
- [DataType(DataType.Html)]
- [Invisible(AddVisible = true, FormVisible = true)]
- public string Explain { get; set; }
- /// <summary>
- /// 产品说明(Mobile)
- /// </summary>
- [Display(Name = "产品说明(Mobile)")]
- [DataType(DataType.Html)]
- [Invisible(AddVisible = true, FormVisible = true)]
- public string MobileExplain { get; set; }
- /// <summary>
- /// 投保案例背景色
- /// </summary>
- [Display(Name = "投保案例背景色")]
- [DataType("Color")]
- [Invisible(AddVisible = true, FormVisible = true)]
- [StringLength(16)]
- public string CaseColor { get; set; }
- /// <summary>
- /// 投保案例
- /// </summary>
- [Display(Name = "投保案例")]
- [DataType(DataType.Html)]
- [Invisible(AddVisible = true, FormVisible = true)]
- public string Case { get; set; }
- /// <summary>
- /// 投保案例(Mobile)
- /// </summary>
- [Display(Name = "投保案例(Mobile)")]
- [DataType(DataType.Html)]
- [Invisible(AddVisible = true, FormVisible = true)]
- public string MobileCase { get; set; }
- /// <summary>
- /// 投保规则背景色
- /// </summary>
- [Display(Name = "投保规则背景色")]
- [DataType("Color")]
- [Invisible(AddVisible = true, FormVisible = true)]
- [StringLength(16)]
- public string RuleColor { get; set; }
- /// <summary>
- /// 投保规则
- /// </summary>
- [Display(Name = "投保规则")]
- [DataType(DataType.Html)]
- [Invisible(AddVisible = true, FormVisible = true)]
- public string Rule { get; set; }
- /// <summary>
- /// 投保规则 (Mobile)
- /// </summary>
- [Display(Name = "投保规则(Mobile)")]
- [DataType(DataType.Html)]
- [Invisible(AddVisible = true, FormVisible = true)]
- public string MobileRule { get; set; }
- /// <summary>
- /// 理赔流程背景色
- /// </summary>
- [Display(Name = "理赔流程背景色")]
- [DataType("Color")]
- [Invisible(AddVisible = true, FormVisible = true)]
- [StringLength(16)]
- public string FlowColor { get; set; }
- /// <summary>
- /// 理赔流程
- /// </summary>
- [Display(Name = "理赔流程")]
- [DataType(DataType.Html)]
- [Invisible(AddVisible = true, FormVisible = true)]
- public string Flow { get; set; }
- /// <summary>
- /// 理赔流程 (Mobile)
- /// </summary>
- [Display(Name = "理赔流程(Mobile)")]
- [DataType(DataType.Html)]
- [Invisible(AddVisible = true, FormVisible = true)]
- public string MobileFlow { get; set; }
- /// <summary>
- /// 产品Q&A背景色
- /// </summary>
- [Display(Name = "产品Q&A背景色")]
- [DataType("Color")]
- [Invisible(AddVisible = true, FormVisible = true)]
- [StringLength(16)]
- public string QaColor { get; set; }
- /// <summary>
- /// 产品Q&A
- /// </summary>
- [Display(Name = "产品Q&A")]
- [DataType(DataType.Html)]
- [Invisible(AddVisible = true, FormVisible = true)]
- public string Qa { get; set; }
- /// <summary>
- /// 产品Q&A(Mobile)
- /// </summary>
- [Display(Name = "产品Q&A(Mobile)")]
- [DataType(DataType.Html)]
- [Invisible(AddVisible = true, FormVisible = true)]
- public string MobileQA { get; set; }
- /// <summary>
- /// 产品条款背景色
- /// </summary>
- [Display(Name = "产品条款背景色")]
- [DataType("Color")]
- [Invisible(AddVisible = true, FormVisible = true)]
- [StringLength(16)]
- public string ProvisionColor { get; set; }
- /// <summary>
- /// 产品条款
- /// </summary>
- [Display(Name = "产品条款")]
- [DataType(DataType.Html)]
- [Invisible(AddVisible = true, FormVisible = true)]
- public string Provision { get; set; }
- /// <summary>
- /// 产品条款(Mobile)
- /// </summary>
- [Display(Name = "产品条款(Mobile)")]
- [DataType(DataType.Html)]
- [Invisible(AddVisible = true, FormVisible = true)]
- public string MobileProvision { get; set; }
- /// <summary>
- ///如何购买(渠道)背景色
- /// </summary>
- [Display(Name = "如何购买(渠道)背景色")]
- [DataType("Color")]
- [Invisible(AddVisible = true, FormVisible = true)]
- [StringLength(16)]
- public string ChannelColor { get; set; }
- /// <summary>
- /// <summary>
- /// 如何购买(渠道)
- /// </summary>
- [Display(Name = "如何购买(渠道)")]
- [DataType(DataType.Html)]
- [Invisible(AddVisible = true, FormVisible = true)]
- public string Channel { get; set; }
- /// 如何购买(渠道)(Mobile)
- /// </summary>
- [Display(Name = "如何购买(渠道)(Mobile)")]
- [DataType(DataType.Html)]
- [Invisible(AddVisible = true, FormVisible = true)]
- public string MobileChannel { get; set; }
- /// <summary>
- /// 发布时间
- /// </summary>
- [Display(Name = "发布时间")]
- [DataType(DataType.DateTime)]
- [Invisible]
- public DateTime PublishTime { get; set; }
- /// <summary>
- ///类型
- /// </summary>
- [NotMapped]
- [Display(Name = "类型")]
- [Invisible(TableVisible = true, ViewVisible = true)]
- public string TypeName { get; set; }
- /// <summary>
- /// 状态:上线 下线
- /// </summary>
- [Display(Name = "上、下线")]
- [EnumSrc(Name = "CZKJ.GBRS2.Enum.ProductStatusEnum")]
- [Invisible(AddVisible = true, FormVisible = true)]
- [Required]
- public int Status { get; set; }
- [NotMapped]
- [Display(Name = "上、下线")]
- [Invisible(TableVisible = true, ViewVisible = true)]
- public string StatusName { get; set; }
- #region SEO及分享
- [NotMapped]
- private string seotitle;
- [NotMapped]
- private string seodescription;
- [NotMapped]
- private string seokeywords;
- [NotMapped]
- private string sharetitle;
- [NotMapped]
- private string sharedescription;
- [NotMapped]
- private string shareurl;
- [NotMapped]
- private string shareimage;
- [StringLength(128)]
- [Display(Name = "SEO标题")]
- [Invisible(FormVisible = true, AddVisible = true)]
- public string SeoTitle
- {
- get { return string.IsNullOrEmpty(seotitle) ? Title : seotitle; }
- set { seotitle = value; }
- }
- /// <summary>
- /// SEO描述
- /// </summary>
- [StringLength(512)]
- [Display(Name = @"SEO描述")]
- [DataType(DataType.MultilineText)]
- [Invisible(FormVisible = true, AddVisible = true)]
- public string SeoDescription
- {
- get { return string.IsNullOrEmpty(seodescription) ? Summary : seodescription; }
- set { seodescription = value; }
- }
- /// <summary>
- /// SEO关键词
- /// </summary>
- [StringLength(128)]
- [Display(Name = @"SEO关键词")]
- [Invisible(FormVisible = true, AddVisible = true)]
- public string SeoKeywords
- {
- get { return string.IsNullOrEmpty(seokeywords) ? Title : seokeywords; }
- set { seokeywords = value; }
- }
- /// <summary>
- /// 分享图片
- /// </summary>
- [StringLength(512)]
- [Display(Name = @"分享图片")]
- [DataType(DataType.ImageUrl)]
- [Invisible(FormVisible = true, AddVisible = true)]
- public string ShareImage
- {
- get { return string.IsNullOrEmpty(shareimage) ? Image : shareimage; }
- set { shareimage = value; }
- }
- /// <summary>
- /// 分享标题
- /// </summary>
- [StringLength(128)]
- [Display(Name = @"分享标题")]
- [Invisible(FormVisible = true, AddVisible = true)]
- public string ShareTitle
- {
- get { return string.IsNullOrEmpty(sharetitle) ? Title : sharetitle; }
- set { sharetitle = value; }
- }
- /// <summary>
- /// 分享URL
- /// </summary>
- [StringLength(512)]
- [Display(Name = @"分享URL")]
- [Invisible(FormVisible = true, AddVisible = true)]
- public string ShareUrl
- {
- get { return string.IsNullOrEmpty(shareurl) ? ConfigHelper.GetValue<string>("SystemInfo:Website") : shareurl; }
- set { shareurl = value; }
- }
- /// <summary>
- /// 分享描述
- /// </summary>
- [StringLength(512)]
- [Display(Name = @"分享描述")]
- [Invisible(FormVisible = true, AddVisible = true)]
- public string ShareDescription
- {
- get { return string.IsNullOrEmpty(sharedescription) ? Summary : sharedescription; }
- set { sharedescription = value; }
- }
- #endregion
- }
- }
|