-
Notifications
You must be signed in to change notification settings - Fork 0
/
Subject.cs
62 lines (57 loc) · 2.06 KB
/
Subject.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
using System.Text;
using System.Runtime.Serialization;
namespace PhpToXml
{
[DataContract(Namespace ="http://schemas.datacontract.org/2004/07/Suggest")]
public class Subject
{
/// <summary>
/// ファイル番号
/// </summary>
[DataMember] public int id { get; set; }
/// <summary>
/// 科目名前
/// </summary>
[DataMember] public string name { get; set; } = "";
/// <summary>
/// 時間割番号
/// </summary>
[DataMember] public int timeTableId { get; set; }
/// <summary>
/// 担当教員
/// </summary>
[DataMember] public string teacher { get; set; } = "";
/// <summary>
/// 対象学科
/// </summary>
[DataMember] public string[] department { get; set; } = new string[0];
/// <summary>
/// 学年
/// </summary>
[DataMember] public int grade { get; set; }
/// <summary>
/// 科目区分
/// </summary>
[DataMember] public int creditsNumber { get; set; }
[DataMember] public int half { get; set; }
[DataMember] public int day { get; set; }
[DataMember] public int startTime { get; set; }
[DataMember] public int endTime { get; set; }
public override string ToString()
{
return this.name;
}
public string ToStringLog()
{
StringBuilder log = new StringBuilder();
log.Append("name:").Append(this.name).Append("\n");
log.Append("teacher:").Append(this.teacher).Append("\n");
log.Append("creditsNum:").Append(this.creditsNumber).Append("\n");
log.Append("timeTableId:").Append(this.timeTableId).Append("\n");
log.Append("id:").Append(this.id).Append("\n");
log.Append("department:[").Append(string.Join(", ", this.department)).Append("]\n");
log.Append($"timeTable:{this.half},{this.day},{this.startTime}-{this.endTime}\n");
return log.ToString();
}
}
}