Files
TechHelper/Entities/Contracts/School.cs
SpecialX ac900159ba
Some checks failed
TechAct / explore-gitea-actions (push) Failing after 12s
重构项目结构,移除Assignment相关功能,优化Submission模块
2025-10-09 18:57:28 +08:00

37 lines
868 B
C#

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Entities.Contracts
{
[Table("schools")]
public class School
{
[Key]
[Column("id")]
public Guid Id { get; set; }
[Column("school_name")]
[MaxLength(50)]
public string SchoolName { get; set; }
[Column("address")]
[MaxLength(100)]
public string Address { get; set; }
[Column("create_time")]
public DateTime CreateTime { get; set; }
[InverseProperty(nameof(Grade.School))]
public virtual ICollection<Grade> Grades { get; set; }
public School()
{
Id = Guid.NewGuid();
Grades = new HashSet<Grade>();
CreateTime = DateTime.Now;
}
}
}