This commit is contained in:
parent
5637b43db9
commit
3b95a78f2e
|
@ -18,40 +18,50 @@ namespace api.Data
|
||||||
|
|
||||||
public async Task<IEnumerable<EventLocVisited>> GetEventLocsVisited()
|
public async Task<IEnumerable<EventLocVisited>> GetEventLocsVisited()
|
||||||
{
|
{
|
||||||
var rEventLocsVisitedList = await _context.EventLocsVisited.Include(e=>e.Team).Include(e=>e.Location).ToListAsync();
|
var rEventLocsVisitedList = await _context.EventLocsVisited.Include(e => e.Team).Include(e => e.Location).ToListAsync();
|
||||||
|
|
||||||
return rEventLocsVisitedList;
|
return rEventLocsVisitedList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<List<EventLocVisited>> GetEventLocsVisitedTeam(int id)
|
public async Task<List<EventLocVisited>> GetEventLocsVisitedTeam(int id)
|
||||||
{
|
{
|
||||||
List<EventLocVisited> allLocs = await _context.EventLocsVisited.Include(e=>e.Team).Include(e=>e.Location).ToListAsync();
|
List<EventLoc> allPlaces = await _context.EventLocs.ToListAsync();
|
||||||
|
|
||||||
|
List<EventLocVisited> allLocs = await _context.EventLocsVisited.Include(e => e.Team).Include(e => e.Location).ToListAsync();
|
||||||
|
|
||||||
List<EventLocVisited> rList = new List<EventLocVisited>();
|
List<EventLocVisited> rList = new List<EventLocVisited>();
|
||||||
|
|
||||||
for(var i=0;i<allLocs.Count;i++){
|
for (int j = 0; j < allPlaces.Count; j++)
|
||||||
|
{
|
||||||
EventLocVisited a=allLocs[i];
|
|
||||||
|
EventLocVisited novo=new EventLocVisited();
|
||||||
if(allLocs[i].Team.Id == id){
|
|
||||||
|
novo.Location= allPlaces[j];
|
||||||
|
|
||||||
a.complete=true;
|
novo.complete=false;
|
||||||
}else{
|
|
||||||
a.complete=false;
|
for (var i = 0; i < allLocs.Count; i++)
|
||||||
|
{
|
||||||
|
if(allPlaces[j].Id == allLocs[i].Id){
|
||||||
|
novo.complete=true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rList.Add(a);
|
|
||||||
|
rList.Add(novo);
|
||||||
}
|
}
|
||||||
|
|
||||||
return rList;
|
return rList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<List<EventLocVisited>> GetEventLocsVisitedEvent(int id)
|
public async Task<List<EventLocVisited>> GetEventLocsVisitedEvent(int id)
|
||||||
{
|
{
|
||||||
List<EventLocVisited> allLocs = await _context.EventLocsVisited.Include(e=>e.Team).Include(e=>e.Location).ToListAsync();
|
List<EventLocVisited> allLocs = await _context.EventLocsVisited.Include(e => e.Team).Include(e => e.Location).ToListAsync();
|
||||||
List<EventLocVisited> rList = new List<EventLocVisited>();
|
List<EventLocVisited> rList = new List<EventLocVisited>();
|
||||||
for(var i=0;i<allLocs.Count;i++){
|
for (var i = 0; i < allLocs.Count; i++)
|
||||||
if(allLocs[i].Location.EventId == id){
|
{
|
||||||
|
if (allLocs[i].Location.EventId == id)
|
||||||
|
{
|
||||||
rList.Add(allLocs[i]);
|
rList.Add(allLocs[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,474 +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("20190316174616_TeamsV3")]
|
|
||||||
partial class TeamsV3
|
|
||||||
{
|
|
||||||
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.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.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<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.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<int?>("teamID");
|
|
||||||
|
|
||||||
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,498 +0,0 @@
|
||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
namespace api.Migrations
|
|
||||||
{
|
|
||||||
public partial class TeamsV3 : 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: "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)
|
|
||||||
},
|
|
||||||
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)
|
|
||||||
},
|
|
||||||
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),
|
|
||||||
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)
|
|
||||||
},
|
|
||||||
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: "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),
|
|
||||||
imgId = table.Column<int>(nullable: true)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Cromos", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_Cromos_Photos_imgId",
|
|
||||||
column: x => x.imgId,
|
|
||||||
principalTable: "Photos",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Restrict);
|
|
||||||
});
|
|
||||||
|
|
||||||
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<float>(nullable: false),
|
|
||||||
Long = table.Column<float>(nullable: false),
|
|
||||||
Nome = table.Column<string>(nullable: true),
|
|
||||||
Desc = table.Column<string>(nullable: true),
|
|
||||||
ImgId = table.Column<int>(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)
|
|
||||||
},
|
|
||||||
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_Cromos_imgId",
|
|
||||||
table: "Cromos",
|
|
||||||
column: "imgId");
|
|
||||||
|
|
||||||
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");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,488 +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("20190317185246_update")]
|
|
||||||
partial class update
|
|
||||||
{
|
|
||||||
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.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>("horas");
|
|
||||||
|
|
||||||
b.Property<string>("imagem");
|
|
||||||
|
|
||||||
b.Property<string>("localizacaoo");
|
|
||||||
|
|
||||||
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<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.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,77 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
namespace api.Migrations
|
|
||||||
{
|
|
||||||
public partial class update : Migration
|
|
||||||
{
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<bool>(
|
|
||||||
name: "aDecorrer",
|
|
||||||
table: "Events",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: false);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "horas",
|
|
||||||
table: "Events",
|
|
||||||
nullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "imagem",
|
|
||||||
table: "Events",
|
|
||||||
nullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "localizacaoo",
|
|
||||||
table: "Events",
|
|
||||||
nullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "notas",
|
|
||||||
table: "Events",
|
|
||||||
nullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "fullName",
|
|
||||||
table: "AspNetUsers",
|
|
||||||
nullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "university",
|
|
||||||
table: "AspNetUsers",
|
|
||||||
nullable: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "aDecorrer",
|
|
||||||
table: "Events");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "horas",
|
|
||||||
table: "Events");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "imagem",
|
|
||||||
table: "Events");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "localizacaoo",
|
|
||||||
table: "Events");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "notas",
|
|
||||||
table: "Events");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "fullName",
|
|
||||||
table: "AspNetUsers");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "university",
|
|
||||||
table: "AspNetUsers");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,488 +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("20190317185432_updatev2")]
|
|
||||||
partial class updatev2
|
|
||||||
{
|
|
||||||
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.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>("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<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.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,23 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
namespace api.Migrations
|
|
||||||
{
|
|
||||||
public partial class updatev2 : Migration
|
|
||||||
{
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.RenameColumn(
|
|
||||||
name: "localizacaoo",
|
|
||||||
table: "Events",
|
|
||||||
newName: "localizacao");
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.RenameColumn(
|
|
||||||
name: "localizacao",
|
|
||||||
table: "Events",
|
|
||||||
newName: "localizacaoo");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,492 +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("20190317190817_updatev3")]
|
|
||||||
partial class updatev3
|
|
||||||
{
|
|
||||||
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.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>("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<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<int>("pagamento");
|
|
||||||
|
|
||||||
b.Property<int>("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,33 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
namespace api.Migrations
|
|
||||||
{
|
|
||||||
public partial class updatev3 : Migration
|
|
||||||
{
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "pagamento",
|
|
||||||
table: "Teams",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 0);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "pagamentoVerifyCode",
|
|
||||||
table: "Teams",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "pagamento",
|
|
||||||
table: "Teams");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "pagamentoVerifyCode",
|
|
||||||
table: "Teams");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,492 +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("20190317190928_updatev5")]
|
|
||||||
partial class updatev5
|
|
||||||
{
|
|
||||||
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.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>("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<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,38 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
namespace api.Migrations
|
|
||||||
{
|
|
||||||
public partial class updatev5 : Migration
|
|
||||||
{
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "pagamentoVerifyCode",
|
|
||||||
table: "Teams",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(int));
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<bool>(
|
|
||||||
name: "pagamento",
|
|
||||||
table: "Teams",
|
|
||||||
nullable: false,
|
|
||||||
oldClrType: typeof(int));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AlterColumn<int>(
|
|
||||||
name: "pagamentoVerifyCode",
|
|
||||||
table: "Teams",
|
|
||||||
nullable: false,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<int>(
|
|
||||||
name: "pagamento",
|
|
||||||
table: "Teams",
|
|
||||||
nullable: false,
|
|
||||||
oldClrType: typeof(bool));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,494 +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("20190317202540_updatev6")]
|
|
||||||
partial class updatev6
|
|
||||||
{
|
|
||||||
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.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<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,22 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
namespace api.Migrations
|
|
||||||
{
|
|
||||||
public partial class updatev6 : Migration
|
|
||||||
{
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "custo",
|
|
||||||
table: "Events",
|
|
||||||
nullable: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "custo",
|
|
||||||
table: "Events");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,496 +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("20190318021249_cromos")]
|
|
||||||
partial class cromos
|
|
||||||
{
|
|
||||||
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<bool>("unlocked");
|
|
||||||
|
|
||||||
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<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,23 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
namespace api.Migrations
|
|
||||||
{
|
|
||||||
public partial class cromos : Migration
|
|
||||||
{
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<bool>(
|
|
||||||
name: "unlocked",
|
|
||||||
table: "Cromos",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: false);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "unlocked",
|
|
||||||
table: "Cromos");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,32 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
namespace api.Migrations
|
|
||||||
{
|
|
||||||
public partial class cromosV2 : Migration
|
|
||||||
{
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "pontos",
|
|
||||||
table: "Cromos",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 0);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "websiteCromo",
|
|
||||||
table: "Cromos",
|
|
||||||
nullable: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "pontos",
|
|
||||||
table: "Cromos");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "websiteCromo",
|
|
||||||
table: "Cromos");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -9,8 +9,8 @@ using api.Data;
|
||||||
namespace api.Migrations
|
namespace api.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(DataContext))]
|
[DbContext(typeof(DataContext))]
|
||||||
[Migration("20190318021814_cromosV2")]
|
[Migration("20190318183120_completev1")]
|
||||||
partial class cromosV2
|
partial class completev1
|
||||||
{
|
{
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
{
|
{
|
||||||
|
@ -176,6 +176,8 @@ namespace api.Migrations
|
||||||
|
|
||||||
b.Property<int?>("TeamId");
|
b.Property<int?>("TeamId");
|
||||||
|
|
||||||
|
b.Property<bool>("complete");
|
||||||
|
|
||||||
b.Property<DateTime>("timestamp");
|
b.Property<DateTime>("timestamp");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
|
@ -0,0 +1,17 @@
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
namespace api.Migrations
|
||||||
|
{
|
||||||
|
public partial class completev1 : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -174,6 +174,8 @@ namespace api.Migrations
|
||||||
|
|
||||||
b.Property<int?>("TeamId");
|
b.Property<int?>("TeamId");
|
||||||
|
|
||||||
|
b.Property<bool>("complete");
|
||||||
|
|
||||||
b.Property<DateTime>("timestamp");
|
b.Property<DateTime>("timestamp");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
|
@ -13,6 +13,6 @@ namespace api.Models
|
||||||
public String Nome{get;set;} //Nome da localização
|
public String Nome{get;set;} //Nome da localização
|
||||||
public String Desc{get;set;} //Descrição
|
public String Desc{get;set;} //Descrição
|
||||||
public Photo Img{get;set;} //Foto da localização
|
public Photo Img{get;set;} //Foto da localização
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue