267 lines
8.7 KiB
C#
267 lines
8.7 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
using _2021_backend.Data;
|
|
|
|
#nullable disable
|
|
|
|
namespace _2021_backend.Migrations
|
|
{
|
|
[DbContext(typeof(BackendContext))]
|
|
[Migration("20220222090619_initial")]
|
|
partial class initial
|
|
{
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "6.0.2")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("_2021_backend.Models.Comment", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<DateTime>("AddTime")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("Content")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("Operator")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int>("Student")
|
|
.HasColumnType("integer");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Comments");
|
|
});
|
|
|
|
modelBuilder.Entity("_2021_backend.Models.Session", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<DateTime>("BeginTime")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<int>("Capacity")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<List<int>>("Chiefs")
|
|
.HasColumnType("integer[]");
|
|
|
|
b.Property<DateTime>("Day")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("Place")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool>("SendSMS")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<List<int>>("Students")
|
|
.HasColumnType("integer[]");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Sessions");
|
|
});
|
|
|
|
modelBuilder.Entity("_2021_backend.Models.SMS", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<List<string>>("Data")
|
|
.HasColumnType("text[]");
|
|
|
|
b.Property<int>("Host")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<DateTime>("SendTime")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("Sender")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Tel")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("Type")
|
|
.HasColumnType("integer");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("SMS");
|
|
});
|
|
|
|
modelBuilder.Entity("_2021_backend.Models.Student", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<List<int>>("Comments")
|
|
.HasColumnType("integer[]");
|
|
|
|
b.Property<string>("Email")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("Exp")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int>("Grade")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int>("InterviewTime")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<DateTime>("LastSubmission")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("Major")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<List<int>>("Messages")
|
|
.HasColumnType("integer[]");
|
|
|
|
b.Property<string>("Name")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("RegisterTime")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<int>("Score")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int>("Sex")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int>("Status")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("Stuid")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<List<int>>("Submissions")
|
|
.HasColumnType("integer[]");
|
|
|
|
b.Property<string>("Tel")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<List<int>>("Timelist")
|
|
.HasColumnType("integer[]");
|
|
|
|
b.Property<int>("Yard")
|
|
.HasColumnType("integer");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Students");
|
|
});
|
|
|
|
modelBuilder.Entity("_2021_backend.Models.Submission", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Address")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Email")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("Exp")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int>("Grade")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int>("Host")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("Major")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Name")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("Sex")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("Stuid")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("SubmitTime")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("Tel")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<List<int>>("Timelist")
|
|
.HasColumnType("integer[]");
|
|
|
|
b.Property<int>("Yard")
|
|
.HasColumnType("integer");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Submissions");
|
|
});
|
|
|
|
modelBuilder.Entity("_2021_backend.Models.User", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Name")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Secret")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool>("isManager")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<string>("stuID")
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Users");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|