Files
HopFrame/testing/HopFrame.Testing/Models/Post.cs

17 lines
443 B
C#

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace HopFrame.Testing.Models;
public class Post {
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; set; }
[MaxLength(255)]
public required string Caption { get; set; }
public required string Content { get; set; }
[ForeignKey("author")]
public User? Author { get; set; }
}