2018-01-27 06:20:57 +01:00
|
|
|
|
using System;
|
|
|
|
|
using Sieve.Attributes;
|
|
|
|
|
|
|
|
|
|
namespace SieveTests.Entities
|
|
|
|
|
{
|
2018-05-15 01:34:37 +02:00
|
|
|
|
public class Post
|
2018-01-27 06:20:57 +01:00
|
|
|
|
{
|
|
|
|
|
public int Id { get; set; }
|
|
|
|
|
|
|
|
|
|
[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);
|
|
|
|
|
|
|
|
|
|
[Sieve(CanFilter = true, CanSort = true)]
|
|
|
|
|
public DateTimeOffset DateCreated { get; set; } = DateTimeOffset.UtcNow;
|
|
|
|
|
}
|
|
|
|
|
}
|