yavsc/Yavsc/Models/Blog/Blog.cs

48 lines
1.1 KiB
C#
Raw Normal View History

2016-05-17 18:22:18 +02:00
using System;
2017-01-20 14:20:44 +01:00
using System.Collections.Generic;
2016-05-17 18:22:18 +02:00
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
2016-08-03 23:25:57 +02:00
using Newtonsoft.Json;
2017-01-20 14:20:44 +01:00
using Yavsc.Models.Access;
2016-05-17 18:22:18 +02:00
namespace Yavsc.Models
{
2016-08-12 19:27:37 +02:00
public partial class Blog : IBlog
2016-05-17 18:22:18 +02:00
{
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
2016-07-27 10:55:44 +02:00
2016-08-02 17:02:38 +02:00
public string Content { get; set; }
public string Photo { get; set; }
public int Rate { get; set; }
public string Title { get; set; }
2016-05-17 18:22:18 +02:00
public string AuthorId { get; set; }
2016-08-03 23:25:57 +02:00
[ForeignKey("AuthorId"),JsonIgnore]
2016-07-27 10:55:44 +02:00
public ApplicationUser Author { set; get; }
2016-08-02 17:02:38 +02:00
public bool Visible { get; set; }
2017-01-17 14:56:53 +01:00
public DateTime DateCreated
{
get; set;
}
public string UserCreated
{
get; set;
}
public DateTime DateModified
{
get; set;
}
public string UserModified
{
get; set;
}
2017-01-20 14:20:44 +01:00
[InverseProperty("Post")]
public virtual List<CircleAuthorizationToBlogPost> ACL { get; set; }
2016-05-17 18:22:18 +02:00
}
}