|
|
- using System;
- using System.Collections.Generic;
- using System.ComponentModel.DataAnnotations;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using Sevomin.Models.Helpers;
-
- namespace Sevomin.Models
- {
- public class JobViewModel
- {
- [Key]
- public long Id { get; set; }
-
- [Required]
- [StringLength(128)]
- public string AvalinId { get; set; }
-
- public DateTime ExpireDate { get; set; }
-
- public string Description { get; set; }
- public byte ResumeType { get; set; }
- public string ContactPersonName { get; set; }
- public string ContactPersonPhone { get; set; }
- [EmailValidation]
- public string ContactPersonEMail { get; set; }
-
- public bool ShowCompanyName { get; set; }
- public bool ShowCompanyLogo { get; set; }
- public bool IsFullTime { get; set; }
-
- public IList<JobParameterViewModel> Parameters;
-
- public JobViewModel(Job job)
- {
- this.Id = job.Id;
- this.AvalinId = job.AvalinId;
- this.ExpireDate = job.ExpireDate;
- this.Description = job.Description;
- this.ResumeType = job.ResumeType;
- this.ContactPersonEMail = job.ContactPersonEMail;
- this.ContactPersonName = job.ContactPersonName;
- this.ContactPersonPhone = job.ContactPersonPhone;
- this.ShowCompanyLogo = job.ShowCompanyLogo;
- this.ShowCompanyName = job.ShowCompanyName;
- this.IsFullTime = job.IsFullTime;
-
- Parameters = new List<JobParameterViewModel>();
- foreach (var jp in job.JobParameters)
- {
- Parameters.Add(new JobParameterViewModel(jp));
- }
- }
- }
- }
|