api
|
@ -31,7 +31,16 @@ namespace api.Controllers
|
||||||
_repo = repo;
|
_repo = repo;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
[HttpPost("changeProfileImage")]
|
||||||
|
public async Task<IActionResult> changeProfileImage(profileImage i)
|
||||||
|
{
|
||||||
|
|
||||||
|
User a = new User();
|
||||||
|
|
||||||
|
var cenas =await _repo.changeProfileImage(i);
|
||||||
|
|
||||||
|
return Ok(cenas);
|
||||||
|
}
|
||||||
//
|
//
|
||||||
[HttpGet("{id}")]
|
[HttpGet("{id}")]
|
||||||
public async Task<IActionResult> GetUser(int id)
|
public async Task<IActionResult> GetUser(int id)
|
||||||
|
@ -57,6 +66,7 @@ namespace api.Controllers
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[Authorize(Policy = "RequireAdminRole")]
|
[Authorize(Policy = "RequireAdminRole")]
|
||||||
[HttpPost("updateAll")]
|
[HttpPost("updateAll")]
|
||||||
public async Task<IActionResult> UpdateUsers(updateUsersDTO[] req)
|
public async Task<IActionResult> UpdateUsers(updateUsersDTO[] req)
|
||||||
|
@ -65,7 +75,7 @@ namespace api.Controllers
|
||||||
{
|
{
|
||||||
foreach (var user in req)
|
foreach (var user in req)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return Ok(req);
|
return Ok(req);
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using api.Dtos;
|
||||||
using api.Models;
|
using api.Models;
|
||||||
|
|
||||||
namespace api.Data
|
namespace api.Data
|
||||||
|
@ -12,7 +13,7 @@ namespace api.Data
|
||||||
Task<bool> SaveAll();
|
Task<bool> SaveAll();
|
||||||
Task<IEnumerable<User>> GetUsers();
|
Task<IEnumerable<User>> GetUsers();
|
||||||
Task<User> GetUser(int id);
|
Task<User> GetUser(int id);
|
||||||
|
Task<User> changeProfileImage(profileImage a);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using api.Dtos;
|
||||||
using api.Models;
|
using api.Models;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
|
@ -14,34 +15,56 @@ namespace api.Data
|
||||||
}
|
}
|
||||||
public void Add<T>(T enity) where T : class
|
public void Add<T>(T enity) where T : class
|
||||||
{
|
{
|
||||||
_context.Add(enity);
|
_context.Add(enity);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<User> 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>(T entity) where T : class
|
public void Delete<T>(T entity) where T : class
|
||||||
{
|
{
|
||||||
|
|
||||||
_context.Remove(entity);
|
_context.Remove(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<User> GetUser(int id)
|
public async Task<User> 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;
|
return user;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<IEnumerable<User>> GetUsers()
|
public async Task<IEnumerable<User>> GetUsers()
|
||||||
{
|
{
|
||||||
var users= await _context.Users.Include(p=>p.Photos).ToListAsync();
|
var users = await _context.Users.Include(p => p.Photos).ToListAsync();
|
||||||
|
|
||||||
return users;
|
return users;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<bool> SaveAll()
|
public async Task<bool> SaveAll()
|
||||||
{
|
{
|
||||||
return await _context.SaveChangesAsync()>0;
|
return await _context.SaveChangesAsync() > 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
namespace api.Dtos
|
||||||
|
{
|
||||||
|
public class profileImage
|
||||||
|
{
|
||||||
|
public string QRcode{get;set;}
|
||||||
|
|
||||||
|
public string base64{get;set;}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,502 +0,0 @@
|
||||||
// <auto-generated />
|
|
||||||
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<int>", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("ClaimType");
|
|
||||||
|
|
||||||
b.Property<string>("ClaimValue");
|
|
||||||
|
|
||||||
b.Property<int>("RoleId");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("RoleId");
|
|
||||||
|
|
||||||
b.ToTable("AspNetRoleClaims");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("ClaimType");
|
|
||||||
|
|
||||||
b.Property<string>("ClaimValue");
|
|
||||||
|
|
||||||
b.Property<int>("UserId");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("UserId");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUserClaims");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("LoginProvider");
|
|
||||||
|
|
||||||
b.Property<string>("ProviderKey");
|
|
||||||
|
|
||||||
b.Property<string>("ProviderDisplayName");
|
|
||||||
|
|
||||||
b.Property<int>("UserId");
|
|
||||||
|
|
||||||
b.HasKey("LoginProvider", "ProviderKey");
|
|
||||||
|
|
||||||
b.HasIndex("UserId");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUserLogins");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("UserId");
|
|
||||||
|
|
||||||
b.Property<string>("LoginProvider");
|
|
||||||
|
|
||||||
b.Property<string>("Name");
|
|
||||||
|
|
||||||
b.Property<string>("Value");
|
|
||||||
|
|
||||||
b.HasKey("UserId", "LoginProvider", "Name");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUserTokens");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Cromos", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("DescLocked");
|
|
||||||
|
|
||||||
b.Property<string>("DescMostrar");
|
|
||||||
|
|
||||||
b.Property<string>("DescUnlocked");
|
|
||||||
|
|
||||||
b.Property<string>("Nome");
|
|
||||||
|
|
||||||
b.Property<string>("QRCode");
|
|
||||||
|
|
||||||
b.Property<int?>("imgId");
|
|
||||||
|
|
||||||
b.Property<int>("pontos");
|
|
||||||
|
|
||||||
b.Property<bool>("unlocked");
|
|
||||||
|
|
||||||
b.Property<string>("websiteCromo");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("imgId");
|
|
||||||
|
|
||||||
b.ToTable("Cromos");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Event", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("Desc");
|
|
||||||
|
|
||||||
b.Property<string>("Nome");
|
|
||||||
|
|
||||||
b.Property<bool>("aDecorrer");
|
|
||||||
|
|
||||||
b.Property<string>("custo");
|
|
||||||
|
|
||||||
b.Property<string>("horas");
|
|
||||||
|
|
||||||
b.Property<string>("imagem");
|
|
||||||
|
|
||||||
b.Property<string>("localizacao");
|
|
||||||
|
|
||||||
b.Property<string>("notas");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Events");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.EventLoc", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("Desc");
|
|
||||||
|
|
||||||
b.Property<int>("EventId");
|
|
||||||
|
|
||||||
b.Property<int?>("ImgId");
|
|
||||||
|
|
||||||
b.Property<float>("Lat");
|
|
||||||
|
|
||||||
b.Property<float>("Long");
|
|
||||||
|
|
||||||
b.Property<string>("Nome");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("ImgId");
|
|
||||||
|
|
||||||
b.ToTable("EventLocs");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.EventLocVisited", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<int?>("LocationId");
|
|
||||||
|
|
||||||
b.Property<int?>("TeamId");
|
|
||||||
|
|
||||||
b.Property<bool>("complete");
|
|
||||||
|
|
||||||
b.Property<DateTime>("timestamp");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("LocationId");
|
|
||||||
|
|
||||||
b.HasIndex("TeamId");
|
|
||||||
|
|
||||||
b.ToTable("EventLocsVisited");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Log", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<int?>("UserId");
|
|
||||||
|
|
||||||
b.Property<int?>("UserId1");
|
|
||||||
|
|
||||||
b.Property<int>("amount");
|
|
||||||
|
|
||||||
b.Property<int>("available");
|
|
||||||
|
|
||||||
b.Property<string>("logType");
|
|
||||||
|
|
||||||
b.Property<int?>("productId");
|
|
||||||
|
|
||||||
b.Property<string>("transactionId");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("UserId");
|
|
||||||
|
|
||||||
b.HasIndex("UserId1");
|
|
||||||
|
|
||||||
b.HasIndex("productId");
|
|
||||||
|
|
||||||
b.ToTable("Logs");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Photo", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<DateTime>("DateAdded");
|
|
||||||
|
|
||||||
b.Property<string>("Description");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMain");
|
|
||||||
|
|
||||||
b.Property<string>("Url");
|
|
||||||
|
|
||||||
b.Property<int>("UserId");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("UserId");
|
|
||||||
|
|
||||||
b.ToTable("Photos");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Product", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<int>("basePrice");
|
|
||||||
|
|
||||||
b.Property<string>("name");
|
|
||||||
|
|
||||||
b.Property<float>("revenue");
|
|
||||||
|
|
||||||
b.Property<int>("sold");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Products");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Role", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("ConcurrencyStamp")
|
|
||||||
.IsConcurrencyToken();
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.HasMaxLength(256);
|
|
||||||
|
|
||||||
b.Property<string>("NormalizedName")
|
|
||||||
.HasMaxLength(256);
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("NormalizedName")
|
|
||||||
.IsUnique()
|
|
||||||
.HasName("RoleNameIndex");
|
|
||||||
|
|
||||||
b.ToTable("AspNetRoles");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Team", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("CapQR");
|
|
||||||
|
|
||||||
b.Property<int>("EventId");
|
|
||||||
|
|
||||||
b.Property<int>("NMembros");
|
|
||||||
|
|
||||||
b.Property<string>("Nome");
|
|
||||||
|
|
||||||
b.Property<int>("Pontos");
|
|
||||||
|
|
||||||
b.Property<bool>("pagamento");
|
|
||||||
|
|
||||||
b.Property<string>("pagamentoVerifyCode");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Teams");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.User", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<int>("AccessFailedCount");
|
|
||||||
|
|
||||||
b.Property<string>("ConcurrencyStamp")
|
|
||||||
.IsConcurrencyToken();
|
|
||||||
|
|
||||||
b.Property<string>("Email")
|
|
||||||
.HasMaxLength(256);
|
|
||||||
|
|
||||||
b.Property<bool>("EmailConfirmed");
|
|
||||||
|
|
||||||
b.Property<bool>("LockoutEnabled");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
|
||||||
|
|
||||||
b.Property<string>("NormalizedEmail")
|
|
||||||
.HasMaxLength(256);
|
|
||||||
|
|
||||||
b.Property<string>("NormalizedUserName")
|
|
||||||
.HasMaxLength(256);
|
|
||||||
|
|
||||||
b.Property<string>("PasswordHash");
|
|
||||||
|
|
||||||
b.Property<string>("PhoneNumber");
|
|
||||||
|
|
||||||
b.Property<bool>("PhoneNumberConfirmed");
|
|
||||||
|
|
||||||
b.Property<string>("QRcode");
|
|
||||||
|
|
||||||
b.Property<string>("SecurityStamp");
|
|
||||||
|
|
||||||
b.Property<bool>("TwoFactorEnabled");
|
|
||||||
|
|
||||||
b.Property<string>("UserName")
|
|
||||||
.HasMaxLength(256);
|
|
||||||
|
|
||||||
b.Property<string>("cromos");
|
|
||||||
|
|
||||||
b.Property<int>("drinks");
|
|
||||||
|
|
||||||
b.Property<int>("food");
|
|
||||||
|
|
||||||
b.Property<string>("fullName");
|
|
||||||
|
|
||||||
b.Property<int?>("teamID");
|
|
||||||
|
|
||||||
b.Property<string>("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<int>("UserId");
|
|
||||||
|
|
||||||
b.Property<int>("RoleId");
|
|
||||||
|
|
||||||
b.HasKey("UserId", "RoleId");
|
|
||||||
|
|
||||||
b.HasIndex("RoleId");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUserRoles");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Value", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("Name");
|
|
||||||
|
|
||||||
b.HasKey("id");
|
|
||||||
|
|
||||||
b.ToTable("Values");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("api.Models.Role")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("RoleId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("api.Models.User")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("UserId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("api.Models.User")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("UserId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", 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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,493 +0,0 @@
|
||||||
// <auto-generated />
|
|
||||||
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<int>", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("ClaimType");
|
|
||||||
|
|
||||||
b.Property<string>("ClaimValue");
|
|
||||||
|
|
||||||
b.Property<int>("RoleId");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("RoleId");
|
|
||||||
|
|
||||||
b.ToTable("AspNetRoleClaims");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("ClaimType");
|
|
||||||
|
|
||||||
b.Property<string>("ClaimValue");
|
|
||||||
|
|
||||||
b.Property<int>("UserId");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("UserId");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUserClaims");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("LoginProvider");
|
|
||||||
|
|
||||||
b.Property<string>("ProviderKey");
|
|
||||||
|
|
||||||
b.Property<string>("ProviderDisplayName");
|
|
||||||
|
|
||||||
b.Property<int>("UserId");
|
|
||||||
|
|
||||||
b.HasKey("LoginProvider", "ProviderKey");
|
|
||||||
|
|
||||||
b.HasIndex("UserId");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUserLogins");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("UserId");
|
|
||||||
|
|
||||||
b.Property<string>("LoginProvider");
|
|
||||||
|
|
||||||
b.Property<string>("Name");
|
|
||||||
|
|
||||||
b.Property<string>("Value");
|
|
||||||
|
|
||||||
b.HasKey("UserId", "LoginProvider", "Name");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUserTokens");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Cromos", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("DescLocked");
|
|
||||||
|
|
||||||
b.Property<string>("DescMostrar");
|
|
||||||
|
|
||||||
b.Property<string>("DescUnlocked");
|
|
||||||
|
|
||||||
b.Property<string>("Nome");
|
|
||||||
|
|
||||||
b.Property<string>("QRCode");
|
|
||||||
|
|
||||||
b.Property<string>("img");
|
|
||||||
|
|
||||||
b.Property<int>("pontos");
|
|
||||||
|
|
||||||
b.Property<bool>("unlocked");
|
|
||||||
|
|
||||||
b.Property<string>("websiteCromo");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Cromos");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Event", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("Desc");
|
|
||||||
|
|
||||||
b.Property<string>("Nome");
|
|
||||||
|
|
||||||
b.Property<bool>("aDecorrer");
|
|
||||||
|
|
||||||
b.Property<string>("custo");
|
|
||||||
|
|
||||||
b.Property<string>("horas");
|
|
||||||
|
|
||||||
b.Property<string>("imagem");
|
|
||||||
|
|
||||||
b.Property<string>("localizacao");
|
|
||||||
|
|
||||||
b.Property<string>("notas");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Events");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.EventLoc", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("Desc");
|
|
||||||
|
|
||||||
b.Property<int>("EventId");
|
|
||||||
|
|
||||||
b.Property<int?>("ImgId");
|
|
||||||
|
|
||||||
b.Property<float>("Lat");
|
|
||||||
|
|
||||||
b.Property<float>("Long");
|
|
||||||
|
|
||||||
b.Property<string>("Nome");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("ImgId");
|
|
||||||
|
|
||||||
b.ToTable("EventLocs");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.EventLocVisited", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<int?>("LocationId");
|
|
||||||
|
|
||||||
b.Property<int?>("TeamId");
|
|
||||||
|
|
||||||
b.Property<bool>("complete");
|
|
||||||
|
|
||||||
b.Property<DateTime>("timestamp");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("LocationId");
|
|
||||||
|
|
||||||
b.HasIndex("TeamId");
|
|
||||||
|
|
||||||
b.ToTable("EventLocsVisited");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Log", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<int?>("UserId");
|
|
||||||
|
|
||||||
b.Property<int?>("UserId1");
|
|
||||||
|
|
||||||
b.Property<int>("amount");
|
|
||||||
|
|
||||||
b.Property<int>("available");
|
|
||||||
|
|
||||||
b.Property<string>("logType");
|
|
||||||
|
|
||||||
b.Property<int?>("productId");
|
|
||||||
|
|
||||||
b.Property<string>("transactionId");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("UserId");
|
|
||||||
|
|
||||||
b.HasIndex("UserId1");
|
|
||||||
|
|
||||||
b.HasIndex("productId");
|
|
||||||
|
|
||||||
b.ToTable("Logs");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Photo", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<DateTime>("DateAdded");
|
|
||||||
|
|
||||||
b.Property<string>("Description");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMain");
|
|
||||||
|
|
||||||
b.Property<string>("Url");
|
|
||||||
|
|
||||||
b.Property<int>("UserId");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("UserId");
|
|
||||||
|
|
||||||
b.ToTable("Photos");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Product", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<int>("basePrice");
|
|
||||||
|
|
||||||
b.Property<string>("name");
|
|
||||||
|
|
||||||
b.Property<float>("revenue");
|
|
||||||
|
|
||||||
b.Property<int>("sold");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Products");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Role", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("ConcurrencyStamp")
|
|
||||||
.IsConcurrencyToken();
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.HasMaxLength(256);
|
|
||||||
|
|
||||||
b.Property<string>("NormalizedName")
|
|
||||||
.HasMaxLength(256);
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("NormalizedName")
|
|
||||||
.IsUnique()
|
|
||||||
.HasName("RoleNameIndex");
|
|
||||||
|
|
||||||
b.ToTable("AspNetRoles");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Team", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("CapQR");
|
|
||||||
|
|
||||||
b.Property<int>("EventId");
|
|
||||||
|
|
||||||
b.Property<int>("NMembros");
|
|
||||||
|
|
||||||
b.Property<string>("Nome");
|
|
||||||
|
|
||||||
b.Property<int>("Pontos");
|
|
||||||
|
|
||||||
b.Property<bool>("pagamento");
|
|
||||||
|
|
||||||
b.Property<string>("pagamentoVerifyCode");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Teams");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.User", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<int>("AccessFailedCount");
|
|
||||||
|
|
||||||
b.Property<string>("ConcurrencyStamp")
|
|
||||||
.IsConcurrencyToken();
|
|
||||||
|
|
||||||
b.Property<string>("Email")
|
|
||||||
.HasMaxLength(256);
|
|
||||||
|
|
||||||
b.Property<bool>("EmailConfirmed");
|
|
||||||
|
|
||||||
b.Property<bool>("LockoutEnabled");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
|
||||||
|
|
||||||
b.Property<string>("NormalizedEmail")
|
|
||||||
.HasMaxLength(256);
|
|
||||||
|
|
||||||
b.Property<string>("NormalizedUserName")
|
|
||||||
.HasMaxLength(256);
|
|
||||||
|
|
||||||
b.Property<string>("PasswordHash");
|
|
||||||
|
|
||||||
b.Property<string>("PhoneNumber");
|
|
||||||
|
|
||||||
b.Property<bool>("PhoneNumberConfirmed");
|
|
||||||
|
|
||||||
b.Property<string>("QRcode");
|
|
||||||
|
|
||||||
b.Property<string>("SecurityStamp");
|
|
||||||
|
|
||||||
b.Property<bool>("TwoFactorEnabled");
|
|
||||||
|
|
||||||
b.Property<string>("UserName")
|
|
||||||
.HasMaxLength(256);
|
|
||||||
|
|
||||||
b.Property<string>("cromos");
|
|
||||||
|
|
||||||
b.Property<int>("drinks");
|
|
||||||
|
|
||||||
b.Property<int>("food");
|
|
||||||
|
|
||||||
b.Property<string>("fullName");
|
|
||||||
|
|
||||||
b.Property<int?>("teamID");
|
|
||||||
|
|
||||||
b.Property<string>("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<int>("UserId");
|
|
||||||
|
|
||||||
b.Property<int>("RoleId");
|
|
||||||
|
|
||||||
b.HasKey("UserId", "RoleId");
|
|
||||||
|
|
||||||
b.HasIndex("RoleId");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUserRoles");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Value", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("Name");
|
|
||||||
|
|
||||||
b.HasKey("id");
|
|
||||||
|
|
||||||
b.ToTable("Values");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("api.Models.Role")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("RoleId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("api.Models.User")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("UserId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("api.Models.User")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("UserId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", 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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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<string>(
|
|
||||||
name: "img",
|
|
||||||
table: "Cromos",
|
|
||||||
nullable: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "img",
|
|
||||||
table: "Cromos");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,495 +0,0 @@
|
||||||
// <auto-generated />
|
|
||||||
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<int>", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("ClaimType");
|
|
||||||
|
|
||||||
b.Property<string>("ClaimValue");
|
|
||||||
|
|
||||||
b.Property<int>("RoleId");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("RoleId");
|
|
||||||
|
|
||||||
b.ToTable("AspNetRoleClaims");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("ClaimType");
|
|
||||||
|
|
||||||
b.Property<string>("ClaimValue");
|
|
||||||
|
|
||||||
b.Property<int>("UserId");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("UserId");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUserClaims");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("LoginProvider");
|
|
||||||
|
|
||||||
b.Property<string>("ProviderKey");
|
|
||||||
|
|
||||||
b.Property<string>("ProviderDisplayName");
|
|
||||||
|
|
||||||
b.Property<int>("UserId");
|
|
||||||
|
|
||||||
b.HasKey("LoginProvider", "ProviderKey");
|
|
||||||
|
|
||||||
b.HasIndex("UserId");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUserLogins");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("UserId");
|
|
||||||
|
|
||||||
b.Property<string>("LoginProvider");
|
|
||||||
|
|
||||||
b.Property<string>("Name");
|
|
||||||
|
|
||||||
b.Property<string>("Value");
|
|
||||||
|
|
||||||
b.HasKey("UserId", "LoginProvider", "Name");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUserTokens");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Cromos", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("DescLocked");
|
|
||||||
|
|
||||||
b.Property<string>("DescMostrar");
|
|
||||||
|
|
||||||
b.Property<string>("DescUnlocked");
|
|
||||||
|
|
||||||
b.Property<string>("Nome");
|
|
||||||
|
|
||||||
b.Property<string>("QRCode");
|
|
||||||
|
|
||||||
b.Property<string>("img");
|
|
||||||
|
|
||||||
b.Property<string>("logo");
|
|
||||||
|
|
||||||
b.Property<int>("pontos");
|
|
||||||
|
|
||||||
b.Property<bool>("unlocked");
|
|
||||||
|
|
||||||
b.Property<string>("websiteCromo");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Cromos");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Event", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("Desc");
|
|
||||||
|
|
||||||
b.Property<string>("Nome");
|
|
||||||
|
|
||||||
b.Property<bool>("aDecorrer");
|
|
||||||
|
|
||||||
b.Property<string>("custo");
|
|
||||||
|
|
||||||
b.Property<string>("horas");
|
|
||||||
|
|
||||||
b.Property<string>("imagem");
|
|
||||||
|
|
||||||
b.Property<string>("localizacao");
|
|
||||||
|
|
||||||
b.Property<string>("notas");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Events");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.EventLoc", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("Desc");
|
|
||||||
|
|
||||||
b.Property<int>("EventId");
|
|
||||||
|
|
||||||
b.Property<int?>("ImgId");
|
|
||||||
|
|
||||||
b.Property<float>("Lat");
|
|
||||||
|
|
||||||
b.Property<float>("Long");
|
|
||||||
|
|
||||||
b.Property<string>("Nome");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("ImgId");
|
|
||||||
|
|
||||||
b.ToTable("EventLocs");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.EventLocVisited", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<int?>("LocationId");
|
|
||||||
|
|
||||||
b.Property<int?>("TeamId");
|
|
||||||
|
|
||||||
b.Property<bool>("complete");
|
|
||||||
|
|
||||||
b.Property<DateTime>("timestamp");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("LocationId");
|
|
||||||
|
|
||||||
b.HasIndex("TeamId");
|
|
||||||
|
|
||||||
b.ToTable("EventLocsVisited");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Log", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<int?>("UserId");
|
|
||||||
|
|
||||||
b.Property<int?>("UserId1");
|
|
||||||
|
|
||||||
b.Property<int>("amount");
|
|
||||||
|
|
||||||
b.Property<int>("available");
|
|
||||||
|
|
||||||
b.Property<string>("logType");
|
|
||||||
|
|
||||||
b.Property<int?>("productId");
|
|
||||||
|
|
||||||
b.Property<string>("transactionId");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("UserId");
|
|
||||||
|
|
||||||
b.HasIndex("UserId1");
|
|
||||||
|
|
||||||
b.HasIndex("productId");
|
|
||||||
|
|
||||||
b.ToTable("Logs");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Photo", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<DateTime>("DateAdded");
|
|
||||||
|
|
||||||
b.Property<string>("Description");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMain");
|
|
||||||
|
|
||||||
b.Property<string>("Url");
|
|
||||||
|
|
||||||
b.Property<int>("UserId");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("UserId");
|
|
||||||
|
|
||||||
b.ToTable("Photos");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Product", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<int>("basePrice");
|
|
||||||
|
|
||||||
b.Property<string>("name");
|
|
||||||
|
|
||||||
b.Property<float>("revenue");
|
|
||||||
|
|
||||||
b.Property<int>("sold");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Products");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Role", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("ConcurrencyStamp")
|
|
||||||
.IsConcurrencyToken();
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.HasMaxLength(256);
|
|
||||||
|
|
||||||
b.Property<string>("NormalizedName")
|
|
||||||
.HasMaxLength(256);
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("NormalizedName")
|
|
||||||
.IsUnique()
|
|
||||||
.HasName("RoleNameIndex");
|
|
||||||
|
|
||||||
b.ToTable("AspNetRoles");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Team", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("CapQR");
|
|
||||||
|
|
||||||
b.Property<int>("EventId");
|
|
||||||
|
|
||||||
b.Property<int>("NMembros");
|
|
||||||
|
|
||||||
b.Property<string>("Nome");
|
|
||||||
|
|
||||||
b.Property<int>("Pontos");
|
|
||||||
|
|
||||||
b.Property<bool>("pagamento");
|
|
||||||
|
|
||||||
b.Property<string>("pagamentoVerifyCode");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Teams");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.User", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<int>("AccessFailedCount");
|
|
||||||
|
|
||||||
b.Property<string>("ConcurrencyStamp")
|
|
||||||
.IsConcurrencyToken();
|
|
||||||
|
|
||||||
b.Property<string>("Email")
|
|
||||||
.HasMaxLength(256);
|
|
||||||
|
|
||||||
b.Property<bool>("EmailConfirmed");
|
|
||||||
|
|
||||||
b.Property<bool>("LockoutEnabled");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
|
||||||
|
|
||||||
b.Property<string>("NormalizedEmail")
|
|
||||||
.HasMaxLength(256);
|
|
||||||
|
|
||||||
b.Property<string>("NormalizedUserName")
|
|
||||||
.HasMaxLength(256);
|
|
||||||
|
|
||||||
b.Property<string>("PasswordHash");
|
|
||||||
|
|
||||||
b.Property<string>("PhoneNumber");
|
|
||||||
|
|
||||||
b.Property<bool>("PhoneNumberConfirmed");
|
|
||||||
|
|
||||||
b.Property<string>("QRcode");
|
|
||||||
|
|
||||||
b.Property<string>("SecurityStamp");
|
|
||||||
|
|
||||||
b.Property<bool>("TwoFactorEnabled");
|
|
||||||
|
|
||||||
b.Property<string>("UserName")
|
|
||||||
.HasMaxLength(256);
|
|
||||||
|
|
||||||
b.Property<string>("cromos");
|
|
||||||
|
|
||||||
b.Property<int>("drinks");
|
|
||||||
|
|
||||||
b.Property<int>("food");
|
|
||||||
|
|
||||||
b.Property<string>("fullName");
|
|
||||||
|
|
||||||
b.Property<int?>("teamID");
|
|
||||||
|
|
||||||
b.Property<string>("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<int>("UserId");
|
|
||||||
|
|
||||||
b.Property<int>("RoleId");
|
|
||||||
|
|
||||||
b.HasKey("UserId", "RoleId");
|
|
||||||
|
|
||||||
b.HasIndex("RoleId");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUserRoles");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Value", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("Name");
|
|
||||||
|
|
||||||
b.HasKey("id");
|
|
||||||
|
|
||||||
b.ToTable("Values");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("api.Models.Role")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("RoleId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("api.Models.User")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("UserId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("api.Models.User")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("UserId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", 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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,22 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
namespace api.Migrations
|
|
||||||
{
|
|
||||||
public partial class imagelogo : Migration
|
|
||||||
{
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "logo",
|
|
||||||
table: "Cromos",
|
|
||||||
nullable: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "logo",
|
|
||||||
table: "Cromos");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,499 +0,0 @@
|
||||||
// <auto-generated />
|
|
||||||
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<int>", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("ClaimType");
|
|
||||||
|
|
||||||
b.Property<string>("ClaimValue");
|
|
||||||
|
|
||||||
b.Property<int>("RoleId");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("RoleId");
|
|
||||||
|
|
||||||
b.ToTable("AspNetRoleClaims");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("ClaimType");
|
|
||||||
|
|
||||||
b.Property<string>("ClaimValue");
|
|
||||||
|
|
||||||
b.Property<int>("UserId");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("UserId");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUserClaims");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("LoginProvider");
|
|
||||||
|
|
||||||
b.Property<string>("ProviderKey");
|
|
||||||
|
|
||||||
b.Property<string>("ProviderDisplayName");
|
|
||||||
|
|
||||||
b.Property<int>("UserId");
|
|
||||||
|
|
||||||
b.HasKey("LoginProvider", "ProviderKey");
|
|
||||||
|
|
||||||
b.HasIndex("UserId");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUserLogins");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("UserId");
|
|
||||||
|
|
||||||
b.Property<string>("LoginProvider");
|
|
||||||
|
|
||||||
b.Property<string>("Name");
|
|
||||||
|
|
||||||
b.Property<string>("Value");
|
|
||||||
|
|
||||||
b.HasKey("UserId", "LoginProvider", "Name");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUserTokens");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Cromos", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("DescLocked");
|
|
||||||
|
|
||||||
b.Property<string>("DescMostrar");
|
|
||||||
|
|
||||||
b.Property<string>("DescUnlocked");
|
|
||||||
|
|
||||||
b.Property<string>("Nome");
|
|
||||||
|
|
||||||
b.Property<string>("QRCode");
|
|
||||||
|
|
||||||
b.Property<string>("img");
|
|
||||||
|
|
||||||
b.Property<string>("logo");
|
|
||||||
|
|
||||||
b.Property<int>("pontos");
|
|
||||||
|
|
||||||
b.Property<bool>("unlocked");
|
|
||||||
|
|
||||||
b.Property<string>("websiteCromo");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Cromos");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Event", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("Desc");
|
|
||||||
|
|
||||||
b.Property<string>("Nome");
|
|
||||||
|
|
||||||
b.Property<bool>("aDecorrer");
|
|
||||||
|
|
||||||
b.Property<string>("custo");
|
|
||||||
|
|
||||||
b.Property<string>("horas");
|
|
||||||
|
|
||||||
b.Property<string>("imagem");
|
|
||||||
|
|
||||||
b.Property<string>("localizacao");
|
|
||||||
|
|
||||||
b.Property<string>("notas");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Events");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.EventLoc", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("Desc");
|
|
||||||
|
|
||||||
b.Property<int>("EventId");
|
|
||||||
|
|
||||||
b.Property<int?>("ImgId");
|
|
||||||
|
|
||||||
b.Property<float>("Lat");
|
|
||||||
|
|
||||||
b.Property<float>("Long");
|
|
||||||
|
|
||||||
b.Property<string>("Nome");
|
|
||||||
|
|
||||||
b.Property<string>("mainPhoto");
|
|
||||||
|
|
||||||
b.Property<string>("squarePhoto");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("ImgId");
|
|
||||||
|
|
||||||
b.ToTable("EventLocs");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.EventLocVisited", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<int?>("LocationId");
|
|
||||||
|
|
||||||
b.Property<int?>("TeamId");
|
|
||||||
|
|
||||||
b.Property<bool>("complete");
|
|
||||||
|
|
||||||
b.Property<DateTime>("timestamp");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("LocationId");
|
|
||||||
|
|
||||||
b.HasIndex("TeamId");
|
|
||||||
|
|
||||||
b.ToTable("EventLocsVisited");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Log", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<int?>("UserId");
|
|
||||||
|
|
||||||
b.Property<int?>("UserId1");
|
|
||||||
|
|
||||||
b.Property<int>("amount");
|
|
||||||
|
|
||||||
b.Property<int>("available");
|
|
||||||
|
|
||||||
b.Property<string>("logType");
|
|
||||||
|
|
||||||
b.Property<int?>("productId");
|
|
||||||
|
|
||||||
b.Property<string>("transactionId");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("UserId");
|
|
||||||
|
|
||||||
b.HasIndex("UserId1");
|
|
||||||
|
|
||||||
b.HasIndex("productId");
|
|
||||||
|
|
||||||
b.ToTable("Logs");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Photo", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<DateTime>("DateAdded");
|
|
||||||
|
|
||||||
b.Property<string>("Description");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMain");
|
|
||||||
|
|
||||||
b.Property<string>("Url");
|
|
||||||
|
|
||||||
b.Property<int>("UserId");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("UserId");
|
|
||||||
|
|
||||||
b.ToTable("Photos");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Product", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<int>("basePrice");
|
|
||||||
|
|
||||||
b.Property<string>("name");
|
|
||||||
|
|
||||||
b.Property<float>("revenue");
|
|
||||||
|
|
||||||
b.Property<int>("sold");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Products");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Role", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("ConcurrencyStamp")
|
|
||||||
.IsConcurrencyToken();
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.HasMaxLength(256);
|
|
||||||
|
|
||||||
b.Property<string>("NormalizedName")
|
|
||||||
.HasMaxLength(256);
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("NormalizedName")
|
|
||||||
.IsUnique()
|
|
||||||
.HasName("RoleNameIndex");
|
|
||||||
|
|
||||||
b.ToTable("AspNetRoles");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Team", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("CapQR");
|
|
||||||
|
|
||||||
b.Property<int>("EventId");
|
|
||||||
|
|
||||||
b.Property<int>("NMembros");
|
|
||||||
|
|
||||||
b.Property<string>("Nome");
|
|
||||||
|
|
||||||
b.Property<int>("Pontos");
|
|
||||||
|
|
||||||
b.Property<bool>("pagamento");
|
|
||||||
|
|
||||||
b.Property<string>("pagamentoVerifyCode");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Teams");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.User", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<int>("AccessFailedCount");
|
|
||||||
|
|
||||||
b.Property<string>("ConcurrencyStamp")
|
|
||||||
.IsConcurrencyToken();
|
|
||||||
|
|
||||||
b.Property<string>("Email")
|
|
||||||
.HasMaxLength(256);
|
|
||||||
|
|
||||||
b.Property<bool>("EmailConfirmed");
|
|
||||||
|
|
||||||
b.Property<bool>("LockoutEnabled");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
|
||||||
|
|
||||||
b.Property<string>("NormalizedEmail")
|
|
||||||
.HasMaxLength(256);
|
|
||||||
|
|
||||||
b.Property<string>("NormalizedUserName")
|
|
||||||
.HasMaxLength(256);
|
|
||||||
|
|
||||||
b.Property<string>("PasswordHash");
|
|
||||||
|
|
||||||
b.Property<string>("PhoneNumber");
|
|
||||||
|
|
||||||
b.Property<bool>("PhoneNumberConfirmed");
|
|
||||||
|
|
||||||
b.Property<string>("QRcode");
|
|
||||||
|
|
||||||
b.Property<string>("SecurityStamp");
|
|
||||||
|
|
||||||
b.Property<bool>("TwoFactorEnabled");
|
|
||||||
|
|
||||||
b.Property<string>("UserName")
|
|
||||||
.HasMaxLength(256);
|
|
||||||
|
|
||||||
b.Property<string>("cromos");
|
|
||||||
|
|
||||||
b.Property<int>("drinks");
|
|
||||||
|
|
||||||
b.Property<int>("food");
|
|
||||||
|
|
||||||
b.Property<string>("fullName");
|
|
||||||
|
|
||||||
b.Property<int?>("teamID");
|
|
||||||
|
|
||||||
b.Property<string>("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<int>("UserId");
|
|
||||||
|
|
||||||
b.Property<int>("RoleId");
|
|
||||||
|
|
||||||
b.HasKey("UserId", "RoleId");
|
|
||||||
|
|
||||||
b.HasIndex("RoleId");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUserRoles");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Value", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("Name");
|
|
||||||
|
|
||||||
b.HasKey("id");
|
|
||||||
|
|
||||||
b.ToTable("Values");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("api.Models.Role")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("RoleId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("api.Models.User")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("UserId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("api.Models.User")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("UserId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", 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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,31 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
namespace api.Migrations
|
|
||||||
{
|
|
||||||
public partial class locs : Migration
|
|
||||||
{
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "mainPhoto",
|
|
||||||
table: "EventLocs",
|
|
||||||
nullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "squarePhoto",
|
|
||||||
table: "EventLocs",
|
|
||||||
nullable: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "mainPhoto",
|
|
||||||
table: "EventLocs");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "squarePhoto",
|
|
||||||
table: "EventLocs");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,503 +0,0 @@
|
||||||
// <auto-generated />
|
|
||||||
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<int>", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("ClaimType");
|
|
||||||
|
|
||||||
b.Property<string>("ClaimValue");
|
|
||||||
|
|
||||||
b.Property<int>("RoleId");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("RoleId");
|
|
||||||
|
|
||||||
b.ToTable("AspNetRoleClaims");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("ClaimType");
|
|
||||||
|
|
||||||
b.Property<string>("ClaimValue");
|
|
||||||
|
|
||||||
b.Property<int>("UserId");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("UserId");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUserClaims");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("LoginProvider");
|
|
||||||
|
|
||||||
b.Property<string>("ProviderKey");
|
|
||||||
|
|
||||||
b.Property<string>("ProviderDisplayName");
|
|
||||||
|
|
||||||
b.Property<int>("UserId");
|
|
||||||
|
|
||||||
b.HasKey("LoginProvider", "ProviderKey");
|
|
||||||
|
|
||||||
b.HasIndex("UserId");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUserLogins");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("UserId");
|
|
||||||
|
|
||||||
b.Property<string>("LoginProvider");
|
|
||||||
|
|
||||||
b.Property<string>("Name");
|
|
||||||
|
|
||||||
b.Property<string>("Value");
|
|
||||||
|
|
||||||
b.HasKey("UserId", "LoginProvider", "Name");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUserTokens");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Cromos", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("DescLocked");
|
|
||||||
|
|
||||||
b.Property<string>("DescMostrar");
|
|
||||||
|
|
||||||
b.Property<string>("DescUnlocked");
|
|
||||||
|
|
||||||
b.Property<string>("Nome");
|
|
||||||
|
|
||||||
b.Property<string>("QRCode");
|
|
||||||
|
|
||||||
b.Property<string>("img");
|
|
||||||
|
|
||||||
b.Property<string>("logo");
|
|
||||||
|
|
||||||
b.Property<int>("pontos");
|
|
||||||
|
|
||||||
b.Property<bool>("unlocked");
|
|
||||||
|
|
||||||
b.Property<string>("websiteCromo");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Cromos");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Event", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("Desc");
|
|
||||||
|
|
||||||
b.Property<string>("Nome");
|
|
||||||
|
|
||||||
b.Property<bool>("aDecorrer");
|
|
||||||
|
|
||||||
b.Property<string>("custo");
|
|
||||||
|
|
||||||
b.Property<string>("horas");
|
|
||||||
|
|
||||||
b.Property<string>("imagem");
|
|
||||||
|
|
||||||
b.Property<string>("localizacao");
|
|
||||||
|
|
||||||
b.Property<string>("notas");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Events");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.EventLoc", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("Desc");
|
|
||||||
|
|
||||||
b.Property<int>("EventId");
|
|
||||||
|
|
||||||
b.Property<int?>("ImgId");
|
|
||||||
|
|
||||||
b.Property<float>("Lat");
|
|
||||||
|
|
||||||
b.Property<float>("Long");
|
|
||||||
|
|
||||||
b.Property<string>("Nome");
|
|
||||||
|
|
||||||
b.Property<string>("desafio");
|
|
||||||
|
|
||||||
b.Property<string>("mainPhoto");
|
|
||||||
|
|
||||||
b.Property<int>("pontos");
|
|
||||||
|
|
||||||
b.Property<string>("squarePhoto");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("ImgId");
|
|
||||||
|
|
||||||
b.ToTable("EventLocs");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.EventLocVisited", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<int?>("LocationId");
|
|
||||||
|
|
||||||
b.Property<int?>("TeamId");
|
|
||||||
|
|
||||||
b.Property<bool>("complete");
|
|
||||||
|
|
||||||
b.Property<DateTime>("timestamp");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("LocationId");
|
|
||||||
|
|
||||||
b.HasIndex("TeamId");
|
|
||||||
|
|
||||||
b.ToTable("EventLocsVisited");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Log", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<int?>("UserId");
|
|
||||||
|
|
||||||
b.Property<int?>("UserId1");
|
|
||||||
|
|
||||||
b.Property<int>("amount");
|
|
||||||
|
|
||||||
b.Property<int>("available");
|
|
||||||
|
|
||||||
b.Property<string>("logType");
|
|
||||||
|
|
||||||
b.Property<int?>("productId");
|
|
||||||
|
|
||||||
b.Property<string>("transactionId");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("UserId");
|
|
||||||
|
|
||||||
b.HasIndex("UserId1");
|
|
||||||
|
|
||||||
b.HasIndex("productId");
|
|
||||||
|
|
||||||
b.ToTable("Logs");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Photo", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<DateTime>("DateAdded");
|
|
||||||
|
|
||||||
b.Property<string>("Description");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMain");
|
|
||||||
|
|
||||||
b.Property<string>("Url");
|
|
||||||
|
|
||||||
b.Property<int>("UserId");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("UserId");
|
|
||||||
|
|
||||||
b.ToTable("Photos");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Product", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<int>("basePrice");
|
|
||||||
|
|
||||||
b.Property<string>("name");
|
|
||||||
|
|
||||||
b.Property<float>("revenue");
|
|
||||||
|
|
||||||
b.Property<int>("sold");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Products");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Role", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("ConcurrencyStamp")
|
|
||||||
.IsConcurrencyToken();
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.HasMaxLength(256);
|
|
||||||
|
|
||||||
b.Property<string>("NormalizedName")
|
|
||||||
.HasMaxLength(256);
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("NormalizedName")
|
|
||||||
.IsUnique()
|
|
||||||
.HasName("RoleNameIndex");
|
|
||||||
|
|
||||||
b.ToTable("AspNetRoles");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Team", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("CapQR");
|
|
||||||
|
|
||||||
b.Property<int>("EventId");
|
|
||||||
|
|
||||||
b.Property<int>("NMembros");
|
|
||||||
|
|
||||||
b.Property<string>("Nome");
|
|
||||||
|
|
||||||
b.Property<int>("Pontos");
|
|
||||||
|
|
||||||
b.Property<bool>("pagamento");
|
|
||||||
|
|
||||||
b.Property<string>("pagamentoVerifyCode");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Teams");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.User", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<int>("AccessFailedCount");
|
|
||||||
|
|
||||||
b.Property<string>("ConcurrencyStamp")
|
|
||||||
.IsConcurrencyToken();
|
|
||||||
|
|
||||||
b.Property<string>("Email")
|
|
||||||
.HasMaxLength(256);
|
|
||||||
|
|
||||||
b.Property<bool>("EmailConfirmed");
|
|
||||||
|
|
||||||
b.Property<bool>("LockoutEnabled");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
|
||||||
|
|
||||||
b.Property<string>("NormalizedEmail")
|
|
||||||
.HasMaxLength(256);
|
|
||||||
|
|
||||||
b.Property<string>("NormalizedUserName")
|
|
||||||
.HasMaxLength(256);
|
|
||||||
|
|
||||||
b.Property<string>("PasswordHash");
|
|
||||||
|
|
||||||
b.Property<string>("PhoneNumber");
|
|
||||||
|
|
||||||
b.Property<bool>("PhoneNumberConfirmed");
|
|
||||||
|
|
||||||
b.Property<string>("QRcode");
|
|
||||||
|
|
||||||
b.Property<string>("SecurityStamp");
|
|
||||||
|
|
||||||
b.Property<bool>("TwoFactorEnabled");
|
|
||||||
|
|
||||||
b.Property<string>("UserName")
|
|
||||||
.HasMaxLength(256);
|
|
||||||
|
|
||||||
b.Property<string>("cromos");
|
|
||||||
|
|
||||||
b.Property<int>("drinks");
|
|
||||||
|
|
||||||
b.Property<int>("food");
|
|
||||||
|
|
||||||
b.Property<string>("fullName");
|
|
||||||
|
|
||||||
b.Property<int?>("teamID");
|
|
||||||
|
|
||||||
b.Property<string>("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<int>("UserId");
|
|
||||||
|
|
||||||
b.Property<int>("RoleId");
|
|
||||||
|
|
||||||
b.HasKey("UserId", "RoleId");
|
|
||||||
|
|
||||||
b.HasIndex("RoleId");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUserRoles");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Value", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("Name");
|
|
||||||
|
|
||||||
b.HasKey("id");
|
|
||||||
|
|
||||||
b.ToTable("Values");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("api.Models.Role")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("RoleId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("api.Models.User")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("UserId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("api.Models.User")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("UserId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", 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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,32 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
namespace api.Migrations
|
|
||||||
{
|
|
||||||
public partial class eventloc : Migration
|
|
||||||
{
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "desafio",
|
|
||||||
table: "EventLocs",
|
|
||||||
nullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
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");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,505 +0,0 @@
|
||||||
// <auto-generated />
|
|
||||||
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<int>", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("ClaimType");
|
|
||||||
|
|
||||||
b.Property<string>("ClaimValue");
|
|
||||||
|
|
||||||
b.Property<int>("RoleId");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("RoleId");
|
|
||||||
|
|
||||||
b.ToTable("AspNetRoleClaims");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("ClaimType");
|
|
||||||
|
|
||||||
b.Property<string>("ClaimValue");
|
|
||||||
|
|
||||||
b.Property<int>("UserId");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("UserId");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUserClaims");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("LoginProvider");
|
|
||||||
|
|
||||||
b.Property<string>("ProviderKey");
|
|
||||||
|
|
||||||
b.Property<string>("ProviderDisplayName");
|
|
||||||
|
|
||||||
b.Property<int>("UserId");
|
|
||||||
|
|
||||||
b.HasKey("LoginProvider", "ProviderKey");
|
|
||||||
|
|
||||||
b.HasIndex("UserId");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUserLogins");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("UserId");
|
|
||||||
|
|
||||||
b.Property<string>("LoginProvider");
|
|
||||||
|
|
||||||
b.Property<string>("Name");
|
|
||||||
|
|
||||||
b.Property<string>("Value");
|
|
||||||
|
|
||||||
b.HasKey("UserId", "LoginProvider", "Name");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUserTokens");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Cromos", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("DescLocked");
|
|
||||||
|
|
||||||
b.Property<string>("DescMostrar");
|
|
||||||
|
|
||||||
b.Property<string>("DescUnlocked");
|
|
||||||
|
|
||||||
b.Property<string>("Nome");
|
|
||||||
|
|
||||||
b.Property<string>("QRCode");
|
|
||||||
|
|
||||||
b.Property<string>("img");
|
|
||||||
|
|
||||||
b.Property<string>("logo");
|
|
||||||
|
|
||||||
b.Property<int>("pontos");
|
|
||||||
|
|
||||||
b.Property<bool>("unlocked");
|
|
||||||
|
|
||||||
b.Property<string>("websiteCromo");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Cromos");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Event", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("Desc");
|
|
||||||
|
|
||||||
b.Property<string>("Nome");
|
|
||||||
|
|
||||||
b.Property<bool>("aDecorrer");
|
|
||||||
|
|
||||||
b.Property<string>("custo");
|
|
||||||
|
|
||||||
b.Property<string>("horas");
|
|
||||||
|
|
||||||
b.Property<string>("imagem");
|
|
||||||
|
|
||||||
b.Property<string>("localizacao");
|
|
||||||
|
|
||||||
b.Property<string>("notas");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Events");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.EventLoc", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("Desc");
|
|
||||||
|
|
||||||
b.Property<int>("EventId");
|
|
||||||
|
|
||||||
b.Property<int?>("ImgId");
|
|
||||||
|
|
||||||
b.Property<float>("Lat");
|
|
||||||
|
|
||||||
b.Property<float>("Long");
|
|
||||||
|
|
||||||
b.Property<string>("Nome");
|
|
||||||
|
|
||||||
b.Property<string>("desafio");
|
|
||||||
|
|
||||||
b.Property<string>("localizacao");
|
|
||||||
|
|
||||||
b.Property<string>("mainPhoto");
|
|
||||||
|
|
||||||
b.Property<int>("pontos");
|
|
||||||
|
|
||||||
b.Property<string>("squarePhoto");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("ImgId");
|
|
||||||
|
|
||||||
b.ToTable("EventLocs");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.EventLocVisited", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<int?>("LocationId");
|
|
||||||
|
|
||||||
b.Property<int?>("TeamId");
|
|
||||||
|
|
||||||
b.Property<bool>("complete");
|
|
||||||
|
|
||||||
b.Property<DateTime>("timestamp");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("LocationId");
|
|
||||||
|
|
||||||
b.HasIndex("TeamId");
|
|
||||||
|
|
||||||
b.ToTable("EventLocsVisited");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Log", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<int?>("UserId");
|
|
||||||
|
|
||||||
b.Property<int?>("UserId1");
|
|
||||||
|
|
||||||
b.Property<int>("amount");
|
|
||||||
|
|
||||||
b.Property<int>("available");
|
|
||||||
|
|
||||||
b.Property<string>("logType");
|
|
||||||
|
|
||||||
b.Property<int?>("productId");
|
|
||||||
|
|
||||||
b.Property<string>("transactionId");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("UserId");
|
|
||||||
|
|
||||||
b.HasIndex("UserId1");
|
|
||||||
|
|
||||||
b.HasIndex("productId");
|
|
||||||
|
|
||||||
b.ToTable("Logs");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Photo", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<DateTime>("DateAdded");
|
|
||||||
|
|
||||||
b.Property<string>("Description");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMain");
|
|
||||||
|
|
||||||
b.Property<string>("Url");
|
|
||||||
|
|
||||||
b.Property<int>("UserId");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("UserId");
|
|
||||||
|
|
||||||
b.ToTable("Photos");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Product", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<int>("basePrice");
|
|
||||||
|
|
||||||
b.Property<string>("name");
|
|
||||||
|
|
||||||
b.Property<float>("revenue");
|
|
||||||
|
|
||||||
b.Property<int>("sold");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Products");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Role", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("ConcurrencyStamp")
|
|
||||||
.IsConcurrencyToken();
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.HasMaxLength(256);
|
|
||||||
|
|
||||||
b.Property<string>("NormalizedName")
|
|
||||||
.HasMaxLength(256);
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("NormalizedName")
|
|
||||||
.IsUnique()
|
|
||||||
.HasName("RoleNameIndex");
|
|
||||||
|
|
||||||
b.ToTable("AspNetRoles");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Team", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("CapQR");
|
|
||||||
|
|
||||||
b.Property<int>("EventId");
|
|
||||||
|
|
||||||
b.Property<int>("NMembros");
|
|
||||||
|
|
||||||
b.Property<string>("Nome");
|
|
||||||
|
|
||||||
b.Property<int>("Pontos");
|
|
||||||
|
|
||||||
b.Property<bool>("pagamento");
|
|
||||||
|
|
||||||
b.Property<string>("pagamentoVerifyCode");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Teams");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.User", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<int>("AccessFailedCount");
|
|
||||||
|
|
||||||
b.Property<string>("ConcurrencyStamp")
|
|
||||||
.IsConcurrencyToken();
|
|
||||||
|
|
||||||
b.Property<string>("Email")
|
|
||||||
.HasMaxLength(256);
|
|
||||||
|
|
||||||
b.Property<bool>("EmailConfirmed");
|
|
||||||
|
|
||||||
b.Property<bool>("LockoutEnabled");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
|
||||||
|
|
||||||
b.Property<string>("NormalizedEmail")
|
|
||||||
.HasMaxLength(256);
|
|
||||||
|
|
||||||
b.Property<string>("NormalizedUserName")
|
|
||||||
.HasMaxLength(256);
|
|
||||||
|
|
||||||
b.Property<string>("PasswordHash");
|
|
||||||
|
|
||||||
b.Property<string>("PhoneNumber");
|
|
||||||
|
|
||||||
b.Property<bool>("PhoneNumberConfirmed");
|
|
||||||
|
|
||||||
b.Property<string>("QRcode");
|
|
||||||
|
|
||||||
b.Property<string>("SecurityStamp");
|
|
||||||
|
|
||||||
b.Property<bool>("TwoFactorEnabled");
|
|
||||||
|
|
||||||
b.Property<string>("UserName")
|
|
||||||
.HasMaxLength(256);
|
|
||||||
|
|
||||||
b.Property<string>("cromos");
|
|
||||||
|
|
||||||
b.Property<int>("drinks");
|
|
||||||
|
|
||||||
b.Property<int>("food");
|
|
||||||
|
|
||||||
b.Property<string>("fullName");
|
|
||||||
|
|
||||||
b.Property<int?>("teamID");
|
|
||||||
|
|
||||||
b.Property<string>("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<int>("UserId");
|
|
||||||
|
|
||||||
b.Property<int>("RoleId");
|
|
||||||
|
|
||||||
b.HasKey("UserId", "RoleId");
|
|
||||||
|
|
||||||
b.HasIndex("RoleId");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUserRoles");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("api.Models.Value", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<string>("Name");
|
|
||||||
|
|
||||||
b.HasKey("id");
|
|
||||||
|
|
||||||
b.ToTable("Values");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("api.Models.Role")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("RoleId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("api.Models.User")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("UserId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("api.Models.User")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("UserId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", 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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,22 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
namespace api.Migrations
|
|
||||||
{
|
|
||||||
public partial class eventlocpos : Migration
|
|
||||||
{
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "localizacao",
|
|
||||||
table: "EventLocs",
|
|
||||||
nullable: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "localizacao",
|
|
||||||
table: "EventLocs");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
namespace api.Migrations
|
|
||||||
{
|
|
||||||
public partial class a : Migration
|
|
||||||
{
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AlterColumn<double>(
|
|
||||||
name: "Long",
|
|
||||||
table: "EventLocs",
|
|
||||||
nullable: false,
|
|
||||||
oldClrType: typeof(float));
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<double>(
|
|
||||||
name: "Lat",
|
|
||||||
table: "EventLocs",
|
|
||||||
nullable: false,
|
|
||||||
oldClrType: typeof(float));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AlterColumn<float>(
|
|
||||||
name: "Long",
|
|
||||||
table: "EventLocs",
|
|
||||||
nullable: false,
|
|
||||||
oldClrType: typeof(double));
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<float>(
|
|
||||||
name: "Lat",
|
|
||||||
table: "EventLocs",
|
|
||||||
nullable: false,
|
|
||||||
oldClrType: typeof(double));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -9,8 +9,8 @@ using api.Data;
|
||||||
namespace api.Migrations
|
namespace api.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(DataContext))]
|
[DbContext(typeof(DataContext))]
|
||||||
[Migration("20190322021203_a")]
|
[Migration("20190323222043_uo")]
|
||||||
partial class a
|
partial class uo
|
||||||
{
|
{
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
{
|
{
|
||||||
|
@ -364,6 +364,8 @@ namespace api.Migrations
|
||||||
|
|
||||||
b.Property<string>("fullName");
|
b.Property<string>("fullName");
|
||||||
|
|
||||||
|
b.Property<string>("profileImage");
|
||||||
|
|
||||||
b.Property<int?>("teamID");
|
b.Property<int?>("teamID");
|
||||||
|
|
||||||
b.Property<string>("university");
|
b.Property<string>("university");
|
|
@ -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<int>(nullable: false)
|
||||||
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||||
|
Name = table.Column<string>(maxLength: 256, nullable: true),
|
||||||
|
NormalizedName = table.Column<string>(maxLength: 256, nullable: true),
|
||||||
|
ConcurrencyStamp = table.Column<string>(nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_AspNetRoles", x => x.Id);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "Cromos",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<int>(nullable: false)
|
||||||
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||||
|
QRCode = table.Column<string>(nullable: true),
|
||||||
|
Nome = table.Column<string>(nullable: true),
|
||||||
|
DescLocked = table.Column<string>(nullable: true),
|
||||||
|
DescUnlocked = table.Column<string>(nullable: true),
|
||||||
|
DescMostrar = table.Column<string>(nullable: true),
|
||||||
|
img = table.Column<string>(nullable: true),
|
||||||
|
websiteCromo = table.Column<string>(nullable: true),
|
||||||
|
unlocked = table.Column<bool>(nullable: false),
|
||||||
|
logo = table.Column<string>(nullable: true),
|
||||||
|
pontos = table.Column<int>(nullable: false)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_Cromos", x => x.Id);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "Events",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<int>(nullable: false)
|
||||||
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||||
|
Nome = table.Column<string>(nullable: true),
|
||||||
|
Desc = table.Column<string>(nullable: true),
|
||||||
|
imagem = table.Column<string>(nullable: true),
|
||||||
|
horas = table.Column<string>(nullable: true),
|
||||||
|
aDecorrer = table.Column<bool>(nullable: false),
|
||||||
|
localizacao = table.Column<string>(nullable: true),
|
||||||
|
notas = table.Column<string>(nullable: true),
|
||||||
|
custo = table.Column<string>(nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_Events", x => x.Id);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "Products",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<int>(nullable: false)
|
||||||
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||||
|
name = table.Column<string>(nullable: true),
|
||||||
|
basePrice = table.Column<int>(nullable: false),
|
||||||
|
sold = table.Column<int>(nullable: false),
|
||||||
|
revenue = table.Column<float>(nullable: false)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_Products", x => x.Id);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "Teams",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<int>(nullable: false)
|
||||||
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||||
|
EventId = table.Column<int>(nullable: false),
|
||||||
|
Nome = table.Column<string>(nullable: true),
|
||||||
|
CapQR = table.Column<string>(nullable: true),
|
||||||
|
NMembros = table.Column<int>(nullable: false),
|
||||||
|
Pontos = table.Column<int>(nullable: false),
|
||||||
|
pagamento = table.Column<bool>(nullable: false),
|
||||||
|
pagamentoVerifyCode = table.Column<string>(nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_Teams", x => x.Id);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "Values",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
id = table.Column<int>(nullable: false)
|
||||||
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||||
|
Name = table.Column<string>(nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_Values", x => x.id);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "AspNetRoleClaims",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<int>(nullable: false)
|
||||||
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||||
|
RoleId = table.Column<int>(nullable: false),
|
||||||
|
ClaimType = table.Column<string>(nullable: true),
|
||||||
|
ClaimValue = table.Column<string>(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<int>(nullable: false)
|
||||||
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||||
|
UserName = table.Column<string>(maxLength: 256, nullable: true),
|
||||||
|
NormalizedUserName = table.Column<string>(maxLength: 256, nullable: true),
|
||||||
|
Email = table.Column<string>(maxLength: 256, nullable: true),
|
||||||
|
NormalizedEmail = table.Column<string>(maxLength: 256, nullable: true),
|
||||||
|
EmailConfirmed = table.Column<bool>(nullable: false),
|
||||||
|
PasswordHash = table.Column<string>(nullable: true),
|
||||||
|
SecurityStamp = table.Column<string>(nullable: true),
|
||||||
|
ConcurrencyStamp = table.Column<string>(nullable: true),
|
||||||
|
PhoneNumber = table.Column<string>(nullable: true),
|
||||||
|
PhoneNumberConfirmed = table.Column<bool>(nullable: false),
|
||||||
|
TwoFactorEnabled = table.Column<bool>(nullable: false),
|
||||||
|
LockoutEnd = table.Column<DateTimeOffset>(nullable: true),
|
||||||
|
LockoutEnabled = table.Column<bool>(nullable: false),
|
||||||
|
AccessFailedCount = table.Column<int>(nullable: false),
|
||||||
|
fullName = table.Column<string>(nullable: true),
|
||||||
|
university = table.Column<string>(nullable: true),
|
||||||
|
QRcode = table.Column<string>(nullable: true),
|
||||||
|
drinks = table.Column<int>(nullable: false),
|
||||||
|
food = table.Column<int>(nullable: false),
|
||||||
|
teamID = table.Column<int>(nullable: true),
|
||||||
|
cromos = table.Column<string>(nullable: true),
|
||||||
|
profileImage = table.Column<string>(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<int>(nullable: false)
|
||||||
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||||
|
UserId = table.Column<int>(nullable: false),
|
||||||
|
ClaimType = table.Column<string>(nullable: true),
|
||||||
|
ClaimValue = table.Column<string>(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<string>(nullable: false),
|
||||||
|
ProviderKey = table.Column<string>(nullable: false),
|
||||||
|
ProviderDisplayName = table.Column<string>(nullable: true),
|
||||||
|
UserId = table.Column<int>(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<int>(nullable: false),
|
||||||
|
RoleId = table.Column<int>(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<int>(nullable: false),
|
||||||
|
LoginProvider = table.Column<string>(nullable: false),
|
||||||
|
Name = table.Column<string>(nullable: false),
|
||||||
|
Value = table.Column<string>(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<int>(nullable: false)
|
||||||
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||||
|
amount = table.Column<int>(nullable: false),
|
||||||
|
available = table.Column<int>(nullable: false),
|
||||||
|
productId = table.Column<int>(nullable: true),
|
||||||
|
transactionId = table.Column<string>(nullable: true),
|
||||||
|
logType = table.Column<string>(nullable: true),
|
||||||
|
UserId = table.Column<int>(nullable: true),
|
||||||
|
UserId1 = table.Column<int>(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<int>(nullable: false)
|
||||||
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||||
|
Url = table.Column<string>(nullable: true),
|
||||||
|
Description = table.Column<string>(nullable: true),
|
||||||
|
DateAdded = table.Column<DateTime>(nullable: false),
|
||||||
|
IsMain = table.Column<bool>(nullable: false),
|
||||||
|
UserId = table.Column<int>(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<int>(nullable: false)
|
||||||
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||||
|
EventId = table.Column<int>(nullable: false),
|
||||||
|
Lat = table.Column<double>(nullable: false),
|
||||||
|
Long = table.Column<double>(nullable: false),
|
||||||
|
Nome = table.Column<string>(nullable: true),
|
||||||
|
Desc = table.Column<string>(nullable: true),
|
||||||
|
ImgId = table.Column<int>(nullable: true),
|
||||||
|
squarePhoto = table.Column<string>(nullable: true),
|
||||||
|
mainPhoto = table.Column<string>(nullable: true),
|
||||||
|
desafio = table.Column<string>(nullable: true),
|
||||||
|
pontos = table.Column<int>(nullable: false),
|
||||||
|
localizacao = table.Column<string>(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<int>(nullable: false)
|
||||||
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||||
|
TeamId = table.Column<int>(nullable: true),
|
||||||
|
LocationId = table.Column<int>(nullable: true),
|
||||||
|
timestamp = table.Column<DateTime>(nullable: false),
|
||||||
|
complete = table.Column<bool>(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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -362,6 +362,8 @@ namespace api.Migrations
|
||||||
|
|
||||||
b.Property<string>("fullName");
|
b.Property<string>("fullName");
|
||||||
|
|
||||||
|
b.Property<string>("profileImage");
|
||||||
|
|
||||||
b.Property<int?>("teamID");
|
b.Property<int?>("teamID");
|
||||||
|
|
||||||
b.Property<string>("university");
|
b.Property<string>("university");
|
||||||
|
|
|
@ -23,6 +23,6 @@ namespace api.Models
|
||||||
public Team team{get;set;}
|
public Team team{get;set;}
|
||||||
|
|
||||||
public string cromos {get;set;}
|
public string cromos {get;set;}
|
||||||
|
public string profileImage{get;set;}
|
||||||
}
|
}
|
||||||
}
|
}
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 117 KiB |
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 117 KiB |
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 117 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 147 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 117 KiB |
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 117 KiB |
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 117 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 147 KiB |
|
@ -5,7 +5,7 @@
|
||||||
},
|
},
|
||||||
"ConnectionStrings":
|
"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": {
|
"Logging": {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
},
|
},
|
||||||
"ConnectionStrings":
|
"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": {
|
"Logging": {
|
||||||
|
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 117 KiB |
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 117 KiB |
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 117 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 147 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 117 KiB |
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 117 KiB |
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 117 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 147 KiB |