add program id in user entity

pull/4/head
Vianney JOURDY 3 days ago
parent 65ef3f17ce
commit 11773de47d

@ -17,4 +17,5 @@ public class UpdateUserDto
public ESportLevel? SportLevel { get; set; }
public ESport? Sports { get; set; }
public EHealthProblem? HealthProblems { get; set; }
public string? Program { get; set; }
}

@ -20,4 +20,5 @@ public class UserDto
public ESportLevel SportLevel { get; set; } = ESportLevel.None;
public List<ESport> Sports { get; set; } = [ ESport.None ];
public List<EHealthProblem> HealthProblems { get; set; } = [ EHealthProblem.None ];
public string? Program { get; set; } = null;
}

@ -12,7 +12,7 @@ using UserSvc.Data;
namespace UserSvc.Data.Migrations
{
[DbContext(typeof(UserDbContext))]
[Migration("20250616180524_InitialCreate")]
[Migration("20250617082824_InitialCreate")]
partial class InitialCreate
{
/// <inheritdoc />
@ -57,6 +57,9 @@ namespace UserSvc.Data.Migrations
.IsRequired()
.HasColumnType("text");
b.Property<string>("Program")
.HasColumnType("text");
b.Property<bool>("Sexe")
.HasColumnType("boolean");

@ -29,6 +29,7 @@ namespace UserSvc.Data.Migrations
SportLevel = table.Column<int>(type: "integer", nullable: false),
Sports = table.Column<int[]>(type: "integer[]", nullable: false),
HealthProblems = table.Column<int[]>(type: "integer[]", nullable: false),
Program = table.Column<string>(type: "text", nullable: true),
CreatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
UpdatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
},

@ -54,6 +54,9 @@ namespace UserSvc.Data.Migrations
.IsRequired()
.HasColumnType("text");
b.Property<string>("Program")
.HasColumnType("text");
b.Property<bool>("Sexe")
.HasColumnType("boolean");

@ -22,6 +22,8 @@ public class User : EntityBase
public List<ESport> Sports { get; set; } = [];
public List<EHealthProblem> HealthProblems { get; set; } = [];
public string? Program { get; set; } = null;
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
}
Loading…
Cancel
Save