This commit is contained in:
yxw
2025-12-22 17:54:57 +08:00
parent 903d6d9304
commit 1f0c84f75e
6 changed files with 139 additions and 8 deletions

View File

@@ -1,12 +1,47 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Atomx.Common.Entities
{
/// <summary>
/// 内容数据表
/// </summary>
[Table("Posts")]
public class Post
{
[DatabaseGenerated(DatabaseGeneratedOption.None)]
[Key]
public long Id { get; set; }
public int Type { get; set; }
/// <summary>
/// 作者ID
/// </summary>
public long AuthorId { get; set; }
/// <summary>
/// 标题
/// </summary>
[Column(TypeName = "varchar(256)")]
public string Title { get; set; } = string.Empty;
/// <summary>
/// 浏览数
/// </summary>
public int ViewCount { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[Column(TypeName = "timestamptz")]
public DateTime CreateTime { get; set; }
/// <summary>
/// 更新时间
/// </summary>
[Column(TypeName = "timestamptz")]
public DateTime? UpdateTime { get; set; }
}
}