Merge branch 'master' of https://dev.azure.com/luolan/ASG%E7%B3%BB%E7%BB%9F/_git/asg_backend
This commit is contained in:
commit
b76aea9835
@ -110,7 +110,7 @@ namespace asg_form.Controllers
|
|||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public form form { get; set; }
|
public form form { get; set; }
|
||||||
public Events.T_events events { get; set; }
|
public T_events events { get; set; }
|
||||||
public string msg { get; set; }
|
public string msg { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
|
|
||||||
using asg_form.Controllers.Store;
|
using asg_form.Controllers.Store;
|
||||||
|
using asg_form.Controllers.Team;
|
||||||
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore.DataEncryption;
|
using Microsoft.EntityFrameworkCore.DataEncryption;
|
||||||
@ -27,6 +28,9 @@ namespace asg_form.Controllers
|
|||||||
builder.Property(a => a.Status).IsRequired();
|
builder.Property(a => a.Status).IsRequired();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void Configure(EntityTypeBuilder<form> builder)
|
public void Configure(EntityTypeBuilder<form> builder)
|
||||||
{
|
{
|
||||||
builder.ToTable("F_form");
|
builder.ToTable("F_form");
|
||||||
@ -35,11 +39,38 @@ namespace asg_form.Controllers
|
|||||||
builder.Property(e => e.team_password).IsRequired();
|
builder.Property(e => e.team_password).IsRequired();
|
||||||
builder.Property(e => e.time).IsRequired();
|
builder.Property(e => e.time).IsRequired();
|
||||||
builder.Property(e => e.piaoshu).IsRequired();
|
builder.Property(e => e.piaoshu).IsRequired();
|
||||||
builder.HasOne<Events.T_events>(c => c.events).WithMany(a => a.forms).IsRequired();
|
builder.HasOne<T_events>(c => c.events).WithMany(a => a.forms).IsRequired();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class TeamConfig : IEntityTypeConfiguration<T_Team>
|
||||||
|
{
|
||||||
|
public void Configure(EntityTypeBuilder<T_Team> builder)
|
||||||
|
{
|
||||||
|
builder.ToTable("F_Team");
|
||||||
|
builder.Property(e => e.team_name).IsRequired();
|
||||||
|
builder.Property(e => e.team_tel).IsRequired();
|
||||||
|
builder.Property(e => e.team_password).IsRequired();
|
||||||
|
builder.Property(e => e.time).IsRequired();
|
||||||
|
builder.Property(e => e.piaoshu).IsRequired();
|
||||||
|
builder.HasMany<T_events>(a => a.Events).WithMany(a => a.Teams).UsingEntity(j => j.ToTable("T_Teams_Player"));
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class PlayerConfig : IEntityTypeConfiguration<T_Player>
|
||||||
|
{
|
||||||
|
public void Configure(EntityTypeBuilder<T_Player> builder)
|
||||||
|
{
|
||||||
|
builder.ToTable("F_Player");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class RoleConfig : IEntityTypeConfiguration<role>
|
class RoleConfig : IEntityTypeConfiguration<role>
|
||||||
{
|
{
|
||||||
public void Configure(EntityTypeBuilder<role> builder)
|
public void Configure(EntityTypeBuilder<role> builder)
|
||||||
@ -129,9 +160,9 @@ namespace asg_form.Controllers
|
|||||||
builder.HasOne<schedule.team_game>(e => e.team).WithMany(o=>o.logs).IsRequired();
|
builder.HasOne<schedule.team_game>(e => e.team).WithMany(o=>o.logs).IsRequired();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
class EventsConfig : IEntityTypeConfiguration<Events.T_events>
|
class EventsConfig : IEntityTypeConfiguration<T_events>
|
||||||
{
|
{
|
||||||
public void Configure(EntityTypeBuilder<Events.T_events> builder)
|
public void Configure(EntityTypeBuilder<T_events> builder)
|
||||||
{
|
{
|
||||||
builder.ToTable("F_events");
|
builder.ToTable("F_events");
|
||||||
builder.Property(e => e.Id).IsRequired();
|
builder.Property(e => e.Id).IsRequired();
|
||||||
@ -189,7 +220,8 @@ namespace asg_form.Controllers
|
|||||||
|
|
||||||
class TestDbContext : DbContext
|
class TestDbContext : DbContext
|
||||||
{
|
{
|
||||||
|
public DbSet<T_Team> Teams { get; set; }
|
||||||
|
public DbSet<T_Player> Players { get; set; }
|
||||||
|
|
||||||
public DbSet<form> Forms { get; set; }
|
public DbSet<form> Forms { get; set; }
|
||||||
public DbSet<role> Roles { get; set; }
|
public DbSet<role> Roles { get; set; }
|
||||||
@ -197,7 +229,7 @@ namespace asg_form.Controllers
|
|||||||
public DbSet<blog.blog_db> blogs { get; set; }
|
public DbSet<blog.blog_db> blogs { get; set; }
|
||||||
public DbSet<schedule.schedule_log> schlogs { get; set; }
|
public DbSet<schedule.schedule_log> schlogs { get; set; }
|
||||||
public DbSet<schedule.team_game> team_Games { get; set; }
|
public DbSet<schedule.team_game> team_Games { get; set; }
|
||||||
public DbSet<Events.T_events> events { get; set; }
|
public DbSet<T_events> events { get; set; }
|
||||||
public DbSet<Champion.T_Champion> Champions { get; set; }
|
public DbSet<Champion.T_Champion> Champions { get; set; }
|
||||||
public DbSet<comform.com_form> com_Forms { get; set; }
|
public DbSet<comform.com_form> com_Forms { get; set; }
|
||||||
public DbSet<T_Friend> T_Friends { get; set; }
|
public DbSet<T_Friend> T_Friends { get; set; }
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using Microsoft.AspNetCore.Authorization;
|
using asg_form.Controllers.Team;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using System.Security.Claims;
|
using System.Security.Claims;
|
||||||
@ -162,17 +163,7 @@ namespace asg_form.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class T_events
|
|
||||||
{
|
|
||||||
public int Id { get; set; }
|
|
||||||
public string? name { get; set; }
|
|
||||||
public bool? is_over { get; set; }
|
|
||||||
public DateTime? opentime { get; set; }
|
|
||||||
public List<form>? forms { get; set; }
|
|
||||||
public Uri? events_rule_uri { get; set; }
|
|
||||||
public string? promChart { get; set; }
|
|
||||||
|
|
||||||
}
|
|
||||||
public class events_get
|
public class events_get
|
||||||
{
|
{
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
@ -183,4 +174,16 @@ namespace asg_form.Controllers
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public class T_events
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public string? name { get; set; }
|
||||||
|
public bool? is_over { get; set; }
|
||||||
|
public DateTime? opentime { get; set; }
|
||||||
|
public List<T_Team> Teams { get; set; }=new List<T_Team>();
|
||||||
|
public List<form>? forms { get; set; }
|
||||||
|
public Uri? events_rule_uri { get; set; }
|
||||||
|
public string? promChart { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
35
asg_form/Controllers/Team/TeamDB.cs
Normal file
35
asg_form/Controllers/Team/TeamDB.cs
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
namespace asg_form.Controllers.Team
|
||||||
|
{
|
||||||
|
public class T_Team
|
||||||
|
{
|
||||||
|
|
||||||
|
public List<T_events> Events { get; set; }=new List<T_events>();
|
||||||
|
public long Id { get; set; }
|
||||||
|
public bool is_check { get; set; }
|
||||||
|
public int piaoshu { get; set; }
|
||||||
|
public long time { get; set; }
|
||||||
|
public string team_name { get; set; }
|
||||||
|
public string team_password { get; set; }
|
||||||
|
public string team_tel { get; set; }
|
||||||
|
public string logo_uri { get; set; }
|
||||||
|
|
||||||
|
// public string? belong { get; set; }
|
||||||
|
public List<T_Player> role { get; set; } = new List<T_Player>();
|
||||||
|
}
|
||||||
|
public class T_Player
|
||||||
|
{
|
||||||
|
public long Id { get; set; }
|
||||||
|
|
||||||
|
public T_Team Team { get; set; }//属于哪个队伍
|
||||||
|
|
||||||
|
public string role_id { get; set; } = "无";
|
||||||
|
public string role_name { get; set; } = "无";//阵容
|
||||||
|
public string? Game_Name { get; set; } = "未知";
|
||||||
|
public string role_lin { get; set; }
|
||||||
|
public string? Id_Card { get; set; } = "未知";
|
||||||
|
public string? Common_Roles { get; set; } = "未知";
|
||||||
|
public string? Phone_Number { get; set; } = "未知";
|
||||||
|
public string? Id_Card_Name { get; set; } = "未知";
|
||||||
|
public int? Historical_Ranks { get; set; } = 0;
|
||||||
|
}
|
||||||
|
}
|
210
asg_form/Controllers/Team/Team_http.cs
Normal file
210
asg_form/Controllers/Team/Team_http.cs
Normal file
@ -0,0 +1,210 @@
|
|||||||
|
using asg_form.Controllers.Hubs;
|
||||||
|
using Manganese.Text;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using Microsoft.AspNetCore.Identity;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.AspNetCore.SignalR;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using System.Security.Claims;
|
||||||
|
using static 所有队伍;
|
||||||
|
|
||||||
|
namespace asg_form.Controllers.Team
|
||||||
|
{
|
||||||
|
public class Team_http:ControllerBase
|
||||||
|
{
|
||||||
|
|
||||||
|
private readonly RoleManager<Role> roleManager;
|
||||||
|
private readonly UserManager<User> userManager;
|
||||||
|
|
||||||
|
private readonly IHubContext<room> hubContext;
|
||||||
|
public Team_http(IHubContext<room> hubContext, RoleManager<Role> roleManager, UserManager<User> userManager)
|
||||||
|
{
|
||||||
|
this.hubContext = hubContext;
|
||||||
|
this.roleManager = roleManager;
|
||||||
|
this.userManager = userManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
[Route("api/v1/form/my")]
|
||||||
|
[HttpPost]
|
||||||
|
[Authorize]
|
||||||
|
public async Task<ActionResult<string>> Posthameform(string eventname)
|
||||||
|
{
|
||||||
|
long id = this.User.FindFirst(ClaimTypes.NameIdentifier)!.Value.ToInt64();
|
||||||
|
var user = await userManager.Users.FirstAsync(a=>a.Id==id);
|
||||||
|
var team= user.myteam;
|
||||||
|
using(TestDbContext db=new TestDbContext())
|
||||||
|
{
|
||||||
|
var events= await db.events.FirstAsync(a=>a.name==eventname);
|
||||||
|
events.Teams.Add(team);
|
||||||
|
await db.SaveChangesAsync();
|
||||||
|
}
|
||||||
|
return Ok("成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取我的表单
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[Authorize]
|
||||||
|
[Route("api/v2/user/form")]
|
||||||
|
[HttpGet]
|
||||||
|
public async Task<ActionResult<form>> getmyform()
|
||||||
|
{
|
||||||
|
|
||||||
|
string id = this.User.FindFirst(ClaimTypes.NameIdentifier)!.Value;
|
||||||
|
var ouser = userManager.Users.Include(a => a.myteam.role).FirstOrDefault(a => a.Id == id.ToInt64());
|
||||||
|
if (ouser.haveform == null)
|
||||||
|
{
|
||||||
|
return BadRequest(new error_mb { code = 400, message = "你没有绑定表单" });
|
||||||
|
|
||||||
|
}
|
||||||
|
ouser.haveform.events.forms = null;
|
||||||
|
foreach (var role in ouser.haveform.role)
|
||||||
|
{
|
||||||
|
role.form = null;
|
||||||
|
}
|
||||||
|
return ouser.haveform;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 提交表单 eventname留空代表创建战队
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="imageFile"></param>
|
||||||
|
/// <param name="for1">表单信息</param>
|
||||||
|
/// <param name="captoken">谷歌人机验证验证码</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[Route("api/v3/form/")]
|
||||||
|
[HttpPost]
|
||||||
|
[Authorize]
|
||||||
|
public async Task<ActionResult<string>> PostAsync(IFormFile imageFile, [FromForm] form_get_new for1)
|
||||||
|
{
|
||||||
|
|
||||||
|
using (TestDbContext ctx = new TestDbContext()) {
|
||||||
|
string id = this.User.FindFirst(ClaimTypes.NameIdentifier)!.Value;
|
||||||
|
var user = await userManager.FindByIdAsync(id);
|
||||||
|
|
||||||
|
|
||||||
|
if (ctx.Teams.Include(a => a.Events).Any(e => e.team_name == for1.team_name))
|
||||||
|
{
|
||||||
|
return BadRequest(new error_mb { code = 400, message = "有重名队伍" });
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (imageFile == null || imageFile.Length == 0)
|
||||||
|
return BadRequest("Invalid image file.");
|
||||||
|
// 将文件保存到磁盘
|
||||||
|
var filePath = Path.Combine(Directory.GetCurrentDirectory(), $"loge/", $"{imageFile.FileName}");
|
||||||
|
using (var stream = new FileStream(filePath, FileMode.Create))
|
||||||
|
{
|
||||||
|
await imageFile.CopyToAsync(stream);
|
||||||
|
} // 返回成功响应
|
||||||
|
// base64toimg(for1.logo_base64, $@"{AppDomain.CurrentDomain.BaseDirectory}loge\{for1.events_name}\{for1.team_name}.png");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
T_Team form1 = new T_Team();
|
||||||
|
form1.logo_uri = $"/loge/{for1.team_name}.png";
|
||||||
|
form1.team_name = for1.team_name;
|
||||||
|
form1.team_password = for1.team_password;
|
||||||
|
form1.team_tel = for1.team_tel;
|
||||||
|
if (for1.events_name == null)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var events = await ctx.events.FirstAsync(ctx => ctx.name == for1.events_name);
|
||||||
|
|
||||||
|
form1.Events.Add(events);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<T_Player> role = new List<T_Player>();
|
||||||
|
foreach (role_get a in for1.role_get)
|
||||||
|
{
|
||||||
|
role.Add(new T_Player { role_id = a.role_id, role_lin = a.role_lin, role_name = a.role_name, Common_Roles = a.Common_Roles, Historical_Ranks = a.Historical_Ranks, Id_Card = a.Id_Card, Game_Name = a.Game_Name, Phone_Number = a.Phone_Number, Id_Card_Name = a.Id_Card_Name });
|
||||||
|
}
|
||||||
|
form1.role = role;
|
||||||
|
|
||||||
|
await ctx.Teams.AddAsync(form1);
|
||||||
|
await ctx.SaveChangesAsync();
|
||||||
|
user.myteam = form1;
|
||||||
|
await userManager.UpdateAsync(user);
|
||||||
|
// int nownumber = ctx.Forms.Count();
|
||||||
|
//ChatRoomHub chat = new ChatRoomHub();
|
||||||
|
// await chat.formok(nownumber, for1.team_name);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return "ok!";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获得所有表单信息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="page">页数</param>
|
||||||
|
/// <param name="page_long">每页长度</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
[Route("api/v2/form/all")]
|
||||||
|
[HttpGet]
|
||||||
|
[Authorize]
|
||||||
|
public List<team> Getform(short page, short page_long, string sort, string eventsname)
|
||||||
|
{
|
||||||
|
using (TestDbContext ctx = new TestDbContext())
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
int c = ctx.Teams.Count();
|
||||||
|
int b = page_long * page;
|
||||||
|
if (page_long * page > c)
|
||||||
|
{
|
||||||
|
b = c;
|
||||||
|
}
|
||||||
|
var events = ctx.events.First(ctx => ctx.name == eventsname);
|
||||||
|
List<T_Team> forms;
|
||||||
|
if (sort == "vote")
|
||||||
|
{
|
||||||
|
var team1 = ctx.events.Include(a => a.Teams).Select(a => new {a.name,a.Teams}).First(a=>a.name==eventsname);
|
||||||
|
forms= team1.Teams.Where(a=>a.is_check==true).OrderByDescending(a => a.piaoshu).ToList();
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//改为按照id倒序排序
|
||||||
|
//forms = ctx.Forms.Include(a => a.role).Skip(page_long * page - page_long).Take(page_long).ToList();
|
||||||
|
var team1 = ctx.events.Include(a => a.Teams).Select(a => new { a.name, a.Teams }).First(a => a.name == eventsname);
|
||||||
|
forms = team1.Teams.Where(a => a.is_check == true).OrderByDescending(a => a.Id).ToList();
|
||||||
|
|
||||||
|
}
|
||||||
|
List<team> teams = new List<team>();
|
||||||
|
|
||||||
|
|
||||||
|
foreach (T_Team for1 in forms)
|
||||||
|
{
|
||||||
|
var team = new team { id = for1.Id, name = for1.team_name, timer = for1.time, piaoshu = for1.piaoshu, logo_uri = for1.logo_uri };
|
||||||
|
|
||||||
|
teams.Add(team);
|
||||||
|
// a++;
|
||||||
|
}
|
||||||
|
return teams;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -625,8 +625,8 @@ else{
|
|||||||
if (this.User.FindAll(ClaimTypes.Role).Any(a => a.Value == "admin"))
|
if (this.User.FindAll(ClaimTypes.Role).Any(a => a.Value == "admin"))
|
||||||
{
|
{
|
||||||
TestDbContext ctx = new TestDbContext();
|
TestDbContext ctx = new TestDbContext();
|
||||||
var form = await ctx.Forms.Include(a => a.role).FirstOrDefaultAsync(a => a.Id == formid);
|
var form = await ctx.Teams.Include(a => a.role).FirstOrDefaultAsync(a => a.Id == formid);
|
||||||
var users = await userManager.Users.Include(a => a.haveform).Where(a => a.haveform == form).ToListAsync();
|
var users = await userManager.Users.Include(a => a.myteam).Where(a => a.myteam == form).ToListAsync();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
foreach (var user in users)
|
foreach (var user in users)
|
||||||
@ -639,7 +639,7 @@ else{
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx.Forms.Remove(form); ;
|
ctx.Teams.Remove(form); ;
|
||||||
await ctx.SaveChangesAsync();
|
await ctx.SaveChangesAsync();
|
||||||
logger.Warn($"管理员删除了表单{formid},参赛选手:{string.Join(',', form.role.Select(a => a.role_name))}");
|
logger.Warn($"管理员删除了表单{formid},参赛选手:{string.Join(',', form.role.Select(a => a.role_name))}");
|
||||||
return Ok("删除成功!");
|
return Ok("删除成功!");
|
||||||
|
@ -27,6 +27,7 @@ namespace asg_form.Controllers
|
|||||||
|
|
||||||
[Route("api/newbooking")]
|
[Route("api/newbooking")]
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
|
|
||||||
public async Task<ActionResult<string>> newbooking()
|
public async Task<ActionResult<string>> newbooking()
|
||||||
{
|
{
|
||||||
string username = this.User.FindFirst(ClaimTypes.Name)!.Value;
|
string username = this.User.FindFirst(ClaimTypes.Name)!.Value;
|
||||||
|
@ -1,15 +1,9 @@
|
|||||||
|
using asg_form.Controllers.Team;
|
||||||
using asg_form;
|
|
||||||
using Masuit.Tools.Files;
|
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Cors.Infrastructure;
|
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.AspNetCore.Rewrite;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Mirai.Net.Data.Shared;
|
|
||||||
using OfficeOpenXml;
|
using OfficeOpenXml;
|
||||||
using OfficeOpenXml.Packaging.Ionic.Zlib;
|
|
||||||
using OfficeOpenXml.Style;
|
using OfficeOpenXml.Style;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.IO.Compression;
|
using System.IO.Compression;
|
||||||
@ -41,7 +35,7 @@ namespace asg_form.Controllers
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static void ExportToExcel_noadmin(List<form> data, string fileName)
|
public static void ExportToExcel_noadmin(List<T_Team> data, string fileName)
|
||||||
{
|
{
|
||||||
using (var package = new ExcelPackage())
|
using (var package = new ExcelPackage())
|
||||||
{
|
{
|
||||||
@ -62,7 +56,7 @@ namespace asg_form.Controllers
|
|||||||
worksheet.Cells[1, a].Style.Fill.BackgroundColor.SetColor(Color.RoyalBlue);
|
worksheet.Cells[1, a].Style.Fill.BackgroundColor.SetColor(Color.RoyalBlue);
|
||||||
a++;
|
a++;
|
||||||
}
|
}
|
||||||
var pic = worksheet.Drawings.AddPicture(form.team_name, $@"{AppDomain.CurrentDomain.BaseDirectory}loge\{form.events.name}\{form.team_name}.png");
|
var pic = worksheet.Drawings.AddPicture(form.team_name, $@"{AppDomain.CurrentDomain.BaseDirectory}loge\{form.team_name}.png");
|
||||||
pic.SetSize(50, 50);
|
pic.SetSize(50, 50);
|
||||||
pic.SetPosition(26, 0);
|
pic.SetPosition(26, 0);
|
||||||
worksheet.Cells[2, 2].Value = form.Id;
|
worksheet.Cells[2, 2].Value = form.Id;
|
||||||
@ -113,7 +107,7 @@ namespace asg_form.Controllers
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static void ExportToExcel(List<form> data, string fileName)
|
public static void ExportToExcel(List<T_Team> data, string fileName)
|
||||||
{
|
{
|
||||||
using (var package = new ExcelPackage())
|
using (var package = new ExcelPackage())
|
||||||
{
|
{
|
||||||
@ -137,7 +131,7 @@ namespace asg_form.Controllers
|
|||||||
worksheet.Cells[1, a].Style.Fill.BackgroundColor.SetColor(Color.RoyalBlue);
|
worksheet.Cells[1, a].Style.Fill.BackgroundColor.SetColor(Color.RoyalBlue);
|
||||||
a++;
|
a++;
|
||||||
}
|
}
|
||||||
var pic= worksheet.Drawings.AddPicture(form.team_name, $@"{AppDomain.CurrentDomain.BaseDirectory}loge\{form.events.name}\{form.team_name}.png");
|
var pic = worksheet.Drawings.AddPicture(form.team_name, $@"{AppDomain.CurrentDomain.BaseDirectory}loge\{form.team_name}.png");
|
||||||
pic.SetSize(50, 50);
|
pic.SetSize(50, 50);
|
||||||
pic.SetPosition(26, 0);
|
pic.SetPosition(26, 0);
|
||||||
worksheet.Cells[2, 2].Value = form.Id;
|
worksheet.Cells[2, 2].Value = form.Id;
|
||||||
@ -354,10 +348,7 @@ using(TestDbContext ctx =new TestDbContext())
|
|||||||
{
|
{
|
||||||
string guid = Guid.NewGuid().ToString();
|
string guid = Guid.NewGuid().ToString();
|
||||||
TestDbContext testDb = new TestDbContext();
|
TestDbContext testDb = new TestDbContext();
|
||||||
List<form> result = testDb.Forms
|
List<T_Team> result = testDb.Teams.ToList();
|
||||||
.Include(a => a.role)
|
|
||||||
.Include(a => a.events)
|
|
||||||
.Where(e => e.events.name == event_name).ToList();
|
|
||||||
if (this.User.FindAll(ClaimTypes.Role).Any(a => a.Value == "nbadmin"))
|
if (this.User.FindAll(ClaimTypes.Role).Any(a => a.Value == "nbadmin"))
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -367,57 +367,6 @@ namespace asg_form.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获得所有表单信息
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="page">页数</param>
|
|
||||||
/// <param name="page_long">每页长度</param>
|
|
||||||
/// <returns></returns>
|
|
||||||
|
|
||||||
[Route("api/v1/form/all")]
|
|
||||||
[HttpGet]
|
|
||||||
[Authorize]
|
|
||||||
public List<team> Getform(short page,short page_long,string sort,string eventsname)
|
|
||||||
{
|
|
||||||
TestDbContext ctx = new TestDbContext();
|
|
||||||
|
|
||||||
|
|
||||||
int c = ctx.Forms.Count();
|
|
||||||
int b = page_long * page;
|
|
||||||
if (page_long * page > c)
|
|
||||||
{
|
|
||||||
b = c;
|
|
||||||
}
|
|
||||||
var events= ctx.events.First(ctx => ctx.name == eventsname);
|
|
||||||
List<form> forms;
|
|
||||||
if(sort=="vote")
|
|
||||||
{
|
|
||||||
forms = ctx.Forms.Include(a => a.role).Include(a=>a.events).OrderByDescending(a => a.piaoshu).Where(a=>a.events==events).Skip(page_long * page - page_long).Take(page_long).ToList();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//改为按照id倒序排序
|
|
||||||
//forms = ctx.Forms.Include(a => a.role).Skip(page_long * page - page_long).Take(page_long).ToList();
|
|
||||||
forms = ctx.Forms.Include(a => a.role).Include(a => a.events).OrderByDescending(a => a.Id).Where(a => a.events == events).Skip(page_long * page - page_long).Take(page_long).ToList();
|
|
||||||
|
|
||||||
}
|
|
||||||
List<team> teams = new List<team>();
|
|
||||||
|
|
||||||
|
|
||||||
foreach (form for1 in forms)
|
|
||||||
{
|
|
||||||
var team = new team { id=for1.Id,name = for1.team_name, timer = for1.time, piaoshu = for1.piaoshu ,logo_uri=for1.logo_uri};
|
|
||||||
foreach (var role in for1.role)
|
|
||||||
{
|
|
||||||
team.rolename.Add(new roletwo { name = role.role_name, lin = role.role_lin });
|
|
||||||
}
|
|
||||||
teams.Add(team);
|
|
||||||
// a++;
|
|
||||||
}
|
|
||||||
return teams;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -518,7 +467,7 @@ namespace asg_form.Controllers
|
|||||||
public string team_password { get; set; }
|
public string team_password { get; set; }
|
||||||
public string team_tel { get; set; }
|
public string team_tel { get; set; }
|
||||||
public string logo_uri { get; set; }
|
public string logo_uri { get; set; }
|
||||||
public Events.T_events events { get; set; }
|
public T_events events { get; set; }
|
||||||
|
|
||||||
// public string? belong { get; set; }
|
// public string? belong { get; set; }
|
||||||
public List<role> role { get; set; } = new List<role>();
|
public List<role> role { get; set; } = new List<role>();
|
||||||
@ -545,7 +494,7 @@ namespace asg_form.Controllers
|
|||||||
public string team_password { get; set; }
|
public string team_password { get; set; }
|
||||||
public string team_tel { get; set; }
|
public string team_tel { get; set; }
|
||||||
// public string logo_base64 { get; set; }
|
// public string logo_base64 { get; set; }
|
||||||
public string events_name { get; set; }
|
public string? events_name { get; set; }
|
||||||
// public string? belong { get; set; }
|
// public string? belong { get; set; }
|
||||||
public List<role_get> role_get { get; set; }
|
public List<role_get> role_get { get; set; }
|
||||||
}
|
}
|
||||||
@ -595,17 +544,11 @@ public class
|
|||||||
{
|
{
|
||||||
public long id { get; set; }
|
public long id { get; set; }
|
||||||
public string name { get; set; }
|
public string name { get; set; }
|
||||||
public DateTime timer { get; set; }
|
public long timer { get; set; }
|
||||||
public int piaoshu { get; set; }
|
public int piaoshu { get; set; }
|
||||||
public string logo_uri { get; set; }
|
public string logo_uri { get; set; }
|
||||||
public List<roletwo> rolename { get; set; }=new List<roletwo>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class roletwo
|
|
||||||
{
|
|
||||||
public string name { get; set; }
|
|
||||||
public string lin { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
994
asg_form/Migrations/20240825035334_newteam.Designer.cs
generated
Normal file
994
asg_form/Migrations/20240825035334_newteam.Designer.cs
generated
Normal file
@ -0,0 +1,994 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
using asg_form.Controllers;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace asg_form.Migrations
|
||||||
|
{
|
||||||
|
[DbContext(typeof(IDBcontext))]
|
||||||
|
[Migration("20240825035334_newteam")]
|
||||||
|
partial class newteam
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
#pragma warning disable 612, 618
|
||||||
|
modelBuilder
|
||||||
|
.HasAnnotation("ProductVersion", "8.0.0")
|
||||||
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||||
|
|
||||||
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||||
|
|
||||||
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<long>", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("ClaimType")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("ClaimValue")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<long>("RoleId")
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("RoleId");
|
||||||
|
|
||||||
|
b.ToTable("AspNetRoleClaims", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<long>", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("ClaimType")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("ClaimValue")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<long>("UserId")
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("UserId");
|
||||||
|
|
||||||
|
b.ToTable("AspNetUserClaims", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<long>", b =>
|
||||||
|
{
|
||||||
|
b.Property<string>("LoginProvider")
|
||||||
|
.HasColumnType("nvarchar(450)");
|
||||||
|
|
||||||
|
b.Property<string>("ProviderKey")
|
||||||
|
.HasColumnType("nvarchar(450)");
|
||||||
|
|
||||||
|
b.Property<string>("ProviderDisplayName")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<long>("UserId")
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
b.HasKey("LoginProvider", "ProviderKey");
|
||||||
|
|
||||||
|
b.HasIndex("UserId");
|
||||||
|
|
||||||
|
b.ToTable("AspNetUserLogins", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<long>", b =>
|
||||||
|
{
|
||||||
|
b.Property<long>("UserId")
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
b.Property<long>("RoleId")
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
b.HasKey("UserId", "RoleId");
|
||||||
|
|
||||||
|
b.HasIndex("RoleId");
|
||||||
|
|
||||||
|
b.ToTable("AspNetUserRoles", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<long>", b =>
|
||||||
|
{
|
||||||
|
b.Property<long>("UserId")
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
b.Property<string>("LoginProvider")
|
||||||
|
.HasColumnType("nvarchar(450)");
|
||||||
|
|
||||||
|
b.Property<string>("Name")
|
||||||
|
.HasColumnType("nvarchar(450)");
|
||||||
|
|
||||||
|
b.Property<string>("Value")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("UserId", "LoginProvider", "Name");
|
||||||
|
|
||||||
|
b.ToTable("AspNetUserTokens", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("T_TeamT_events", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("EventsId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<long>("TeamsId")
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
b.HasKey("EventsId", "TeamsId");
|
||||||
|
|
||||||
|
b.HasIndex("TeamsId");
|
||||||
|
|
||||||
|
b.ToTable("T_Teams_Player", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("T_news", b =>
|
||||||
|
{
|
||||||
|
b.Property<long>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("FormName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Title")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Type")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("msg")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("time")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("F_news", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("asg_form.Controllers.Champion+T_Champion", b =>
|
||||||
|
{
|
||||||
|
b.Property<long>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
||||||
|
|
||||||
|
b.Property<int>("eventsId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<long>("formId")
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
b.Property<string>("msg")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("eventsId");
|
||||||
|
|
||||||
|
b.HasIndex("formId");
|
||||||
|
|
||||||
|
b.ToTable("F_Champion", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("asg_form.Controllers.Store.StoreDB", b =>
|
||||||
|
{
|
||||||
|
b.Property<long>("id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||||
|
|
||||||
|
b.Property<string>("Name")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<long>("Price")
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
b.Property<string>("Type")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("description")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("information")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("id");
|
||||||
|
|
||||||
|
b.ToTable("T_Store", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("asg_form.Controllers.Store.StoreinfoDB", b =>
|
||||||
|
{
|
||||||
|
b.Property<long>("id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||||
|
|
||||||
|
b.Property<long>("Storeid")
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
b.Property<long>("buyerid")
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
b.Property<bool>("isVerification")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.HasKey("id");
|
||||||
|
|
||||||
|
b.HasIndex("Storeid");
|
||||||
|
|
||||||
|
b.ToTable("T_Storeinfo", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("asg_form.Controllers.T_Friend", b =>
|
||||||
|
{
|
||||||
|
b.Property<long>("id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||||
|
|
||||||
|
b.Property<string>("account")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("comMsg")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("comTime")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("comType")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("degree")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("headName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("headTel")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("orgName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("id");
|
||||||
|
|
||||||
|
b.ToTable("F_Friend", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("asg_form.Controllers.T_config", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("Substance")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Title")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("msg")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("T_Config", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("asg_form.Controllers.T_events", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("events_rule_uri")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<bool?>("is_over")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("name")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("opentime")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("promChart")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("F_events", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("asg_form.Controllers.Team.T_Player", b =>
|
||||||
|
{
|
||||||
|
b.Property<long>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("Common_Roles")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Game_Name")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int?>("Historical_Ranks")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("Id_Card")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Id_Card_Name")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Phone_Number")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<long>("TeamId")
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
b.Property<string>("role_id")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("role_lin")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("role_name")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("TeamId");
|
||||||
|
|
||||||
|
b.ToTable("F_Player", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("asg_form.Controllers.Team.T_Team", b =>
|
||||||
|
{
|
||||||
|
b.Property<long>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
||||||
|
|
||||||
|
b.Property<bool>("is_check")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("logo_uri")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("piaoshu")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("team_name")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("team_password")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("team_tel")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<long>("time")
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("F_Team", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("asg_form.Controllers.comform+com_form", b =>
|
||||||
|
{
|
||||||
|
b.Property<long>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("Com_Cocial_media")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Com_Email")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Com_qq")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("Status")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<int>("UserId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("idv_id")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("introduction")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("F_ComForm", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("asg_form.Controllers.form", b =>
|
||||||
|
{
|
||||||
|
b.Property<long>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
||||||
|
|
||||||
|
b.Property<int>("eventsId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("logo_uri")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("piaoshu")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("team_name")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("team_password")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("team_tel")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("time")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("eventsId");
|
||||||
|
|
||||||
|
b.ToTable("F_form", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("asg_form.Controllers.role", b =>
|
||||||
|
{
|
||||||
|
b.Property<long>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("Common_Roles")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Game_Name")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int?>("Historical_Ranks")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("Id_Card")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Id_Card_Name")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Phone_Number")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<long>("formId")
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
b.Property<string>("role_id")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("role_lin")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("role_name")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("formId");
|
||||||
|
|
||||||
|
b.ToTable("F_role", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("asg_form.Controllers.schedule+schedule_log", b =>
|
||||||
|
{
|
||||||
|
b.Property<long>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("chickteam")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<long>("teamid")
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
b.Property<string>("userid")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<bool?>("win")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("teamid");
|
||||||
|
|
||||||
|
b.ToTable("F_achlog", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("asg_form.Controllers.schedule+team_game", b =>
|
||||||
|
{
|
||||||
|
b.Property<long>("id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||||
|
|
||||||
|
b.Property<string>("belong")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("bilibiliuri")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("commentary")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("opentime")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("referee")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("tag")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("team1_name")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("team1_piaoshu")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("team2_name")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("team2_piaoshu")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("winteam")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("id");
|
||||||
|
|
||||||
|
b.ToTable("F_game", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("asg_form.Role", b =>
|
||||||
|
{
|
||||||
|
b.Property<long>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("ConcurrencyStamp")
|
||||||
|
.IsConcurrencyToken()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Name")
|
||||||
|
.HasMaxLength(256)
|
||||||
|
.HasColumnType("nvarchar(256)");
|
||||||
|
|
||||||
|
b.Property<string>("NormalizedName")
|
||||||
|
.HasMaxLength(256)
|
||||||
|
.HasColumnType("nvarchar(256)");
|
||||||
|
|
||||||
|
b.Property<string>("msg")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("NormalizedName")
|
||||||
|
.IsUnique()
|
||||||
|
.HasDatabaseName("RoleNameIndex")
|
||||||
|
.HasFilter("[NormalizedName] IS NOT NULL");
|
||||||
|
|
||||||
|
b.ToTable("AspNetRoles", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("asg_form.User", b =>
|
||||||
|
{
|
||||||
|
b.Property<long>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
||||||
|
|
||||||
|
b.Property<int>("AccessFailedCount")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("ConcurrencyStamp")
|
||||||
|
.IsConcurrencyToken()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreationTime")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.HasMaxLength(256)
|
||||||
|
.HasColumnType("nvarchar(256)");
|
||||||
|
|
||||||
|
b.Property<bool>("EmailConfirmed")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<long?>("Integral")
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
b.Property<bool>("LockoutEnabled")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<DateTimeOffset?>("LockoutEnd")
|
||||||
|
.HasColumnType("datetimeoffset");
|
||||||
|
|
||||||
|
b.Property<string>("NormalizedEmail")
|
||||||
|
.HasMaxLength(256)
|
||||||
|
.HasColumnType("nvarchar(256)");
|
||||||
|
|
||||||
|
b.Property<string>("NormalizedUserName")
|
||||||
|
.HasMaxLength(256)
|
||||||
|
.HasColumnType("nvarchar(256)");
|
||||||
|
|
||||||
|
b.Property<string>("PasswordHash")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("PhoneNumber")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<bool>("PhoneNumberConfirmed")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("SecurityStamp")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<bool>("TwoFactorEnabled")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("UserBase64")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("UserName")
|
||||||
|
.HasMaxLength(256)
|
||||||
|
.HasColumnType("nvarchar(256)");
|
||||||
|
|
||||||
|
b.Property<string>("chinaname")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<long?>("haveformId")
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
b.Property<bool?>("isbooking")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<long>("myteamId")
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
b.Property<string>("officium")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("point")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("NormalizedEmail")
|
||||||
|
.HasDatabaseName("EmailIndex");
|
||||||
|
|
||||||
|
b.HasIndex("NormalizedUserName")
|
||||||
|
.IsUnique()
|
||||||
|
.HasDatabaseName("UserNameIndex")
|
||||||
|
.HasFilter("[NormalizedUserName] IS NOT NULL");
|
||||||
|
|
||||||
|
b.HasIndex("haveformId");
|
||||||
|
|
||||||
|
b.HasIndex("myteamId");
|
||||||
|
|
||||||
|
b.ToTable("AspNetUsers", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("asg_form.blog+blog_db", b =>
|
||||||
|
{
|
||||||
|
b.Property<long>("ID")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("ID"));
|
||||||
|
|
||||||
|
b.Property<string>("formuser")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("msg")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("pushtime")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("title")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("ID");
|
||||||
|
|
||||||
|
b.ToTable("F_blog", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<long>", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("asg_form.Role", null)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("RoleId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<long>", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("asg_form.User", null)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("UserId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<long>", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("asg_form.User", null)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("UserId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<long>", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("asg_form.Role", null)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("RoleId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("asg_form.User", null)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("UserId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<long>", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("asg_form.User", null)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("UserId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("T_TeamT_events", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("asg_form.Controllers.T_events", null)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("EventsId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("asg_form.Controllers.Team.T_Team", null)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("TeamsId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("asg_form.Controllers.Champion+T_Champion", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("asg_form.Controllers.T_events", "events")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("eventsId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("asg_form.Controllers.form", "form")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("formId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("events");
|
||||||
|
|
||||||
|
b.Navigation("form");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("asg_form.Controllers.Store.StoreinfoDB", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("asg_form.Controllers.Store.StoreDB", "Store")
|
||||||
|
.WithMany("buyer")
|
||||||
|
.HasForeignKey("Storeid")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("Store");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("asg_form.Controllers.Team.T_Player", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("asg_form.Controllers.Team.T_Team", "Team")
|
||||||
|
.WithMany("role")
|
||||||
|
.HasForeignKey("TeamId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("Team");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("asg_form.Controllers.form", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("asg_form.Controllers.T_events", "events")
|
||||||
|
.WithMany("forms")
|
||||||
|
.HasForeignKey("eventsId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("events");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("asg_form.Controllers.role", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("asg_form.Controllers.form", "form")
|
||||||
|
.WithMany("role")
|
||||||
|
.HasForeignKey("formId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("form");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("asg_form.Controllers.schedule+schedule_log", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("asg_form.Controllers.schedule+team_game", "team")
|
||||||
|
.WithMany("logs")
|
||||||
|
.HasForeignKey("teamid")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("team");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("asg_form.User", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("asg_form.Controllers.form", "haveform")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("haveformId");
|
||||||
|
|
||||||
|
b.HasOne("asg_form.Controllers.Team.T_Team", "myteam")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("myteamId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("haveform");
|
||||||
|
|
||||||
|
b.Navigation("myteam");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("asg_form.Controllers.Store.StoreDB", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("buyer");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("asg_form.Controllers.T_events", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("forms");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("asg_form.Controllers.Team.T_Team", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("role");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("asg_form.Controllers.form", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("role");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("asg_form.Controllers.schedule+team_game", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("logs");
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
179
asg_form/Migrations/20240825035334_newteam.cs
Normal file
179
asg_form/Migrations/20240825035334_newteam.cs
Normal file
@ -0,0 +1,179 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace asg_form.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class newteam : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "Type",
|
||||||
|
table: "F_news",
|
||||||
|
type: "nvarchar(max)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: "");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "promChart",
|
||||||
|
table: "F_events",
|
||||||
|
type: "nvarchar(max)",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<long>(
|
||||||
|
name: "myteamId",
|
||||||
|
table: "AspNetUsers",
|
||||||
|
type: "bigint",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0L);
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "F_Team",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<long>(type: "bigint", nullable: false)
|
||||||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||||||
|
is_check = table.Column<bool>(type: "bit", nullable: false),
|
||||||
|
piaoshu = table.Column<int>(type: "int", nullable: false),
|
||||||
|
time = table.Column<long>(type: "bigint", nullable: false),
|
||||||
|
team_name = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
team_password = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
team_tel = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
logo_uri = table.Column<string>(type: "nvarchar(max)", nullable: false)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_F_Team", x => x.Id);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "T_Config",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<int>(type: "int", nullable: false)
|
||||||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||||||
|
Title = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
Substance = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
msg = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_T_Config", x => x.Id);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "F_Player",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<long>(type: "bigint", nullable: false)
|
||||||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||||||
|
TeamId = table.Column<long>(type: "bigint", nullable: false),
|
||||||
|
role_id = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
role_name = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
Game_Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
role_lin = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
Id_Card = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
Common_Roles = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
Phone_Number = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
Id_Card_Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
Historical_Ranks = table.Column<int>(type: "int", nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_F_Player", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_F_Player_F_Team_TeamId",
|
||||||
|
column: x => x.TeamId,
|
||||||
|
principalTable: "F_Team",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "T_Teams_Player",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
EventsId = table.Column<int>(type: "int", nullable: false),
|
||||||
|
TeamsId = table.Column<long>(type: "bigint", nullable: false)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_T_Teams_Player", x => new { x.EventsId, x.TeamsId });
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_T_Teams_Player_F_Team_TeamsId",
|
||||||
|
column: x => x.TeamsId,
|
||||||
|
principalTable: "F_Team",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_T_Teams_Player_F_events_EventsId",
|
||||||
|
column: x => x.EventsId,
|
||||||
|
principalTable: "F_events",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_AspNetUsers_myteamId",
|
||||||
|
table: "AspNetUsers",
|
||||||
|
column: "myteamId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_F_Player_TeamId",
|
||||||
|
table: "F_Player",
|
||||||
|
column: "TeamId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_T_Teams_Player_TeamsId",
|
||||||
|
table: "T_Teams_Player",
|
||||||
|
column: "TeamsId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_AspNetUsers_F_Team_myteamId",
|
||||||
|
table: "AspNetUsers",
|
||||||
|
column: "myteamId",
|
||||||
|
principalTable: "F_Team",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_AspNetUsers_F_Team_myteamId",
|
||||||
|
table: "AspNetUsers");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "F_Player");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "T_Config");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "T_Teams_Player");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "F_Team");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_AspNetUsers_myteamId",
|
||||||
|
table: "AspNetUsers");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "Type",
|
||||||
|
table: "F_news");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "promChart",
|
||||||
|
table: "F_events");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "myteamId",
|
||||||
|
table: "AspNetUsers");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -125,6 +125,54 @@ namespace asg_form.Migrations
|
|||||||
b.ToTable("AspNetUserTokens", (string)null);
|
b.ToTable("AspNetUserTokens", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("T_TeamT_events", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("EventsId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<long>("TeamsId")
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
b.HasKey("EventsId", "TeamsId");
|
||||||
|
|
||||||
|
b.HasIndex("TeamsId");
|
||||||
|
|
||||||
|
b.ToTable("T_Teams_Player", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("T_news", b =>
|
||||||
|
{
|
||||||
|
b.Property<long>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("FormName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Title")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Type")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("msg")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("time")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("F_news", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("asg_form.Controllers.Champion+T_Champion", b =>
|
modelBuilder.Entity("asg_form.Controllers.Champion+T_Champion", b =>
|
||||||
{
|
{
|
||||||
b.Property<long>("Id")
|
b.Property<long>("Id")
|
||||||
@ -251,15 +299,15 @@ namespace asg_form.Migrations
|
|||||||
b.ToTable("F_Friend", (string)null);
|
b.ToTable("F_Friend", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("asg_form.Controllers.T_news", b =>
|
modelBuilder.Entity("asg_form.Controllers.T_config", b =>
|
||||||
{
|
{
|
||||||
b.Property<long>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("bigint");
|
.HasColumnType("int");
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<string>("FormName")
|
b.Property<string>("Substance")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
@ -268,16 +316,125 @@ namespace asg_form.Migrations
|
|||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("msg")
|
b.Property<string>("msg")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<DateTime?>("time")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("datetime2");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.ToTable("F_news", (string)null);
|
b.ToTable("T_Config", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("asg_form.Controllers.T_events", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("events_rule_uri")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<bool?>("is_over")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("name")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("opentime")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("promChart")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("F_events", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("asg_form.Controllers.Team.T_Player", b =>
|
||||||
|
{
|
||||||
|
b.Property<long>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("Common_Roles")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Game_Name")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int?>("Historical_Ranks")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("Id_Card")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Id_Card_Name")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Phone_Number")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<long>("TeamId")
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
b.Property<string>("role_id")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("role_lin")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("role_name")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("TeamId");
|
||||||
|
|
||||||
|
b.ToTable("F_Player", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("asg_form.Controllers.Team.T_Team", b =>
|
||||||
|
{
|
||||||
|
b.Property<long>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
||||||
|
|
||||||
|
b.Property<bool>("is_check")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("logo_uri")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("piaoshu")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("team_name")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("team_password")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("team_tel")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<long>("time")
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("F_Team", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("asg_form.Controllers.comform+com_form", b =>
|
modelBuilder.Entity("asg_form.Controllers.comform+com_form", b =>
|
||||||
@ -486,31 +643,6 @@ namespace asg_form.Migrations
|
|||||||
b.ToTable("F_game", (string)null);
|
b.ToTable("F_game", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("asg_form.Model.T_events", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("events_rule_uri")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<bool?>("is_over")
|
|
||||||
.HasColumnType("bit");
|
|
||||||
|
|
||||||
b.Property<string>("name")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("opentime")
|
|
||||||
.HasColumnType("datetime2");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("F_events", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("asg_form.Role", b =>
|
modelBuilder.Entity("asg_form.Role", b =>
|
||||||
{
|
{
|
||||||
b.Property<long>("Id")
|
b.Property<long>("Id")
|
||||||
@ -618,6 +750,9 @@ namespace asg_form.Migrations
|
|||||||
b.Property<bool?>("isbooking")
|
b.Property<bool?>("isbooking")
|
||||||
.HasColumnType("bit");
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<long>("myteamId")
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<string>("officium")
|
b.Property<string>("officium")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
@ -636,6 +771,8 @@ namespace asg_form.Migrations
|
|||||||
|
|
||||||
b.HasIndex("haveformId");
|
b.HasIndex("haveformId");
|
||||||
|
|
||||||
|
b.HasIndex("myteamId");
|
||||||
|
|
||||||
b.ToTable("AspNetUsers", (string)null);
|
b.ToTable("AspNetUsers", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -718,9 +855,24 @@ namespace asg_form.Migrations
|
|||||||
.IsRequired();
|
.IsRequired();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("T_TeamT_events", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("asg_form.Controllers.T_events", null)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("EventsId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("asg_form.Controllers.Team.T_Team", null)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("TeamsId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("asg_form.Controllers.Champion+T_Champion", b =>
|
modelBuilder.Entity("asg_form.Controllers.Champion+T_Champion", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("asg_form.Model.T_events", "events")
|
b.HasOne("asg_form.Controllers.T_events", "events")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("eventsId")
|
.HasForeignKey("eventsId")
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
@ -748,9 +900,20 @@ namespace asg_form.Migrations
|
|||||||
b.Navigation("Store");
|
b.Navigation("Store");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("asg_form.Controllers.Team.T_Player", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("asg_form.Controllers.Team.T_Team", "Team")
|
||||||
|
.WithMany("role")
|
||||||
|
.HasForeignKey("TeamId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("Team");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("asg_form.Controllers.form", b =>
|
modelBuilder.Entity("asg_form.Controllers.form", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("asg_form.Model.T_events", "events")
|
b.HasOne("asg_form.Controllers.T_events", "events")
|
||||||
.WithMany("forms")
|
.WithMany("forms")
|
||||||
.HasForeignKey("eventsId")
|
.HasForeignKey("eventsId")
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
@ -787,7 +950,15 @@ namespace asg_form.Migrations
|
|||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("haveformId");
|
.HasForeignKey("haveformId");
|
||||||
|
|
||||||
|
b.HasOne("asg_form.Controllers.Team.T_Team", "myteam")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("myteamId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
b.Navigation("haveform");
|
b.Navigation("haveform");
|
||||||
|
|
||||||
|
b.Navigation("myteam");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("asg_form.Controllers.Store.StoreDB", b =>
|
modelBuilder.Entity("asg_form.Controllers.Store.StoreDB", b =>
|
||||||
@ -795,6 +966,16 @@ namespace asg_form.Migrations
|
|||||||
b.Navigation("buyer");
|
b.Navigation("buyer");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("asg_form.Controllers.T_events", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("forms");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("asg_form.Controllers.Team.T_Team", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("role");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("asg_form.Controllers.form", b =>
|
modelBuilder.Entity("asg_form.Controllers.form", b =>
|
||||||
{
|
{
|
||||||
b.Navigation("role");
|
b.Navigation("role");
|
||||||
@ -804,11 +985,6 @@ namespace asg_form.Migrations
|
|||||||
{
|
{
|
||||||
b.Navigation("logs");
|
b.Navigation("logs");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("asg_form.Model.T_events", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("forms");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
#pragma warning restore 612, 618
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using asg_form.Controllers;
|
using asg_form.Controllers;
|
||||||
|
using asg_form.Controllers.Team;
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
|
|
||||||
namespace asg_form
|
namespace asg_form
|
||||||
@ -14,6 +15,7 @@ namespace asg_form
|
|||||||
public DateTime CreationTime { get; set; }
|
public DateTime CreationTime { get; set; }
|
||||||
|
|
||||||
public form? haveform { get; set; }
|
public form? haveform { get; set; }
|
||||||
|
public T_Team myteam { get; set; }
|
||||||
|
|
||||||
public bool? isbooking { get; set; }
|
public bool? isbooking { get; set; }
|
||||||
public string? chinaname { get; set; }
|
public string? chinaname { get; set; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user