backend/ExamKing.Core/Entities/Exam/TbStudent.cs

(开头部分) 4KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

#nullable disable

namespace ExamKing.Core.Entites
{
    public partial class TbStudent : IEntity, IEntityTypeBuilder<TbStudent>
    {
        public TbStudent()
        {
            Stuanswerdetails = new HashSet<TbStuanswerdetail>();
            Stuscores = new HashSet<TbStuscore>();
        }

        public int Id { get; set; }
        public string StuName { get; set; }
        public int DeptId { get; set; }
        public int ClassesId { get; set; }
        public string Sex { get; set; }
        public string StuNo { get; set; }
        public string Password { get; set; }
        public string Telphone { get; set; }
        public string IdCard { get; set; }
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public DateTimeOffset CreateTime { get; set; }

        public TbClass Classes { get; set; }
        public TbDept Dept { get; set; }
        public ICollection<TbStuanswerdetail> Stuanswerdetails { get; set; }
        public ICollection<TbStuscore> Stuscores { get; set; }

        public void Configure(EntityTypeBuilder<TbStudent> entityBuilder, DbContext dbContext, Type dbContextLocator)
        {

            {
                entityBuilder.ToTable("tb_student");

                entityBuilder.HasComment("学生表");

                entityBuilder.HasIndex(e => e.ClassesId, "student_classes_id");

                entityBuilder.HasIndex(e => e.DeptId, "student_dept_id");

                entityBuilder.HasIndex(e => e.Id, "student_id")
                    .IsUnique();

                entityBuilder.Property(e => e.Id)
                    .HasColumnName("id")
                    .HasComment("ID");

                entityBuilder.Property(e => e.ClassesId)
                    .HasColumnName("classesId")
                    .HasComment("班级ID");

                entityBuilder.Property(e => e.CreateTime)
后面还有 70 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。