123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188 |
- using CZFW.Core;
- using CZFW.Framework.Attributes;
- using CZFW.Framework.Model.Entity;
- using System.ComponentModel.DataAnnotations;
- using System.ComponentModel.DataAnnotations.Schema;
- namespace CZKJ.GBRS2.Entity
- {
- [Table("cz_gbrs2_position")]
- /// <summary>
- /// 招聘职位
- /// </summary>
- public class PositionEntity : EntityBase,ISeo,IShare
- {
- /// <summary>
- /// 名称
- /// </summary>
- [Display(Name = "名称")]
- [StringLength(32)]
- [Required(ErrorMessage = "不能为空")]
- public string Name { get; set; }
- [Display(Name = "人数")]
- [Required]
- public int Number { get; set; }
- /// <summary>
- /// 部门Id
- /// </summary>
- [Display(Name = "部门")]
- [Invisible(AddVisible = true, FormVisible = true)]
- [DictSrc(Mark = "DepartmentMark")]
- [Required]
- public int DepartmentId { get; set; }
- /// <summary>
- /// 类型
- /// </summary>
- [Display(Name = "类型")]
- [Invisible]
- [DropdownSrc(SrcUrl = "/Manage/Type/GetListByParentId?parentId=73")]
- public int TypeId { get; set; }
- [Display(Name = "地点")]
- [Invisible(AddVisible = true, FormVisible = true)]
- [DictSrc(Mark = "AddressMark")]
- [Required]
- public int AddressId { get; set; }
- /// <summary>
- /// 岗位职责
- /// </summary>
- [Display(Name = "岗位职责")]
- [DataType(DataType.Html)]
- [Invisible(AddVisible = true, FormVisible = true)]
- public string Respons { get; set; }
- /// <summary>
- /// 岗位要求
- /// </summary>
- [Display(Name = "岗位要求")]
- [DataType(DataType.Html)]
- [Invisible(AddVisible = true, FormVisible = true)]
- public string Requirement { get; set; }
- [NotMapped]
- [Display(Name = "类型")]
- [Invisible(TableVisible = true, ViewVisible = true)]
- public string TypeName { get; set; }
- /// <summary>
- /// 地点
- /// </summary>
- [Display(Name = "地点")]
- [NotMapped]
- [Invisible(TableVisible = true, ViewVisible = true)]
- public string Address { get; set; }
- /// <summary>
- /// 所属部门
- /// </summary>
- [Display(Name = "所属部门")]
- [NotMapped]
- [Invisible(TableVisible = true, ViewVisible = true)]
- public string Department { 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) ? Name : 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) ? Name : 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) ? Name : 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) ? "/assets/image/logo-lg.png" : shareimage; }
- set { shareimage = value; }
- }
- /// <summary>
- /// 分享标题
- /// </summary>
- [StringLength(128)]
- [Display(Name = @"分享标题")]
- [Invisible(FormVisible = true, AddVisible = true)]
- public string ShareTitle
- {
- get { return string.IsNullOrEmpty(sharetitle) ? Name : 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) ? Name : sharedescription; }
- set { sharedescription = value; }
- }
- #endregion
- }
- }
|