Removed Template
This commit is contained in:
@@ -12,13 +12,13 @@ public class Post {
|
||||
public required string Caption { get; set; }
|
||||
|
||||
public required string Content { get; set; }
|
||||
|
||||
|
||||
[ForeignKey("author")]
|
||||
public User? Author { get; set; }
|
||||
public virtual required User Author { get; set; }
|
||||
|
||||
public bool Published { get; set; }
|
||||
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public DateTime CreatedAt { get; set; } = DateTime.Now;
|
||||
|
||||
public DateOnly Created { get; set; }
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace HopFrame.Testing.Models;
|
||||
|
||||
public class User {
|
||||
[Key]
|
||||
public required Guid Id { get; init; }
|
||||
public required Guid Id { get; init; } = Guid.CreateVersion7();
|
||||
public required string Email { get; init; }
|
||||
public string? Username { get; set; }
|
||||
public string? Password { get; set; }
|
||||
|
||||
@@ -32,8 +32,7 @@ builder.Services.AddHopFrame(options => {
|
||||
.SetDisplayName("Last Name");
|
||||
|
||||
table.Property(u => u.Id)
|
||||
.Sortable(false)
|
||||
.ValueTemplate(Guid.CreateVersion7);
|
||||
.Sortable(false);
|
||||
|
||||
table.SetDisplayName("Benutzer");
|
||||
});
|
||||
@@ -47,8 +46,7 @@ builder.Services.AddHopFrame(options => {
|
||||
.SetDisplayName("ID");
|
||||
|
||||
context.Table<Post>()
|
||||
.Property(p => p.CreatedAt)
|
||||
.ValueTemplate(() => DateTime.UtcNow);
|
||||
.Property(p => p.CreatedAt);
|
||||
|
||||
context.Table<Post>()
|
||||
.Property(p => p.Caption)
|
||||
|
||||
Reference in New Issue
Block a user