adding pages and css and .gitignore, scripts, resources, to-do.md

This commit is contained in:
2026-10-27 10:15:05 +02:00
parent d7aaf05123
commit 35aed79337
23 changed files with 360 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
namespace StatiKosev.Data;
using Microsoft.AspNetCore.Identity;
public class ApplicationUser : IdentityUser
{
//probably not gonna define any more fields but...
}
+11
View File
@@ -0,0 +1,11 @@
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
namespace StatiKosev.Data;
public class AppDbContext(DbContextOptions<AppDbContext> options)
: IdentityDbContext<IdentityUser>(options)
{
public DbSet<GuestMessage> GuestMessages => Set<GuestMessage>();
}
+14
View File
@@ -0,0 +1,14 @@
using System.ComponentModel.DataAnnotations;
namespace StatiKosev.Data;
public class GuestMessage
{
public int Id { get; set; }
[MaxLength(2000)] public required string Body { get; set; }
public DateTimeOffset CreatedAt { get; set; } = DateTimeOffset.UtcNow;
public bool IsRead { get; set; }
}
public record SendGuestMessageRequest(
[Required, StringLength(2000, MinimumLength = 1)] string Body);
+15
View File
@@ -0,0 +1,15 @@
using System.ComponentModel.DataAnnotations;
namespace StatiKosev.Data;
public class UserMessage
{
public int Id { get; set; }
[MaxLength(2000)] public required string Body { get; set; }
public DateTimeOffset CreatedAt { get; set; } = DateTimeOffset.UtcNow;
public bool IsRead { get; set; }
}
public record SendUserMessageRequest(
[Required, StringLength(2000, MinimumLength = 1)] string Body, string Username);