Initial commit
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Model.Work.Git;
|
||||
|
||||
public class ChangeModel {
|
||||
public static int id;
|
||||
|
||||
public static List<ChangeModel> exampleData = new() { new ChangeModel() };
|
||||
|
||||
public ChangeModel() {
|
||||
Id = id++;
|
||||
}
|
||||
|
||||
public int Id { get; set; } = 1;
|
||||
public int PatchModelId { get; set; } = 1;
|
||||
public string Name { get; set; } = "Add name...";
|
||||
public string Description { get; set; } = "Add desciption...";
|
||||
public string Commit { get; set; } = CommitType.Feature;
|
||||
public DateTime Date { get; set; } = DateTime.Now;
|
||||
public string Important { get; set; } = "False";
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
namespace Model.Work.Git;
|
||||
|
||||
public class CommitType {
|
||||
public const string Feature = "Feature";
|
||||
public const string Game_Patch = "Game Patch";
|
||||
public const string Fix = "Fix";
|
||||
public const string Documents = "Documents";
|
||||
public const string Style = "Style";
|
||||
public const string Refactor = "Refactor";
|
||||
public const string Perf = "Perf";
|
||||
public const string Test = "Test";
|
||||
public const string Build = "Build";
|
||||
public const string CI = "CI";
|
||||
public const string Chore = "Chore";
|
||||
public const string Typo = "Typo";
|
||||
public const string Revert = "Revert";
|
||||
public const string Planning = "Planning";
|
||||
public const string PrivacyPolicy = "Privacy Policy";
|
||||
public const string None = "None";
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Model.Work.Git;
|
||||
|
||||
public class PatchModel {
|
||||
public static int id;
|
||||
|
||||
public static List<PatchModel> exampleData = new() { new PatchModel { ChangeModels = ChangeModel.exampleData } };
|
||||
|
||||
public PatchModel() {
|
||||
Id = id++;
|
||||
}
|
||||
|
||||
public int Id { get; set; } = 1;
|
||||
public string Name { get; set; } = "Add name...";
|
||||
public DateTime Date { get; set; } = DateTime.Now;
|
||||
public virtual ICollection<ChangeModel> ChangeModels { get; set; } = new List<ChangeModel>();
|
||||
|
||||
public string Important { get; set; } = "False";
|
||||
|
||||
public PatchModel AddChange(ChangeModel changeModel) {
|
||||
if (ChangeModels == null) ChangeModels = new List<ChangeModel>();
|
||||
|
||||
changeModel.PatchModelId = Id;
|
||||
ChangeModels.Add(changeModel);
|
||||
return this;
|
||||
}
|
||||
|
||||
public PatchModel ConnectChildren() {
|
||||
foreach (var change in ChangeModels) change.PatchModelId = Id;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user