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

(开头部分) 5KB

这里只显示每个文件的开头 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 TbExam : IEntity, IEntityTypeBuilder<TbExam>
    {
        public TbExam()
        {
            Stuanswerdetails = new HashSet<TbStuanswerdetail>();
            Stuscores = new HashSet<TbStuscore>();
            Examquestions = new HashSet<TbExamquestion>();
        }

        public int Id { get; set; }
        public string ExamName { get; set; }
        public int CourseId { get; set; }
        public int TeacherId { get; set; }
        public DateTime StartTime { get; set; }
        public DateTime EndTime { get; set; }
        public int Duration { get; set; }
        public string IsEnable { get; set; }
        public string IsFinish { get; set; }
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public DateTimeOffset CreateTime { get; set; }
        public int ExamScore { get; set; }
        public int JudgeScore { get; set; }
        public int SingleScore { get; set; }
        public int SelectScore { get; set; }

        public TbCourse Course { get; set; }
        public TbTeacher Teacher { get; set; }
        public ICollection<TbStuanswerdetail> Stuanswerdetails { get; set; }
        public ICollection<TbStuscore> Stuscores { get; set; }
        public ICollection<TbExamquestion> Examquestions { get; set; }
        public ICollection<TbExamjobs> Examjobses { get; set; }

        /// <summary>
        /// 多对多
        /// </summary>
        public ICollection<TbClass> Classes { get; set; }

        /// <summary>
        /// 多对多中间表
        /// </summary>
        public ICollection<TbExamclass> Examclasses { get; set; }

        public void Configure(EntityTypeBuilder<TbExam> entityBuilder, DbContext dbContext, Type dbContextLocator)
        {
            entityBuilder.ToTable("tb_exam");

            entityBuilder.HasComment("试卷表");

            entityBuilder.HasIndex(e => e.CourseId, "exam_course_id");
后面还有 103 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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