feat: added DAL

This commit is contained in:
Lisoveliy
2025-05-01 00:33:12 +03:00
parent 5164448dd5
commit 881ae85ef7
10 changed files with 52 additions and 4 deletions

View File

@@ -0,0 +1,11 @@
namespace JOBot.Backend.DAL.Context;
using JOBot.Backend.DAL.Models;
using Microsoft.EntityFrameworkCore;
class AppDbContext : DbContext
{
public DbSet<User> Users { get; set; }
public AppDbContext(DbContextOptions<AppDbContext> options) : base(options) { }
}

View File

@@ -0,0 +1,9 @@
namespace JOBot.Backend.DAL.Models;
public class User
{
public Guid Id { get; set; }
public long TelegramId { get; set; }
public string? Username { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.Now;
}