feat: implemented return of user info and eula accept logic

This commit is contained in:
2025-07-10 23:58:12 +03:00
parent 252adf0fc7
commit 4a7810f571
15 changed files with 209 additions and 48 deletions

View File

@@ -12,7 +12,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
namespace JOBot.Backend.Data.Migrations
{
[DbContext(typeof(AppDbContext))]
[Migration("20250710125338_Initial")]
[Migration("20250710203327_Initial")]
partial class Initial
{
/// <inheritdoc />
@@ -31,22 +31,34 @@ namespace JOBot.Backend.Data.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("AccessToken")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b.Property<DateTime>("CreatedAt")
.HasColumnType("timestamp with time zone");
b.Property<string>("HeadHunterResumeUrl")
.HasColumnType("text");
b.Property<string>("CvUrl")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b.Property<long>("TelegramId")
b.Property<bool>("Eula")
.HasColumnType("boolean");
b.Property<string>("RefreshToken")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b.Property<long>("UserId")
.HasColumnType("bigint");
b.Property<string>("Username")
.HasMaxLength(50)
.HasColumnType("character varying(50)");
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b.HasKey("Id");
b.HasAlternateKey("TelegramId");
b.HasAlternateKey("UserId");
b.ToTable("Users");
});

View File

@@ -16,15 +16,18 @@ namespace JOBot.Backend.Data.Migrations
columns: table => new
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
TelegramId = table.Column<long>(type: "bigint", nullable: false),
Username = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
UserId = table.Column<long>(type: "bigint", nullable: false),
Username = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: true),
CreatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
HeadHunterResumeUrl = table.Column<string>(type: "text", nullable: true)
AccessToken = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: true),
RefreshToken = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: true),
Eula = table.Column<bool>(type: "boolean", nullable: false),
CvUrl = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Users", x => x.Id);
table.UniqueConstraint("AK_Users_TelegramId", x => x.TelegramId);
table.UniqueConstraint("AK_Users_UserId", x => x.UserId);
});
}

View File

@@ -28,22 +28,34 @@ namespace JOBot.Backend.Data.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("AccessToken")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b.Property<DateTime>("CreatedAt")
.HasColumnType("timestamp with time zone");
b.Property<string>("HeadHunterResumeUrl")
.HasColumnType("text");
b.Property<string>("CvUrl")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b.Property<long>("TelegramId")
b.Property<bool>("Eula")
.HasColumnType("boolean");
b.Property<string>("RefreshToken")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b.Property<long>("UserId")
.HasColumnType("bigint");
b.Property<string>("Username")
.HasMaxLength(50)
.HasColumnType("character varying(50)");
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b.HasKey("Id");
b.HasAlternateKey("TelegramId");
b.HasAlternateKey("UserId");
b.ToTable("Users");
});