should magicly work

Test_CI
David D'ALMEIDA 1 year ago
parent 180617b5e1
commit bbe85f1826

6
.gitignore vendored

@ -563,8 +563,8 @@ xcuserdata/
/dataSources/ /dataSources/
/dataSources.local.xml /dataSources.local.xml
.ideaMigration/ .ideaMigration/
# Migration/ Migration/
# Migrations/ Migrations/
# *.db *.db

@ -89,6 +89,7 @@ namespace DbContextLib
{ {
if (!optionsBuilder.IsConfigured) if (!optionsBuilder.IsConfigured)
{ {
Console.WriteLine("!IsConfigured...");
optionsBuilder.UseSqlite($"Data Source=uca.HeartTrack.db"); optionsBuilder.UseSqlite($"Data Source=uca.HeartTrack.db");
} }
} }

@ -54,15 +54,18 @@ public class AppBootstrap(IConfiguration configuration)
var PASSWORD = System.Environment.GetEnvironmentVariable("PASSWORD"); var PASSWORD = System.Environment.GetEnvironmentVariable("PASSWORD");
connectionString = $"Server={HOST};port={PORT};database={DATABASE};user={USERNAME};password={PASSWORD}"; connectionString = $"Server={HOST};port={PORT};database={DATABASE};user={USERNAME};password={PASSWORD}";
Console.WriteLine("========RUNNING USING THE MYSQL SERVER==============");
Console.WriteLine(connectionString); Console.WriteLine(connectionString);
Console.WriteLine("======================");
Console.WriteLine($"server={HOST};port={PORT};database={DATABASE};user={USERNAME};password={PASSWORD}");
Console.WriteLine(connectionString); Console.WriteLine(connectionString);
Console.WriteLine("======================");
// with auth when it was working was'nt here
services.AddDbContext<AuthDbContext>(options => options.UseInMemoryDatabase("AuthDb"));
services.AddDbContext<HeartTrackContext>(options => services.AddDbContext<HeartTrackContext>(options =>
options.UseMySql($"{connectionString}", new MySqlServerVersion(new Version(10, 11, 1))) options.UseMySql($"{connectionString}", new MySqlServerVersion(new Version(10, 11, 1)))
, ServiceLifetime.Singleton); , ServiceLifetime.Singleton);
break; break;
default: default:
Console.WriteLine("====== RUNNING USING THE IN SQLLITE DATABASE ======");
connectionString = Configuration.GetConnectionString("HeartTrackAuthConnection"); connectionString = Configuration.GetConnectionString("HeartTrackAuthConnection");
if (!string.IsNullOrWhiteSpace(connectionString)) if (!string.IsNullOrWhiteSpace(connectionString))
{ {

@ -6,5 +6,9 @@ public class Coach : Role
{ {
return user.Role is Athlete; return user.Role is Athlete;
} }
public override string ToString()
{
return "CoachAthlete";
}
} }

@ -2,5 +2,24 @@ namespace Model;
public class Notification public class Notification
{ {
public int IdNotif { get; private set; }
public string Message { get; set; }
public DateTime Date { get; set; }
public bool Statut { get; set; }
public string Urgence { get; set; }
public int ToUserId { get; set; }
public Notification(int id,string message, DateTime date, bool statut, string urgence, int toUserId)
{
this.IdNotif = id;
this.Message = message;
this.Date = date;
this.Statut = statut;
this.Urgence = urgence;
this.ToUserId = toUserId;
}
public Notification(){}
} }

@ -1,6 +1,9 @@
namespace Model; namespace Model;
public class RelationshipRequest public class RelationshipRequest // : Observable
{ {
public int Id { get ; set ; }
public int FromUser { get ; set; }
public int ToUser { get; set ; }
public string Status { get ; }
} }

@ -3,4 +3,5 @@ namespace Model;
public class Training public class Training
{ {
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save