diff --git a/api/Controllers/UsersController.cs b/api/Controllers/UsersController.cs index ec932a6e..64349817 100755 --- a/api/Controllers/UsersController.cs +++ b/api/Controllers/UsersController.cs @@ -31,7 +31,16 @@ namespace api.Controllers _repo = repo; } + [HttpPost("changeProfileImage")] + public async Task changeProfileImage(profileImage i) + { + User a = new User(); + + var cenas =await _repo.changeProfileImage(i); + + return Ok(cenas); + } // [HttpGet("{id}")] public async Task GetUser(int id) @@ -57,6 +66,7 @@ namespace api.Controllers } + [Authorize(Policy = "RequireAdminRole")] [HttpPost("updateAll")] public async Task UpdateUsers(updateUsersDTO[] req) @@ -65,7 +75,7 @@ namespace api.Controllers { foreach (var user in req) { - + } return Ok(req); diff --git a/api/Data/IUsersRepository.cs b/api/Data/IUsersRepository.cs index 02a2ff8a..f699c2ab 100755 --- a/api/Data/IUsersRepository.cs +++ b/api/Data/IUsersRepository.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.Threading.Tasks; +using api.Dtos; using api.Models; namespace api.Data @@ -12,7 +13,7 @@ namespace api.Data Task SaveAll(); Task> GetUsers(); Task GetUser(int id); - + Task changeProfileImage(profileImage a); } } \ No newline at end of file diff --git a/api/Data/UsersRepository.cs b/api/Data/UsersRepository.cs index 0fff0768..d74b27fa 100755 --- a/api/Data/UsersRepository.cs +++ b/api/Data/UsersRepository.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.Threading.Tasks; +using api.Dtos; using api.Models; using Microsoft.EntityFrameworkCore; @@ -14,34 +15,56 @@ namespace api.Data } public void Add(T enity) where T : class { - _context.Add(enity); - + _context.Add(enity); + } + public async Task changeProfileImage(profileImage a) + { + + var utilizador = await _context.Users.FirstOrDefaultAsync(t => t.QRcode == a.QRcode); + if (utilizador != null) + { + utilizador.profileImage = a.base64; + + _context.Users.Update(utilizador); + + var result = _context.SaveChanges(); + + if (result >= 1) + { + return utilizador; + } + + return null; + } + + return null; + } public void Delete(T entity) where T : class { - + _context.Remove(entity); } public async Task GetUser(int id) { - var user = await _context.Users.Include(p=>p.Photos).FirstOrDefaultAsync(u=>u.Id==id); - + var user = await _context.Users.Include(p => p.Photos).FirstOrDefaultAsync(u => u.Id == id); + return user; } public async Task> GetUsers() { - var users= await _context.Users.Include(p=>p.Photos).ToListAsync(); - + var users = await _context.Users.Include(p => p.Photos).ToListAsync(); + return users; } public async Task SaveAll() { - return await _context.SaveChangesAsync()>0; - + return await _context.SaveChangesAsync() > 0; + } } diff --git a/api/Dtos/cromosToReturn.cs b/api/Dtos/cromosToReturn.cs old mode 100644 new mode 100755 diff --git a/api/Dtos/loginQR.cs b/api/Dtos/loginQR.cs old mode 100644 new mode 100755 diff --git a/api/Dtos/profileImage.cs b/api/Dtos/profileImage.cs new file mode 100644 index 00000000..392959bb --- /dev/null +++ b/api/Dtos/profileImage.cs @@ -0,0 +1,9 @@ +namespace api.Dtos +{ + public class profileImage + { + public string QRcode{get;set;} + + public string base64{get;set;} + } +} \ No newline at end of file diff --git a/api/Migrations/20190318183120_completev1.Designer.cs b/api/Migrations/20190318183120_completev1.Designer.cs deleted file mode 100644 index 99f8e843..00000000 --- a/api/Migrations/20190318183120_completev1.Designer.cs +++ /dev/null @@ -1,502 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using api.Data; - -namespace api.Migrations -{ - [DbContext(typeof(DataContext))] - [Migration("20190318183120_completev1")] - partial class completev1 - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "2.2.0-rtm-35687") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ClaimType"); - - b.Property("ClaimValue"); - - b.Property("RoleId"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ClaimType"); - - b.Property("ClaimValue"); - - b.Property("UserId"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider"); - - b.Property("ProviderKey"); - - b.Property("ProviderDisplayName"); - - b.Property("UserId"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId"); - - b.Property("LoginProvider"); - - b.Property("Name"); - - b.Property("Value"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens"); - }); - - modelBuilder.Entity("api.Models.Cromos", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("DescLocked"); - - b.Property("DescMostrar"); - - b.Property("DescUnlocked"); - - b.Property("Nome"); - - b.Property("QRCode"); - - b.Property("imgId"); - - b.Property("pontos"); - - b.Property("unlocked"); - - b.Property("websiteCromo"); - - b.HasKey("Id"); - - b.HasIndex("imgId"); - - b.ToTable("Cromos"); - }); - - modelBuilder.Entity("api.Models.Event", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("Desc"); - - b.Property("Nome"); - - b.Property("aDecorrer"); - - b.Property("custo"); - - b.Property("horas"); - - b.Property("imagem"); - - b.Property("localizacao"); - - b.Property("notas"); - - b.HasKey("Id"); - - b.ToTable("Events"); - }); - - modelBuilder.Entity("api.Models.EventLoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("Desc"); - - b.Property("EventId"); - - b.Property("ImgId"); - - b.Property("Lat"); - - b.Property("Long"); - - b.Property("Nome"); - - b.HasKey("Id"); - - b.HasIndex("ImgId"); - - b.ToTable("EventLocs"); - }); - - modelBuilder.Entity("api.Models.EventLocVisited", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("LocationId"); - - b.Property("TeamId"); - - b.Property("complete"); - - b.Property("timestamp"); - - b.HasKey("Id"); - - b.HasIndex("LocationId"); - - b.HasIndex("TeamId"); - - b.ToTable("EventLocsVisited"); - }); - - modelBuilder.Entity("api.Models.Log", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("UserId"); - - b.Property("UserId1"); - - b.Property("amount"); - - b.Property("available"); - - b.Property("logType"); - - b.Property("productId"); - - b.Property("transactionId"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.HasIndex("UserId1"); - - b.HasIndex("productId"); - - b.ToTable("Logs"); - }); - - modelBuilder.Entity("api.Models.Photo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("DateAdded"); - - b.Property("Description"); - - b.Property("IsMain"); - - b.Property("Url"); - - b.Property("UserId"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("Photos"); - }); - - modelBuilder.Entity("api.Models.Product", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("basePrice"); - - b.Property("name"); - - b.Property("revenue"); - - b.Property("sold"); - - b.HasKey("Id"); - - b.ToTable("Products"); - }); - - modelBuilder.Entity("api.Models.Role", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); - - b.Property("Name") - .HasMaxLength(256); - - b.Property("NormalizedName") - .HasMaxLength(256); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasName("RoleNameIndex"); - - b.ToTable("AspNetRoles"); - }); - - modelBuilder.Entity("api.Models.Team", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("CapQR"); - - b.Property("EventId"); - - b.Property("NMembros"); - - b.Property("Nome"); - - b.Property("Pontos"); - - b.Property("pagamento"); - - b.Property("pagamentoVerifyCode"); - - b.HasKey("Id"); - - b.ToTable("Teams"); - }); - - modelBuilder.Entity("api.Models.User", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("AccessFailedCount"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); - - b.Property("Email") - .HasMaxLength(256); - - b.Property("EmailConfirmed"); - - b.Property("LockoutEnabled"); - - b.Property("LockoutEnd"); - - b.Property("NormalizedEmail") - .HasMaxLength(256); - - b.Property("NormalizedUserName") - .HasMaxLength(256); - - b.Property("PasswordHash"); - - b.Property("PhoneNumber"); - - b.Property("PhoneNumberConfirmed"); - - b.Property("QRcode"); - - b.Property("SecurityStamp"); - - b.Property("TwoFactorEnabled"); - - b.Property("UserName") - .HasMaxLength(256); - - b.Property("cromos"); - - b.Property("drinks"); - - b.Property("food"); - - b.Property("fullName"); - - b.Property("teamID"); - - b.Property("university"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasName("UserNameIndex"); - - b.HasIndex("teamID"); - - b.ToTable("AspNetUsers"); - }); - - modelBuilder.Entity("api.Models.UserRole", b => - { - b.Property("UserId"); - - b.Property("RoleId"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles"); - }); - - modelBuilder.Entity("api.Models.Value", b => - { - b.Property("id") - .ValueGeneratedOnAdd(); - - b.Property("Name"); - - b.HasKey("id"); - - b.ToTable("Values"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("api.Models.Role") - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("api.Models.User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("api.Models.User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("api.Models.User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("api.Models.Cromos", b => - { - b.HasOne("api.Models.Photo", "img") - .WithMany() - .HasForeignKey("imgId"); - }); - - modelBuilder.Entity("api.Models.EventLoc", b => - { - b.HasOne("api.Models.Photo", "Img") - .WithMany() - .HasForeignKey("ImgId"); - }); - - modelBuilder.Entity("api.Models.EventLocVisited", b => - { - b.HasOne("api.Models.EventLoc", "Location") - .WithMany() - .HasForeignKey("LocationId"); - - b.HasOne("api.Models.Team", "Team") - .WithMany() - .HasForeignKey("TeamId"); - }); - - modelBuilder.Entity("api.Models.Log", b => - { - b.HasOne("api.Models.User") - .WithMany("logsFebrada") - .HasForeignKey("UserId"); - - b.HasOne("api.Models.User") - .WithMany("logsFestarola") - .HasForeignKey("UserId1"); - - b.HasOne("api.Models.Product", "product") - .WithMany() - .HasForeignKey("productId"); - }); - - modelBuilder.Entity("api.Models.Photo", b => - { - b.HasOne("api.Models.User", "User") - .WithMany("Photos") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("api.Models.User", b => - { - b.HasOne("api.Models.Team", "team") - .WithMany() - .HasForeignKey("teamID"); - }); - - modelBuilder.Entity("api.Models.UserRole", b => - { - b.HasOne("api.Models.Role", "Role") - .WithMany("UserRoles") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade); - - b.HasOne("api.Models.User", "User") - .WithMany("UserRoles") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/api/Migrations/20190318183120_completev1.cs b/api/Migrations/20190318183120_completev1.cs deleted file mode 100644 index 6fdf07da..00000000 --- a/api/Migrations/20190318183120_completev1.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace api.Migrations -{ - public partial class completev1 : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - - } - } -} diff --git a/api/Migrations/20190319003112_image.Designer.cs b/api/Migrations/20190319003112_image.Designer.cs deleted file mode 100644 index 4362b907..00000000 --- a/api/Migrations/20190319003112_image.Designer.cs +++ /dev/null @@ -1,493 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using api.Data; - -namespace api.Migrations -{ - [DbContext(typeof(DataContext))] - [Migration("20190319003112_image")] - partial class image - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "2.2.0-rtm-35687") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ClaimType"); - - b.Property("ClaimValue"); - - b.Property("RoleId"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ClaimType"); - - b.Property("ClaimValue"); - - b.Property("UserId"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider"); - - b.Property("ProviderKey"); - - b.Property("ProviderDisplayName"); - - b.Property("UserId"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId"); - - b.Property("LoginProvider"); - - b.Property("Name"); - - b.Property("Value"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens"); - }); - - modelBuilder.Entity("api.Models.Cromos", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("DescLocked"); - - b.Property("DescMostrar"); - - b.Property("DescUnlocked"); - - b.Property("Nome"); - - b.Property("QRCode"); - - b.Property("img"); - - b.Property("pontos"); - - b.Property("unlocked"); - - b.Property("websiteCromo"); - - b.HasKey("Id"); - - b.ToTable("Cromos"); - }); - - modelBuilder.Entity("api.Models.Event", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("Desc"); - - b.Property("Nome"); - - b.Property("aDecorrer"); - - b.Property("custo"); - - b.Property("horas"); - - b.Property("imagem"); - - b.Property("localizacao"); - - b.Property("notas"); - - b.HasKey("Id"); - - b.ToTable("Events"); - }); - - modelBuilder.Entity("api.Models.EventLoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("Desc"); - - b.Property("EventId"); - - b.Property("ImgId"); - - b.Property("Lat"); - - b.Property("Long"); - - b.Property("Nome"); - - b.HasKey("Id"); - - b.HasIndex("ImgId"); - - b.ToTable("EventLocs"); - }); - - modelBuilder.Entity("api.Models.EventLocVisited", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("LocationId"); - - b.Property("TeamId"); - - b.Property("complete"); - - b.Property("timestamp"); - - b.HasKey("Id"); - - b.HasIndex("LocationId"); - - b.HasIndex("TeamId"); - - b.ToTable("EventLocsVisited"); - }); - - modelBuilder.Entity("api.Models.Log", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("UserId"); - - b.Property("UserId1"); - - b.Property("amount"); - - b.Property("available"); - - b.Property("logType"); - - b.Property("productId"); - - b.Property("transactionId"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.HasIndex("UserId1"); - - b.HasIndex("productId"); - - b.ToTable("Logs"); - }); - - modelBuilder.Entity("api.Models.Photo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("DateAdded"); - - b.Property("Description"); - - b.Property("IsMain"); - - b.Property("Url"); - - b.Property("UserId"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("Photos"); - }); - - modelBuilder.Entity("api.Models.Product", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("basePrice"); - - b.Property("name"); - - b.Property("revenue"); - - b.Property("sold"); - - b.HasKey("Id"); - - b.ToTable("Products"); - }); - - modelBuilder.Entity("api.Models.Role", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); - - b.Property("Name") - .HasMaxLength(256); - - b.Property("NormalizedName") - .HasMaxLength(256); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasName("RoleNameIndex"); - - b.ToTable("AspNetRoles"); - }); - - modelBuilder.Entity("api.Models.Team", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("CapQR"); - - b.Property("EventId"); - - b.Property("NMembros"); - - b.Property("Nome"); - - b.Property("Pontos"); - - b.Property("pagamento"); - - b.Property("pagamentoVerifyCode"); - - b.HasKey("Id"); - - b.ToTable("Teams"); - }); - - modelBuilder.Entity("api.Models.User", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("AccessFailedCount"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); - - b.Property("Email") - .HasMaxLength(256); - - b.Property("EmailConfirmed"); - - b.Property("LockoutEnabled"); - - b.Property("LockoutEnd"); - - b.Property("NormalizedEmail") - .HasMaxLength(256); - - b.Property("NormalizedUserName") - .HasMaxLength(256); - - b.Property("PasswordHash"); - - b.Property("PhoneNumber"); - - b.Property("PhoneNumberConfirmed"); - - b.Property("QRcode"); - - b.Property("SecurityStamp"); - - b.Property("TwoFactorEnabled"); - - b.Property("UserName") - .HasMaxLength(256); - - b.Property("cromos"); - - b.Property("drinks"); - - b.Property("food"); - - b.Property("fullName"); - - b.Property("teamID"); - - b.Property("university"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasName("UserNameIndex"); - - b.HasIndex("teamID"); - - b.ToTable("AspNetUsers"); - }); - - modelBuilder.Entity("api.Models.UserRole", b => - { - b.Property("UserId"); - - b.Property("RoleId"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles"); - }); - - modelBuilder.Entity("api.Models.Value", b => - { - b.Property("id") - .ValueGeneratedOnAdd(); - - b.Property("Name"); - - b.HasKey("id"); - - b.ToTable("Values"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("api.Models.Role") - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("api.Models.User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("api.Models.User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("api.Models.User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("api.Models.EventLoc", b => - { - b.HasOne("api.Models.Photo", "Img") - .WithMany() - .HasForeignKey("ImgId"); - }); - - modelBuilder.Entity("api.Models.EventLocVisited", b => - { - b.HasOne("api.Models.EventLoc", "Location") - .WithMany() - .HasForeignKey("LocationId"); - - b.HasOne("api.Models.Team", "Team") - .WithMany() - .HasForeignKey("TeamId"); - }); - - modelBuilder.Entity("api.Models.Log", b => - { - b.HasOne("api.Models.User") - .WithMany("logsFebrada") - .HasForeignKey("UserId"); - - b.HasOne("api.Models.User") - .WithMany("logsFestarola") - .HasForeignKey("UserId1"); - - b.HasOne("api.Models.Product", "product") - .WithMany() - .HasForeignKey("productId"); - }); - - modelBuilder.Entity("api.Models.Photo", b => - { - b.HasOne("api.Models.User", "User") - .WithMany("Photos") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("api.Models.User", b => - { - b.HasOne("api.Models.Team", "team") - .WithMany() - .HasForeignKey("teamID"); - }); - - modelBuilder.Entity("api.Models.UserRole", b => - { - b.HasOne("api.Models.Role", "Role") - .WithMany("UserRoles") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade); - - b.HasOne("api.Models.User", "User") - .WithMany("UserRoles") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/api/Migrations/20190319003112_image.cs b/api/Migrations/20190319003112_image.cs deleted file mode 100644 index c7dda538..00000000 --- a/api/Migrations/20190319003112_image.cs +++ /dev/null @@ -1,52 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace api.Migrations -{ - public partial class image : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "FK_Cromos_Photos_imgId", - table: "Cromos"); - - migrationBuilder.DropIndex( - name: "IX_Cromos_imgId", - table: "Cromos"); - - migrationBuilder.DropColumn( - name: "imgId", - table: "Cromos"); - - migrationBuilder.AddColumn( - name: "img", - table: "Cromos", - nullable: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "img", - table: "Cromos"); - - migrationBuilder.AddColumn( - name: "imgId", - table: "Cromos", - nullable: true); - - migrationBuilder.CreateIndex( - name: "IX_Cromos_imgId", - table: "Cromos", - column: "imgId"); - - migrationBuilder.AddForeignKey( - name: "FK_Cromos_Photos_imgId", - table: "Cromos", - column: "imgId", - principalTable: "Photos", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - } - } -} diff --git a/api/Migrations/20190319005102_imagelogo.Designer.cs b/api/Migrations/20190319005102_imagelogo.Designer.cs deleted file mode 100644 index 29aa3935..00000000 --- a/api/Migrations/20190319005102_imagelogo.Designer.cs +++ /dev/null @@ -1,495 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using api.Data; - -namespace api.Migrations -{ - [DbContext(typeof(DataContext))] - [Migration("20190319005102_imagelogo")] - partial class imagelogo - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "2.2.0-rtm-35687") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ClaimType"); - - b.Property("ClaimValue"); - - b.Property("RoleId"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ClaimType"); - - b.Property("ClaimValue"); - - b.Property("UserId"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider"); - - b.Property("ProviderKey"); - - b.Property("ProviderDisplayName"); - - b.Property("UserId"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId"); - - b.Property("LoginProvider"); - - b.Property("Name"); - - b.Property("Value"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens"); - }); - - modelBuilder.Entity("api.Models.Cromos", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("DescLocked"); - - b.Property("DescMostrar"); - - b.Property("DescUnlocked"); - - b.Property("Nome"); - - b.Property("QRCode"); - - b.Property("img"); - - b.Property("logo"); - - b.Property("pontos"); - - b.Property("unlocked"); - - b.Property("websiteCromo"); - - b.HasKey("Id"); - - b.ToTable("Cromos"); - }); - - modelBuilder.Entity("api.Models.Event", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("Desc"); - - b.Property("Nome"); - - b.Property("aDecorrer"); - - b.Property("custo"); - - b.Property("horas"); - - b.Property("imagem"); - - b.Property("localizacao"); - - b.Property("notas"); - - b.HasKey("Id"); - - b.ToTable("Events"); - }); - - modelBuilder.Entity("api.Models.EventLoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("Desc"); - - b.Property("EventId"); - - b.Property("ImgId"); - - b.Property("Lat"); - - b.Property("Long"); - - b.Property("Nome"); - - b.HasKey("Id"); - - b.HasIndex("ImgId"); - - b.ToTable("EventLocs"); - }); - - modelBuilder.Entity("api.Models.EventLocVisited", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("LocationId"); - - b.Property("TeamId"); - - b.Property("complete"); - - b.Property("timestamp"); - - b.HasKey("Id"); - - b.HasIndex("LocationId"); - - b.HasIndex("TeamId"); - - b.ToTable("EventLocsVisited"); - }); - - modelBuilder.Entity("api.Models.Log", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("UserId"); - - b.Property("UserId1"); - - b.Property("amount"); - - b.Property("available"); - - b.Property("logType"); - - b.Property("productId"); - - b.Property("transactionId"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.HasIndex("UserId1"); - - b.HasIndex("productId"); - - b.ToTable("Logs"); - }); - - modelBuilder.Entity("api.Models.Photo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("DateAdded"); - - b.Property("Description"); - - b.Property("IsMain"); - - b.Property("Url"); - - b.Property("UserId"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("Photos"); - }); - - modelBuilder.Entity("api.Models.Product", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("basePrice"); - - b.Property("name"); - - b.Property("revenue"); - - b.Property("sold"); - - b.HasKey("Id"); - - b.ToTable("Products"); - }); - - modelBuilder.Entity("api.Models.Role", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); - - b.Property("Name") - .HasMaxLength(256); - - b.Property("NormalizedName") - .HasMaxLength(256); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasName("RoleNameIndex"); - - b.ToTable("AspNetRoles"); - }); - - modelBuilder.Entity("api.Models.Team", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("CapQR"); - - b.Property("EventId"); - - b.Property("NMembros"); - - b.Property("Nome"); - - b.Property("Pontos"); - - b.Property("pagamento"); - - b.Property("pagamentoVerifyCode"); - - b.HasKey("Id"); - - b.ToTable("Teams"); - }); - - modelBuilder.Entity("api.Models.User", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("AccessFailedCount"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); - - b.Property("Email") - .HasMaxLength(256); - - b.Property("EmailConfirmed"); - - b.Property("LockoutEnabled"); - - b.Property("LockoutEnd"); - - b.Property("NormalizedEmail") - .HasMaxLength(256); - - b.Property("NormalizedUserName") - .HasMaxLength(256); - - b.Property("PasswordHash"); - - b.Property("PhoneNumber"); - - b.Property("PhoneNumberConfirmed"); - - b.Property("QRcode"); - - b.Property("SecurityStamp"); - - b.Property("TwoFactorEnabled"); - - b.Property("UserName") - .HasMaxLength(256); - - b.Property("cromos"); - - b.Property("drinks"); - - b.Property("food"); - - b.Property("fullName"); - - b.Property("teamID"); - - b.Property("university"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasName("UserNameIndex"); - - b.HasIndex("teamID"); - - b.ToTable("AspNetUsers"); - }); - - modelBuilder.Entity("api.Models.UserRole", b => - { - b.Property("UserId"); - - b.Property("RoleId"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles"); - }); - - modelBuilder.Entity("api.Models.Value", b => - { - b.Property("id") - .ValueGeneratedOnAdd(); - - b.Property("Name"); - - b.HasKey("id"); - - b.ToTable("Values"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("api.Models.Role") - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("api.Models.User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("api.Models.User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("api.Models.User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("api.Models.EventLoc", b => - { - b.HasOne("api.Models.Photo", "Img") - .WithMany() - .HasForeignKey("ImgId"); - }); - - modelBuilder.Entity("api.Models.EventLocVisited", b => - { - b.HasOne("api.Models.EventLoc", "Location") - .WithMany() - .HasForeignKey("LocationId"); - - b.HasOne("api.Models.Team", "Team") - .WithMany() - .HasForeignKey("TeamId"); - }); - - modelBuilder.Entity("api.Models.Log", b => - { - b.HasOne("api.Models.User") - .WithMany("logsFebrada") - .HasForeignKey("UserId"); - - b.HasOne("api.Models.User") - .WithMany("logsFestarola") - .HasForeignKey("UserId1"); - - b.HasOne("api.Models.Product", "product") - .WithMany() - .HasForeignKey("productId"); - }); - - modelBuilder.Entity("api.Models.Photo", b => - { - b.HasOne("api.Models.User", "User") - .WithMany("Photos") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("api.Models.User", b => - { - b.HasOne("api.Models.Team", "team") - .WithMany() - .HasForeignKey("teamID"); - }); - - modelBuilder.Entity("api.Models.UserRole", b => - { - b.HasOne("api.Models.Role", "Role") - .WithMany("UserRoles") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade); - - b.HasOne("api.Models.User", "User") - .WithMany("UserRoles") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/api/Migrations/20190319005102_imagelogo.cs b/api/Migrations/20190319005102_imagelogo.cs deleted file mode 100644 index 57377749..00000000 --- a/api/Migrations/20190319005102_imagelogo.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace api.Migrations -{ - public partial class imagelogo : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "logo", - table: "Cromos", - nullable: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "logo", - table: "Cromos"); - } - } -} diff --git a/api/Migrations/20190322005225_locs.Designer.cs b/api/Migrations/20190322005225_locs.Designer.cs deleted file mode 100644 index e884693b..00000000 --- a/api/Migrations/20190322005225_locs.Designer.cs +++ /dev/null @@ -1,499 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using api.Data; - -namespace api.Migrations -{ - [DbContext(typeof(DataContext))] - [Migration("20190322005225_locs")] - partial class locs - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "2.2.0-rtm-35687") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ClaimType"); - - b.Property("ClaimValue"); - - b.Property("RoleId"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ClaimType"); - - b.Property("ClaimValue"); - - b.Property("UserId"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider"); - - b.Property("ProviderKey"); - - b.Property("ProviderDisplayName"); - - b.Property("UserId"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId"); - - b.Property("LoginProvider"); - - b.Property("Name"); - - b.Property("Value"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens"); - }); - - modelBuilder.Entity("api.Models.Cromos", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("DescLocked"); - - b.Property("DescMostrar"); - - b.Property("DescUnlocked"); - - b.Property("Nome"); - - b.Property("QRCode"); - - b.Property("img"); - - b.Property("logo"); - - b.Property("pontos"); - - b.Property("unlocked"); - - b.Property("websiteCromo"); - - b.HasKey("Id"); - - b.ToTable("Cromos"); - }); - - modelBuilder.Entity("api.Models.Event", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("Desc"); - - b.Property("Nome"); - - b.Property("aDecorrer"); - - b.Property("custo"); - - b.Property("horas"); - - b.Property("imagem"); - - b.Property("localizacao"); - - b.Property("notas"); - - b.HasKey("Id"); - - b.ToTable("Events"); - }); - - modelBuilder.Entity("api.Models.EventLoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("Desc"); - - b.Property("EventId"); - - b.Property("ImgId"); - - b.Property("Lat"); - - b.Property("Long"); - - b.Property("Nome"); - - b.Property("mainPhoto"); - - b.Property("squarePhoto"); - - b.HasKey("Id"); - - b.HasIndex("ImgId"); - - b.ToTable("EventLocs"); - }); - - modelBuilder.Entity("api.Models.EventLocVisited", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("LocationId"); - - b.Property("TeamId"); - - b.Property("complete"); - - b.Property("timestamp"); - - b.HasKey("Id"); - - b.HasIndex("LocationId"); - - b.HasIndex("TeamId"); - - b.ToTable("EventLocsVisited"); - }); - - modelBuilder.Entity("api.Models.Log", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("UserId"); - - b.Property("UserId1"); - - b.Property("amount"); - - b.Property("available"); - - b.Property("logType"); - - b.Property("productId"); - - b.Property("transactionId"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.HasIndex("UserId1"); - - b.HasIndex("productId"); - - b.ToTable("Logs"); - }); - - modelBuilder.Entity("api.Models.Photo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("DateAdded"); - - b.Property("Description"); - - b.Property("IsMain"); - - b.Property("Url"); - - b.Property("UserId"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("Photos"); - }); - - modelBuilder.Entity("api.Models.Product", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("basePrice"); - - b.Property("name"); - - b.Property("revenue"); - - b.Property("sold"); - - b.HasKey("Id"); - - b.ToTable("Products"); - }); - - modelBuilder.Entity("api.Models.Role", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); - - b.Property("Name") - .HasMaxLength(256); - - b.Property("NormalizedName") - .HasMaxLength(256); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasName("RoleNameIndex"); - - b.ToTable("AspNetRoles"); - }); - - modelBuilder.Entity("api.Models.Team", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("CapQR"); - - b.Property("EventId"); - - b.Property("NMembros"); - - b.Property("Nome"); - - b.Property("Pontos"); - - b.Property("pagamento"); - - b.Property("pagamentoVerifyCode"); - - b.HasKey("Id"); - - b.ToTable("Teams"); - }); - - modelBuilder.Entity("api.Models.User", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("AccessFailedCount"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); - - b.Property("Email") - .HasMaxLength(256); - - b.Property("EmailConfirmed"); - - b.Property("LockoutEnabled"); - - b.Property("LockoutEnd"); - - b.Property("NormalizedEmail") - .HasMaxLength(256); - - b.Property("NormalizedUserName") - .HasMaxLength(256); - - b.Property("PasswordHash"); - - b.Property("PhoneNumber"); - - b.Property("PhoneNumberConfirmed"); - - b.Property("QRcode"); - - b.Property("SecurityStamp"); - - b.Property("TwoFactorEnabled"); - - b.Property("UserName") - .HasMaxLength(256); - - b.Property("cromos"); - - b.Property("drinks"); - - b.Property("food"); - - b.Property("fullName"); - - b.Property("teamID"); - - b.Property("university"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasName("UserNameIndex"); - - b.HasIndex("teamID"); - - b.ToTable("AspNetUsers"); - }); - - modelBuilder.Entity("api.Models.UserRole", b => - { - b.Property("UserId"); - - b.Property("RoleId"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles"); - }); - - modelBuilder.Entity("api.Models.Value", b => - { - b.Property("id") - .ValueGeneratedOnAdd(); - - b.Property("Name"); - - b.HasKey("id"); - - b.ToTable("Values"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("api.Models.Role") - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("api.Models.User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("api.Models.User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("api.Models.User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("api.Models.EventLoc", b => - { - b.HasOne("api.Models.Photo", "Img") - .WithMany() - .HasForeignKey("ImgId"); - }); - - modelBuilder.Entity("api.Models.EventLocVisited", b => - { - b.HasOne("api.Models.EventLoc", "Location") - .WithMany() - .HasForeignKey("LocationId"); - - b.HasOne("api.Models.Team", "Team") - .WithMany() - .HasForeignKey("TeamId"); - }); - - modelBuilder.Entity("api.Models.Log", b => - { - b.HasOne("api.Models.User") - .WithMany("logsFebrada") - .HasForeignKey("UserId"); - - b.HasOne("api.Models.User") - .WithMany("logsFestarola") - .HasForeignKey("UserId1"); - - b.HasOne("api.Models.Product", "product") - .WithMany() - .HasForeignKey("productId"); - }); - - modelBuilder.Entity("api.Models.Photo", b => - { - b.HasOne("api.Models.User", "User") - .WithMany("Photos") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("api.Models.User", b => - { - b.HasOne("api.Models.Team", "team") - .WithMany() - .HasForeignKey("teamID"); - }); - - modelBuilder.Entity("api.Models.UserRole", b => - { - b.HasOne("api.Models.Role", "Role") - .WithMany("UserRoles") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade); - - b.HasOne("api.Models.User", "User") - .WithMany("UserRoles") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/api/Migrations/20190322005225_locs.cs b/api/Migrations/20190322005225_locs.cs deleted file mode 100644 index f574a6d2..00000000 --- a/api/Migrations/20190322005225_locs.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace api.Migrations -{ - public partial class locs : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "mainPhoto", - table: "EventLocs", - nullable: true); - - migrationBuilder.AddColumn( - name: "squarePhoto", - table: "EventLocs", - nullable: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "mainPhoto", - table: "EventLocs"); - - migrationBuilder.DropColumn( - name: "squarePhoto", - table: "EventLocs"); - } - } -} diff --git a/api/Migrations/20190322014157_eventloc.Designer.cs b/api/Migrations/20190322014157_eventloc.Designer.cs deleted file mode 100644 index 748e14d8..00000000 --- a/api/Migrations/20190322014157_eventloc.Designer.cs +++ /dev/null @@ -1,503 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using api.Data; - -namespace api.Migrations -{ - [DbContext(typeof(DataContext))] - [Migration("20190322014157_eventloc")] - partial class eventloc - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "2.2.0-rtm-35687") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ClaimType"); - - b.Property("ClaimValue"); - - b.Property("RoleId"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ClaimType"); - - b.Property("ClaimValue"); - - b.Property("UserId"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider"); - - b.Property("ProviderKey"); - - b.Property("ProviderDisplayName"); - - b.Property("UserId"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId"); - - b.Property("LoginProvider"); - - b.Property("Name"); - - b.Property("Value"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens"); - }); - - modelBuilder.Entity("api.Models.Cromos", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("DescLocked"); - - b.Property("DescMostrar"); - - b.Property("DescUnlocked"); - - b.Property("Nome"); - - b.Property("QRCode"); - - b.Property("img"); - - b.Property("logo"); - - b.Property("pontos"); - - b.Property("unlocked"); - - b.Property("websiteCromo"); - - b.HasKey("Id"); - - b.ToTable("Cromos"); - }); - - modelBuilder.Entity("api.Models.Event", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("Desc"); - - b.Property("Nome"); - - b.Property("aDecorrer"); - - b.Property("custo"); - - b.Property("horas"); - - b.Property("imagem"); - - b.Property("localizacao"); - - b.Property("notas"); - - b.HasKey("Id"); - - b.ToTable("Events"); - }); - - modelBuilder.Entity("api.Models.EventLoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("Desc"); - - b.Property("EventId"); - - b.Property("ImgId"); - - b.Property("Lat"); - - b.Property("Long"); - - b.Property("Nome"); - - b.Property("desafio"); - - b.Property("mainPhoto"); - - b.Property("pontos"); - - b.Property("squarePhoto"); - - b.HasKey("Id"); - - b.HasIndex("ImgId"); - - b.ToTable("EventLocs"); - }); - - modelBuilder.Entity("api.Models.EventLocVisited", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("LocationId"); - - b.Property("TeamId"); - - b.Property("complete"); - - b.Property("timestamp"); - - b.HasKey("Id"); - - b.HasIndex("LocationId"); - - b.HasIndex("TeamId"); - - b.ToTable("EventLocsVisited"); - }); - - modelBuilder.Entity("api.Models.Log", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("UserId"); - - b.Property("UserId1"); - - b.Property("amount"); - - b.Property("available"); - - b.Property("logType"); - - b.Property("productId"); - - b.Property("transactionId"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.HasIndex("UserId1"); - - b.HasIndex("productId"); - - b.ToTable("Logs"); - }); - - modelBuilder.Entity("api.Models.Photo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("DateAdded"); - - b.Property("Description"); - - b.Property("IsMain"); - - b.Property("Url"); - - b.Property("UserId"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("Photos"); - }); - - modelBuilder.Entity("api.Models.Product", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("basePrice"); - - b.Property("name"); - - b.Property("revenue"); - - b.Property("sold"); - - b.HasKey("Id"); - - b.ToTable("Products"); - }); - - modelBuilder.Entity("api.Models.Role", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); - - b.Property("Name") - .HasMaxLength(256); - - b.Property("NormalizedName") - .HasMaxLength(256); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasName("RoleNameIndex"); - - b.ToTable("AspNetRoles"); - }); - - modelBuilder.Entity("api.Models.Team", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("CapQR"); - - b.Property("EventId"); - - b.Property("NMembros"); - - b.Property("Nome"); - - b.Property("Pontos"); - - b.Property("pagamento"); - - b.Property("pagamentoVerifyCode"); - - b.HasKey("Id"); - - b.ToTable("Teams"); - }); - - modelBuilder.Entity("api.Models.User", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("AccessFailedCount"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); - - b.Property("Email") - .HasMaxLength(256); - - b.Property("EmailConfirmed"); - - b.Property("LockoutEnabled"); - - b.Property("LockoutEnd"); - - b.Property("NormalizedEmail") - .HasMaxLength(256); - - b.Property("NormalizedUserName") - .HasMaxLength(256); - - b.Property("PasswordHash"); - - b.Property("PhoneNumber"); - - b.Property("PhoneNumberConfirmed"); - - b.Property("QRcode"); - - b.Property("SecurityStamp"); - - b.Property("TwoFactorEnabled"); - - b.Property("UserName") - .HasMaxLength(256); - - b.Property("cromos"); - - b.Property("drinks"); - - b.Property("food"); - - b.Property("fullName"); - - b.Property("teamID"); - - b.Property("university"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasName("UserNameIndex"); - - b.HasIndex("teamID"); - - b.ToTable("AspNetUsers"); - }); - - modelBuilder.Entity("api.Models.UserRole", b => - { - b.Property("UserId"); - - b.Property("RoleId"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles"); - }); - - modelBuilder.Entity("api.Models.Value", b => - { - b.Property("id") - .ValueGeneratedOnAdd(); - - b.Property("Name"); - - b.HasKey("id"); - - b.ToTable("Values"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("api.Models.Role") - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("api.Models.User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("api.Models.User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("api.Models.User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("api.Models.EventLoc", b => - { - b.HasOne("api.Models.Photo", "Img") - .WithMany() - .HasForeignKey("ImgId"); - }); - - modelBuilder.Entity("api.Models.EventLocVisited", b => - { - b.HasOne("api.Models.EventLoc", "Location") - .WithMany() - .HasForeignKey("LocationId"); - - b.HasOne("api.Models.Team", "Team") - .WithMany() - .HasForeignKey("TeamId"); - }); - - modelBuilder.Entity("api.Models.Log", b => - { - b.HasOne("api.Models.User") - .WithMany("logsFebrada") - .HasForeignKey("UserId"); - - b.HasOne("api.Models.User") - .WithMany("logsFestarola") - .HasForeignKey("UserId1"); - - b.HasOne("api.Models.Product", "product") - .WithMany() - .HasForeignKey("productId"); - }); - - modelBuilder.Entity("api.Models.Photo", b => - { - b.HasOne("api.Models.User", "User") - .WithMany("Photos") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("api.Models.User", b => - { - b.HasOne("api.Models.Team", "team") - .WithMany() - .HasForeignKey("teamID"); - }); - - modelBuilder.Entity("api.Models.UserRole", b => - { - b.HasOne("api.Models.Role", "Role") - .WithMany("UserRoles") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade); - - b.HasOne("api.Models.User", "User") - .WithMany("UserRoles") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/api/Migrations/20190322014157_eventloc.cs b/api/Migrations/20190322014157_eventloc.cs deleted file mode 100644 index 86e7426f..00000000 --- a/api/Migrations/20190322014157_eventloc.cs +++ /dev/null @@ -1,32 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace api.Migrations -{ - public partial class eventloc : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "desafio", - table: "EventLocs", - nullable: true); - - migrationBuilder.AddColumn( - name: "pontos", - table: "EventLocs", - nullable: false, - defaultValue: 0); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "desafio", - table: "EventLocs"); - - migrationBuilder.DropColumn( - name: "pontos", - table: "EventLocs"); - } - } -} diff --git a/api/Migrations/20190322014229_eventlocpos.Designer.cs b/api/Migrations/20190322014229_eventlocpos.Designer.cs deleted file mode 100644 index 5b0281d7..00000000 --- a/api/Migrations/20190322014229_eventlocpos.Designer.cs +++ /dev/null @@ -1,505 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using api.Data; - -namespace api.Migrations -{ - [DbContext(typeof(DataContext))] - [Migration("20190322014229_eventlocpos")] - partial class eventlocpos - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "2.2.0-rtm-35687") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ClaimType"); - - b.Property("ClaimValue"); - - b.Property("RoleId"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ClaimType"); - - b.Property("ClaimValue"); - - b.Property("UserId"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider"); - - b.Property("ProviderKey"); - - b.Property("ProviderDisplayName"); - - b.Property("UserId"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId"); - - b.Property("LoginProvider"); - - b.Property("Name"); - - b.Property("Value"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens"); - }); - - modelBuilder.Entity("api.Models.Cromos", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("DescLocked"); - - b.Property("DescMostrar"); - - b.Property("DescUnlocked"); - - b.Property("Nome"); - - b.Property("QRCode"); - - b.Property("img"); - - b.Property("logo"); - - b.Property("pontos"); - - b.Property("unlocked"); - - b.Property("websiteCromo"); - - b.HasKey("Id"); - - b.ToTable("Cromos"); - }); - - modelBuilder.Entity("api.Models.Event", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("Desc"); - - b.Property("Nome"); - - b.Property("aDecorrer"); - - b.Property("custo"); - - b.Property("horas"); - - b.Property("imagem"); - - b.Property("localizacao"); - - b.Property("notas"); - - b.HasKey("Id"); - - b.ToTable("Events"); - }); - - modelBuilder.Entity("api.Models.EventLoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("Desc"); - - b.Property("EventId"); - - b.Property("ImgId"); - - b.Property("Lat"); - - b.Property("Long"); - - b.Property("Nome"); - - b.Property("desafio"); - - b.Property("localizacao"); - - b.Property("mainPhoto"); - - b.Property("pontos"); - - b.Property("squarePhoto"); - - b.HasKey("Id"); - - b.HasIndex("ImgId"); - - b.ToTable("EventLocs"); - }); - - modelBuilder.Entity("api.Models.EventLocVisited", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("LocationId"); - - b.Property("TeamId"); - - b.Property("complete"); - - b.Property("timestamp"); - - b.HasKey("Id"); - - b.HasIndex("LocationId"); - - b.HasIndex("TeamId"); - - b.ToTable("EventLocsVisited"); - }); - - modelBuilder.Entity("api.Models.Log", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("UserId"); - - b.Property("UserId1"); - - b.Property("amount"); - - b.Property("available"); - - b.Property("logType"); - - b.Property("productId"); - - b.Property("transactionId"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.HasIndex("UserId1"); - - b.HasIndex("productId"); - - b.ToTable("Logs"); - }); - - modelBuilder.Entity("api.Models.Photo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("DateAdded"); - - b.Property("Description"); - - b.Property("IsMain"); - - b.Property("Url"); - - b.Property("UserId"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("Photos"); - }); - - modelBuilder.Entity("api.Models.Product", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("basePrice"); - - b.Property("name"); - - b.Property("revenue"); - - b.Property("sold"); - - b.HasKey("Id"); - - b.ToTable("Products"); - }); - - modelBuilder.Entity("api.Models.Role", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); - - b.Property("Name") - .HasMaxLength(256); - - b.Property("NormalizedName") - .HasMaxLength(256); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasName("RoleNameIndex"); - - b.ToTable("AspNetRoles"); - }); - - modelBuilder.Entity("api.Models.Team", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("CapQR"); - - b.Property("EventId"); - - b.Property("NMembros"); - - b.Property("Nome"); - - b.Property("Pontos"); - - b.Property("pagamento"); - - b.Property("pagamentoVerifyCode"); - - b.HasKey("Id"); - - b.ToTable("Teams"); - }); - - modelBuilder.Entity("api.Models.User", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("AccessFailedCount"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); - - b.Property("Email") - .HasMaxLength(256); - - b.Property("EmailConfirmed"); - - b.Property("LockoutEnabled"); - - b.Property("LockoutEnd"); - - b.Property("NormalizedEmail") - .HasMaxLength(256); - - b.Property("NormalizedUserName") - .HasMaxLength(256); - - b.Property("PasswordHash"); - - b.Property("PhoneNumber"); - - b.Property("PhoneNumberConfirmed"); - - b.Property("QRcode"); - - b.Property("SecurityStamp"); - - b.Property("TwoFactorEnabled"); - - b.Property("UserName") - .HasMaxLength(256); - - b.Property("cromos"); - - b.Property("drinks"); - - b.Property("food"); - - b.Property("fullName"); - - b.Property("teamID"); - - b.Property("university"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasName("UserNameIndex"); - - b.HasIndex("teamID"); - - b.ToTable("AspNetUsers"); - }); - - modelBuilder.Entity("api.Models.UserRole", b => - { - b.Property("UserId"); - - b.Property("RoleId"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles"); - }); - - modelBuilder.Entity("api.Models.Value", b => - { - b.Property("id") - .ValueGeneratedOnAdd(); - - b.Property("Name"); - - b.HasKey("id"); - - b.ToTable("Values"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("api.Models.Role") - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("api.Models.User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("api.Models.User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("api.Models.User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("api.Models.EventLoc", b => - { - b.HasOne("api.Models.Photo", "Img") - .WithMany() - .HasForeignKey("ImgId"); - }); - - modelBuilder.Entity("api.Models.EventLocVisited", b => - { - b.HasOne("api.Models.EventLoc", "Location") - .WithMany() - .HasForeignKey("LocationId"); - - b.HasOne("api.Models.Team", "Team") - .WithMany() - .HasForeignKey("TeamId"); - }); - - modelBuilder.Entity("api.Models.Log", b => - { - b.HasOne("api.Models.User") - .WithMany("logsFebrada") - .HasForeignKey("UserId"); - - b.HasOne("api.Models.User") - .WithMany("logsFestarola") - .HasForeignKey("UserId1"); - - b.HasOne("api.Models.Product", "product") - .WithMany() - .HasForeignKey("productId"); - }); - - modelBuilder.Entity("api.Models.Photo", b => - { - b.HasOne("api.Models.User", "User") - .WithMany("Photos") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("api.Models.User", b => - { - b.HasOne("api.Models.Team", "team") - .WithMany() - .HasForeignKey("teamID"); - }); - - modelBuilder.Entity("api.Models.UserRole", b => - { - b.HasOne("api.Models.Role", "Role") - .WithMany("UserRoles") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade); - - b.HasOne("api.Models.User", "User") - .WithMany("UserRoles") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/api/Migrations/20190322014229_eventlocpos.cs b/api/Migrations/20190322014229_eventlocpos.cs deleted file mode 100644 index 0437718f..00000000 --- a/api/Migrations/20190322014229_eventlocpos.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace api.Migrations -{ - public partial class eventlocpos : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "localizacao", - table: "EventLocs", - nullable: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "localizacao", - table: "EventLocs"); - } - } -} diff --git a/api/Migrations/20190322021203_a.cs b/api/Migrations/20190322021203_a.cs deleted file mode 100644 index 82e62121..00000000 --- a/api/Migrations/20190322021203_a.cs +++ /dev/null @@ -1,37 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace api.Migrations -{ - public partial class a : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "Long", - table: "EventLocs", - nullable: false, - oldClrType: typeof(float)); - - migrationBuilder.AlterColumn( - name: "Lat", - table: "EventLocs", - nullable: false, - oldClrType: typeof(float)); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "Long", - table: "EventLocs", - nullable: false, - oldClrType: typeof(double)); - - migrationBuilder.AlterColumn( - name: "Lat", - table: "EventLocs", - nullable: false, - oldClrType: typeof(double)); - } - } -} diff --git a/api/Migrations/20190322021203_a.Designer.cs b/api/Migrations/20190323222043_uo.Designer.cs similarity index 99% rename from api/Migrations/20190322021203_a.Designer.cs rename to api/Migrations/20190323222043_uo.Designer.cs index af552160..33972b68 100644 --- a/api/Migrations/20190322021203_a.Designer.cs +++ b/api/Migrations/20190323222043_uo.Designer.cs @@ -9,8 +9,8 @@ using api.Data; namespace api.Migrations { [DbContext(typeof(DataContext))] - [Migration("20190322021203_a")] - partial class a + [Migration("20190323222043_uo")] + partial class uo { protected override void BuildTargetModel(ModelBuilder modelBuilder) { @@ -364,6 +364,8 @@ namespace api.Migrations b.Property("fullName"); + b.Property("profileImage"); + b.Property("teamID"); b.Property("university"); diff --git a/api/Migrations/20190323222043_uo.cs b/api/Migrations/20190323222043_uo.cs new file mode 100644 index 00000000..caff13e9 --- /dev/null +++ b/api/Migrations/20190323222043_uo.cs @@ -0,0 +1,508 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace api.Migrations +{ + public partial class uo : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "AspNetRoles", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + Name = table.Column(maxLength: 256, nullable: true), + NormalizedName = table.Column(maxLength: 256, nullable: true), + ConcurrencyStamp = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetRoles", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Cromos", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + QRCode = table.Column(nullable: true), + Nome = table.Column(nullable: true), + DescLocked = table.Column(nullable: true), + DescUnlocked = table.Column(nullable: true), + DescMostrar = table.Column(nullable: true), + img = table.Column(nullable: true), + websiteCromo = table.Column(nullable: true), + unlocked = table.Column(nullable: false), + logo = table.Column(nullable: true), + pontos = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Cromos", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Events", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + Nome = table.Column(nullable: true), + Desc = table.Column(nullable: true), + imagem = table.Column(nullable: true), + horas = table.Column(nullable: true), + aDecorrer = table.Column(nullable: false), + localizacao = table.Column(nullable: true), + notas = table.Column(nullable: true), + custo = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Events", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Products", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + name = table.Column(nullable: true), + basePrice = table.Column(nullable: false), + sold = table.Column(nullable: false), + revenue = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Products", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Teams", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + EventId = table.Column(nullable: false), + Nome = table.Column(nullable: true), + CapQR = table.Column(nullable: true), + NMembros = table.Column(nullable: false), + Pontos = table.Column(nullable: false), + pagamento = table.Column(nullable: false), + pagamentoVerifyCode = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Teams", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Values", + columns: table => new + { + id = table.Column(nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + Name = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Values", x => x.id); + }); + + migrationBuilder.CreateTable( + name: "AspNetRoleClaims", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + RoleId = table.Column(nullable: false), + ClaimType = table.Column(nullable: true), + ClaimValue = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetRoleClaims", x => x.Id); + table.ForeignKey( + name: "FK_AspNetRoleClaims_AspNetRoles_RoleId", + column: x => x.RoleId, + principalTable: "AspNetRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AspNetUsers", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + UserName = table.Column(maxLength: 256, nullable: true), + NormalizedUserName = table.Column(maxLength: 256, nullable: true), + Email = table.Column(maxLength: 256, nullable: true), + NormalizedEmail = table.Column(maxLength: 256, nullable: true), + EmailConfirmed = table.Column(nullable: false), + PasswordHash = table.Column(nullable: true), + SecurityStamp = table.Column(nullable: true), + ConcurrencyStamp = table.Column(nullable: true), + PhoneNumber = table.Column(nullable: true), + PhoneNumberConfirmed = table.Column(nullable: false), + TwoFactorEnabled = table.Column(nullable: false), + LockoutEnd = table.Column(nullable: true), + LockoutEnabled = table.Column(nullable: false), + AccessFailedCount = table.Column(nullable: false), + fullName = table.Column(nullable: true), + university = table.Column(nullable: true), + QRcode = table.Column(nullable: true), + drinks = table.Column(nullable: false), + food = table.Column(nullable: false), + teamID = table.Column(nullable: true), + cromos = table.Column(nullable: true), + profileImage = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetUsers", x => x.Id); + table.ForeignKey( + name: "FK_AspNetUsers_Teams_teamID", + column: x => x.teamID, + principalTable: "Teams", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "AspNetUserClaims", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + UserId = table.Column(nullable: false), + ClaimType = table.Column(nullable: true), + ClaimValue = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetUserClaims", x => x.Id); + table.ForeignKey( + name: "FK_AspNetUserClaims_AspNetUsers_UserId", + column: x => x.UserId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AspNetUserLogins", + columns: table => new + { + LoginProvider = table.Column(nullable: false), + ProviderKey = table.Column(nullable: false), + ProviderDisplayName = table.Column(nullable: true), + UserId = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetUserLogins", x => new { x.LoginProvider, x.ProviderKey }); + table.ForeignKey( + name: "FK_AspNetUserLogins_AspNetUsers_UserId", + column: x => x.UserId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AspNetUserRoles", + columns: table => new + { + UserId = table.Column(nullable: false), + RoleId = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetUserRoles", x => new { x.UserId, x.RoleId }); + table.ForeignKey( + name: "FK_AspNetUserRoles_AspNetRoles_RoleId", + column: x => x.RoleId, + principalTable: "AspNetRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_AspNetUserRoles_AspNetUsers_UserId", + column: x => x.UserId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AspNetUserTokens", + columns: table => new + { + UserId = table.Column(nullable: false), + LoginProvider = table.Column(nullable: false), + Name = table.Column(nullable: false), + Value = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); + table.ForeignKey( + name: "FK_AspNetUserTokens_AspNetUsers_UserId", + column: x => x.UserId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Logs", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + amount = table.Column(nullable: false), + available = table.Column(nullable: false), + productId = table.Column(nullable: true), + transactionId = table.Column(nullable: true), + logType = table.Column(nullable: true), + UserId = table.Column(nullable: true), + UserId1 = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Logs", x => x.Id); + table.ForeignKey( + name: "FK_Logs_AspNetUsers_UserId", + column: x => x.UserId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_Logs_AspNetUsers_UserId1", + column: x => x.UserId1, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_Logs_Products_productId", + column: x => x.productId, + principalTable: "Products", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "Photos", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + Url = table.Column(nullable: true), + Description = table.Column(nullable: true), + DateAdded = table.Column(nullable: false), + IsMain = table.Column(nullable: false), + UserId = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Photos", x => x.Id); + table.ForeignKey( + name: "FK_Photos_AspNetUsers_UserId", + column: x => x.UserId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "EventLocs", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + EventId = table.Column(nullable: false), + Lat = table.Column(nullable: false), + Long = table.Column(nullable: false), + Nome = table.Column(nullable: true), + Desc = table.Column(nullable: true), + ImgId = table.Column(nullable: true), + squarePhoto = table.Column(nullable: true), + mainPhoto = table.Column(nullable: true), + desafio = table.Column(nullable: true), + pontos = table.Column(nullable: false), + localizacao = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_EventLocs", x => x.Id); + table.ForeignKey( + name: "FK_EventLocs_Photos_ImgId", + column: x => x.ImgId, + principalTable: "Photos", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "EventLocsVisited", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + TeamId = table.Column(nullable: true), + LocationId = table.Column(nullable: true), + timestamp = table.Column(nullable: false), + complete = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_EventLocsVisited", x => x.Id); + table.ForeignKey( + name: "FK_EventLocsVisited_EventLocs_LocationId", + column: x => x.LocationId, + principalTable: "EventLocs", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_EventLocsVisited_Teams_TeamId", + column: x => x.TeamId, + principalTable: "Teams", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateIndex( + name: "IX_AspNetRoleClaims_RoleId", + table: "AspNetRoleClaims", + column: "RoleId"); + + migrationBuilder.CreateIndex( + name: "RoleNameIndex", + table: "AspNetRoles", + column: "NormalizedName", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AspNetUserClaims_UserId", + table: "AspNetUserClaims", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_AspNetUserLogins_UserId", + table: "AspNetUserLogins", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_AspNetUserRoles_RoleId", + table: "AspNetUserRoles", + column: "RoleId"); + + migrationBuilder.CreateIndex( + name: "EmailIndex", + table: "AspNetUsers", + column: "NormalizedEmail"); + + migrationBuilder.CreateIndex( + name: "UserNameIndex", + table: "AspNetUsers", + column: "NormalizedUserName", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AspNetUsers_teamID", + table: "AspNetUsers", + column: "teamID"); + + migrationBuilder.CreateIndex( + name: "IX_EventLocs_ImgId", + table: "EventLocs", + column: "ImgId"); + + migrationBuilder.CreateIndex( + name: "IX_EventLocsVisited_LocationId", + table: "EventLocsVisited", + column: "LocationId"); + + migrationBuilder.CreateIndex( + name: "IX_EventLocsVisited_TeamId", + table: "EventLocsVisited", + column: "TeamId"); + + migrationBuilder.CreateIndex( + name: "IX_Logs_UserId", + table: "Logs", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_Logs_UserId1", + table: "Logs", + column: "UserId1"); + + migrationBuilder.CreateIndex( + name: "IX_Logs_productId", + table: "Logs", + column: "productId"); + + migrationBuilder.CreateIndex( + name: "IX_Photos_UserId", + table: "Photos", + column: "UserId"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AspNetRoleClaims"); + + migrationBuilder.DropTable( + name: "AspNetUserClaims"); + + migrationBuilder.DropTable( + name: "AspNetUserLogins"); + + migrationBuilder.DropTable( + name: "AspNetUserRoles"); + + migrationBuilder.DropTable( + name: "AspNetUserTokens"); + + migrationBuilder.DropTable( + name: "Cromos"); + + migrationBuilder.DropTable( + name: "EventLocsVisited"); + + migrationBuilder.DropTable( + name: "Events"); + + migrationBuilder.DropTable( + name: "Logs"); + + migrationBuilder.DropTable( + name: "Values"); + + migrationBuilder.DropTable( + name: "AspNetRoles"); + + migrationBuilder.DropTable( + name: "EventLocs"); + + migrationBuilder.DropTable( + name: "Products"); + + migrationBuilder.DropTable( + name: "Photos"); + + migrationBuilder.DropTable( + name: "AspNetUsers"); + + migrationBuilder.DropTable( + name: "Teams"); + } + } +} diff --git a/api/Migrations/DataContextModelSnapshot.cs b/api/Migrations/DataContextModelSnapshot.cs old mode 100755 new mode 100644 index 0a7d84f7..0a3e35c6 --- a/api/Migrations/DataContextModelSnapshot.cs +++ b/api/Migrations/DataContextModelSnapshot.cs @@ -362,6 +362,8 @@ namespace api.Migrations b.Property("fullName"); + b.Property("profileImage"); + b.Property("teamID"); b.Property("university"); diff --git a/api/Models/User.cs b/api/Models/User.cs index 599bcde1..1917e1a6 100755 --- a/api/Models/User.cs +++ b/api/Models/User.cs @@ -23,6 +23,6 @@ namespace api.Models public Team team{get;set;} public string cromos {get;set;} - + public string profileImage{get;set;} } } \ No newline at end of file diff --git a/api/Views/Landing/android-chrome-256x256.png b/api/Views/Landing/android-chrome-256x256.png old mode 100644 new mode 100755 diff --git a/api/Views/Landing/career-path.html b/api/Views/Landing/career-path.html old mode 100644 new mode 100755 diff --git a/api/Views/Landing/ctf.html b/api/Views/Landing/ctf.html old mode 100644 new mode 100755 diff --git a/api/Views/Landing/faqs.html b/api/Views/Landing/faqs.html old mode 100644 new mode 100755 diff --git a/api/Views/Landing/imgs/blip-sponsor.png b/api/Views/Landing/imgs/blip-sponsor.png old mode 100644 new mode 100755 diff --git a/api/Views/Landing/imgs/blip-sponsor.svg b/api/Views/Landing/imgs/blip-sponsor.svg old mode 100644 new mode 100755 diff --git a/api/Views/Landing/imgs/critical-sponsor.png b/api/Views/Landing/imgs/critical-sponsor.png old mode 100644 new mode 100755 diff --git a/api/Views/Landing/imgs/critical-sponsor.svg b/api/Views/Landing/imgs/critical-sponsor.svg old mode 100644 new mode 100755 diff --git a/api/Views/Landing/imgs/email.svg b/api/Views/Landing/imgs/email.svg old mode 100644 new mode 100755 diff --git a/api/Views/Landing/imgs/facebook.svg b/api/Views/Landing/imgs/facebook.svg old mode 100644 new mode 100755 diff --git a/api/Views/Landing/imgs/image.png b/api/Views/Landing/imgs/image.png old mode 100644 new mode 100755 diff --git a/api/Views/Landing/imgs/instagram.svg b/api/Views/Landing/imgs/instagram.svg old mode 100644 new mode 100755 diff --git a/api/Views/Landing/imgs/linkedin.svg b/api/Views/Landing/imgs/linkedin.svg old mode 100644 new mode 100755 diff --git a/api/Views/Landing/imgs/logo-enei.ai b/api/Views/Landing/imgs/logo-enei.ai old mode 100644 new mode 100755 diff --git a/api/Views/Landing/imgs/logo-enei.svg b/api/Views/Landing/imgs/logo-enei.svg old mode 100644 new mode 100755 diff --git a/api/Views/Landing/imgs/novaBase-sponsor.jpg b/api/Views/Landing/imgs/novaBase-sponsor.jpg old mode 100644 new mode 100755 diff --git a/api/Views/android-chrome-256x256.png b/api/Views/android-chrome-256x256.png old mode 100644 new mode 100755 diff --git a/api/Views/career-path.html b/api/Views/career-path.html old mode 100644 new mode 100755 diff --git a/api/Views/ctf.html b/api/Views/ctf.html old mode 100644 new mode 100755 diff --git a/api/Views/faqs.html b/api/Views/faqs.html old mode 100644 new mode 100755 diff --git a/api/Views/imgs/blip-sponsor.png b/api/Views/imgs/blip-sponsor.png old mode 100644 new mode 100755 diff --git a/api/Views/imgs/blip-sponsor.svg b/api/Views/imgs/blip-sponsor.svg old mode 100644 new mode 100755 diff --git a/api/Views/imgs/critical-sponsor.png b/api/Views/imgs/critical-sponsor.png old mode 100644 new mode 100755 diff --git a/api/Views/imgs/critical-sponsor.svg b/api/Views/imgs/critical-sponsor.svg old mode 100644 new mode 100755 diff --git a/api/Views/imgs/email.svg b/api/Views/imgs/email.svg old mode 100644 new mode 100755 diff --git a/api/Views/imgs/facebook.svg b/api/Views/imgs/facebook.svg old mode 100644 new mode 100755 diff --git a/api/Views/imgs/image.png b/api/Views/imgs/image.png old mode 100644 new mode 100755 diff --git a/api/Views/imgs/instagram.svg b/api/Views/imgs/instagram.svg old mode 100644 new mode 100755 diff --git a/api/Views/imgs/linkedin.svg b/api/Views/imgs/linkedin.svg old mode 100644 new mode 100755 diff --git a/api/Views/imgs/logo-enei.ai b/api/Views/imgs/logo-enei.ai old mode 100644 new mode 100755 diff --git a/api/Views/imgs/logo-enei.svg b/api/Views/imgs/logo-enei.svg old mode 100644 new mode 100755 diff --git a/api/Views/imgs/novaBase-sponsor.jpg b/api/Views/imgs/novaBase-sponsor.jpg old mode 100644 new mode 100755 diff --git a/api/appsettings.Production.json b/api/appsettings.Production.json old mode 100644 new mode 100755 index 3d1084f6..8f0be3bc --- a/api/appsettings.Production.json +++ b/api/appsettings.Production.json @@ -5,7 +5,7 @@ }, "ConnectionStrings": { - "DefaultConnection":"server=enei.zmiguel.me;port=3306;database=enei;uid=enei;password=ENEIMegaPassword!" + "DefaultConnection":"server=35.195.235.45;database=enei;uid=api;password=VkGTCmDAg6p4THnE" }, "Logging": { diff --git a/api/appsettings.json b/api/appsettings.json index 0fcc572a..95bb951d 100755 --- a/api/appsettings.json +++ b/api/appsettings.json @@ -5,7 +5,7 @@ }, "ConnectionStrings": { - "DefaultConnection":"server=enei.zmiguel.me;port=3306;database=enei;uid=enei;password=ENEIMegaPassword!" + "DefaultConnection":"server=35.195.235.45;database=enei;uid=api;password=VkGTCmDAg6p4THnE" }, "Logging": { diff --git a/api/wwwroot/Landing/android-chrome-256x256.png b/api/wwwroot/Landing/android-chrome-256x256.png old mode 100644 new mode 100755 diff --git a/api/wwwroot/Landing/career-path.html b/api/wwwroot/Landing/career-path.html old mode 100644 new mode 100755 diff --git a/api/wwwroot/Landing/ctf.html b/api/wwwroot/Landing/ctf.html old mode 100644 new mode 100755 diff --git a/api/wwwroot/Landing/faqs.html b/api/wwwroot/Landing/faqs.html old mode 100644 new mode 100755 diff --git a/api/wwwroot/Landing/imgs/blip-sponsor.png b/api/wwwroot/Landing/imgs/blip-sponsor.png old mode 100644 new mode 100755 diff --git a/api/wwwroot/Landing/imgs/blip-sponsor.svg b/api/wwwroot/Landing/imgs/blip-sponsor.svg old mode 100644 new mode 100755 diff --git a/api/wwwroot/Landing/imgs/critical-sponsor.png b/api/wwwroot/Landing/imgs/critical-sponsor.png old mode 100644 new mode 100755 diff --git a/api/wwwroot/Landing/imgs/critical-sponsor.svg b/api/wwwroot/Landing/imgs/critical-sponsor.svg old mode 100644 new mode 100755 diff --git a/api/wwwroot/Landing/imgs/email.svg b/api/wwwroot/Landing/imgs/email.svg old mode 100644 new mode 100755 diff --git a/api/wwwroot/Landing/imgs/facebook.svg b/api/wwwroot/Landing/imgs/facebook.svg old mode 100644 new mode 100755 diff --git a/api/wwwroot/Landing/imgs/image.png b/api/wwwroot/Landing/imgs/image.png old mode 100644 new mode 100755 diff --git a/api/wwwroot/Landing/imgs/instagram.svg b/api/wwwroot/Landing/imgs/instagram.svg old mode 100644 new mode 100755 diff --git a/api/wwwroot/Landing/imgs/linkedin.svg b/api/wwwroot/Landing/imgs/linkedin.svg old mode 100644 new mode 100755 diff --git a/api/wwwroot/Landing/imgs/logo-enei.ai b/api/wwwroot/Landing/imgs/logo-enei.ai old mode 100644 new mode 100755 diff --git a/api/wwwroot/Landing/imgs/logo-enei.svg b/api/wwwroot/Landing/imgs/logo-enei.svg old mode 100644 new mode 100755 diff --git a/api/wwwroot/Landing/imgs/novaBase-sponsor.jpg b/api/wwwroot/Landing/imgs/novaBase-sponsor.jpg old mode 100644 new mode 100755 diff --git a/api/wwwroot/android-chrome-256x256.png b/api/wwwroot/android-chrome-256x256.png old mode 100644 new mode 100755 diff --git a/api/wwwroot/career-path.html b/api/wwwroot/career-path.html old mode 100644 new mode 100755 diff --git a/api/wwwroot/ctf.html b/api/wwwroot/ctf.html old mode 100644 new mode 100755 diff --git a/api/wwwroot/faqs.html b/api/wwwroot/faqs.html old mode 100644 new mode 100755 diff --git a/api/wwwroot/imgs/blip-sponsor.png b/api/wwwroot/imgs/blip-sponsor.png old mode 100644 new mode 100755 diff --git a/api/wwwroot/imgs/blip-sponsor.svg b/api/wwwroot/imgs/blip-sponsor.svg old mode 100644 new mode 100755 diff --git a/api/wwwroot/imgs/critical-sponsor.png b/api/wwwroot/imgs/critical-sponsor.png old mode 100644 new mode 100755 diff --git a/api/wwwroot/imgs/critical-sponsor.svg b/api/wwwroot/imgs/critical-sponsor.svg old mode 100644 new mode 100755 diff --git a/api/wwwroot/imgs/email.svg b/api/wwwroot/imgs/email.svg old mode 100644 new mode 100755 diff --git a/api/wwwroot/imgs/facebook.svg b/api/wwwroot/imgs/facebook.svg old mode 100644 new mode 100755 diff --git a/api/wwwroot/imgs/image.png b/api/wwwroot/imgs/image.png old mode 100644 new mode 100755 diff --git a/api/wwwroot/imgs/instagram.svg b/api/wwwroot/imgs/instagram.svg old mode 100644 new mode 100755 diff --git a/api/wwwroot/imgs/linkedin.svg b/api/wwwroot/imgs/linkedin.svg old mode 100644 new mode 100755 diff --git a/api/wwwroot/imgs/logo-enei.ai b/api/wwwroot/imgs/logo-enei.ai old mode 100644 new mode 100755 diff --git a/api/wwwroot/imgs/logo-enei.svg b/api/wwwroot/imgs/logo-enei.svg old mode 100644 new mode 100755 diff --git a/api/wwwroot/imgs/novaBase-sponsor.jpg b/api/wwwroot/imgs/novaBase-sponsor.jpg old mode 100644 new mode 100755