2018-02-10 01:26:32 +01:00
|
|
|
|
using System;
|
|
|
|
|
using Sieve.Attributes;
|
2020-11-03 10:42:41 +01:00
|
|
|
|
using SieveUnitTests.Abstractions.Entity;
|
2018-02-10 01:26:32 +01:00
|
|
|
|
|
|
|
|
|
namespace SieveUnitTests.Entities
|
|
|
|
|
{
|
2020-11-03 10:42:41 +01:00
|
|
|
|
public class Post : BaseEntity, IPost
|
2018-02-10 01:26:32 +01:00
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
[Sieve(CanFilter = true, CanSort = true)]
|
|
|
|
|
public string Title { get; set; } = Guid.NewGuid().ToString().Replace("-", string.Empty).Substring(0, 8);
|
|
|
|
|
|
|
|
|
|
[Sieve(CanFilter = true, CanSort = true)]
|
|
|
|
|
public int LikeCount { get; set; } = new Random().Next(0, 1000);
|
|
|
|
|
|
|
|
|
|
[Sieve(CanFilter = true, CanSort = true)]
|
|
|
|
|
public int CommentCount { get; set; } = new Random().Next(0, 1000);
|
|
|
|
|
|
2018-05-28 03:32:21 +02:00
|
|
|
|
[Sieve(CanFilter = true, CanSort = true)]
|
|
|
|
|
public int? CategoryId { get; set; } = new Random().Next(0, 4);
|
|
|
|
|
|
2018-04-08 05:46:16 +02:00
|
|
|
|
[Sieve(CanFilter = true, CanSort = true)]
|
|
|
|
|
public bool IsDraft { get; set; }
|
|
|
|
|
|
2018-02-10 06:37:04 +01:00
|
|
|
|
public string ThisHasNoAttribute { get; set; }
|
|
|
|
|
|
|
|
|
|
public string ThisHasNoAttributeButIsAccessible { get; set; }
|
|
|
|
|
|
|
|
|
|
public int OnlySortableViaFluentApi { get; set; }
|
2019-01-18 11:45:38 +01:00
|
|
|
|
|
|
|
|
|
public Comment TopComment { get; set; }
|
2019-03-17 23:23:37 +01:00
|
|
|
|
public Comment FeaturedComment { get; set; }
|
2023-02-22 23:11:34 +01:00
|
|
|
|
|
|
|
|
|
public string CreatedBy { get; set; }
|
|
|
|
|
public DateTime? CreatedAt { get; set; }
|
|
|
|
|
public string UpdatedBy { get; set; }
|
|
|
|
|
public DateTime? UpdatedAt { get; set; }
|
2018-02-10 01:26:32 +01:00
|
|
|
|
}
|
|
|
|
|
}
|