You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

26 lines
709 B

using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Sevomin.Models
{
public class Ad
{
[Key]
public long Id { get; set; }
public string Title { get; set; }
public string Description { get; set; }
public int Duration { get; set; }
public long ClickCount { get; set; }
public string Link { get; set; }
public DateTime CreatedDate { get; set; }
public bool Active { get; set; }
[NotMapped]
public bool Expired
{
get { return (CreatedDate.AddDays(Duration) < DateTime.Now); }
}
}
}