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

(开头部分) 2KB

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

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

#nullable disable

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

        public int Id { get; set; }
        public string QuestionType { get; set; }
        public int ExamId { get; set; }
        public int QuestionId { get; set; }
        public int Score { get; set; }
        
        public TbExam Exam { get; set; }
        
        public ICollection<TbStuanswerdetail> Stuanswerdetails { get; set; }

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

            entityBuilder.HasComment("试卷题目关联表");

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

            entityBuilder.Property(e => e.Id)
                .HasColumnName("id")
                .HasComment("ID");
            
            entityBuilder.Property(e => e.QuestionType)
                .IsRequired()
                .HasColumnName("questionType")
                .HasComment("题型")
                .HasColumnType("varchar(30)")
                .HasCharSet("utf8")
                .HasCollation("utf8_general_ci");
            
            entityBuilder.Property(e => e.ExamId)
                .HasColumnName("examId")
                .HasComment("试卷ID");
            
            entityBuilder.Property(e => e.QuestionId)
                .HasColumnName("questionId")
                .HasComment("题目ID");
            
            entityBuilder.Property(e => e.Score)
                .HasColumnName("score")
                .HasComment("分数");
后面还有 10 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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