-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #611 from netresj/feature_enhance_search_train_his…
…tory 検索機能向けapiの追加
- Loading branch information
Showing
26 changed files
with
3,583 additions
and
2,824 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
120 changes: 120 additions & 0 deletions
120
web-api/platypus/platypus/ApiModels/TrainingApiModels/SearchDetailInputModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
namespace Nssol.Platypus.ApiModels.TrainingApiModels | ||
{ | ||
/// <summary> | ||
/// 詳細検索の入力モデル。 | ||
/// </summary> | ||
public class SearchDetailInputModel | ||
{ | ||
/// <summary> | ||
/// IDの検索条件。 | ||
/// この数値以上のIDが検索される。 | ||
/// </summary> | ||
public long? IdLower { get; set; } | ||
|
||
/// <summary> | ||
/// IDの検索条件。 | ||
/// この数値以下のIDが検索される。 | ||
/// </summary> | ||
public long? IdUpper { get; set; } | ||
|
||
/// <summary> | ||
/// 名前 | ||
/// 複数のワードが含まれる場合は","区切り | ||
/// </summary> | ||
public string Name { get; set; } | ||
|
||
/// <summary> | ||
/// 名前がor検索かand検索か | ||
/// </summary> | ||
public bool? NameOr { get; set; } | ||
|
||
/// <summary> | ||
/// 親学習名 | ||
/// 複数のワードが含まれる場合は","区切り | ||
/// </summary> | ||
public string ParentName { get; set; } | ||
|
||
/// <summary> | ||
/// 親学習名がor検索かand検索か | ||
/// </summary> | ||
public bool? ParentNameOr { get; set; } | ||
|
||
/// <summary> | ||
/// 実行時刻の検索の期間の開始の条件。日付の形式。 | ||
/// "2018/01/01" → 2018/01/01 00:00:00 以降が検索される。 | ||
/// </summary> | ||
public string StartedAtLower { get; set; } | ||
|
||
/// <summary> | ||
/// 実行時刻の検索の期間の終了の条件。日付の形式。 | ||
/// "2018/01/01" → 2018/01/01 23:59:59 以前が検索される。 | ||
/// </summary> | ||
public string StartedAtUpper { get; set; } | ||
|
||
/// <summary> | ||
/// 実行者 | ||
/// 複数のワードが含まれる場合は","区切り | ||
/// </summary> | ||
public string StartedBy { get; set; } | ||
|
||
/// <summary> | ||
/// 実行者の検索がor検索かand検索か | ||
/// </summary> | ||
public bool? StartedByOr { get; set; } | ||
|
||
/// <summary> | ||
/// データセット名 | ||
/// 複数のワードが含まれる場合は","区切り | ||
/// </summary> | ||
public string DataSet { get; set; } | ||
|
||
/// <summary> | ||
/// データセット名がor検索かand検索か | ||
/// </summary> | ||
public bool? DataSetOr { get; set; } | ||
|
||
/// <summary> | ||
/// メモ | ||
/// 複数のワードが含まれる場合は","区切り | ||
/// </summary> | ||
public string Memo { get; set; } | ||
|
||
/// <summary> | ||
/// メモがor検索かand検索か | ||
/// </summary> | ||
public bool? MemoOr { get; set; } | ||
|
||
/// <summary> | ||
/// ステータス | ||
/// 複数のワードが含まれる場合は","区切り | ||
/// </summary> | ||
public string Status { get; set; } | ||
|
||
/// <summary> | ||
/// ステータスがor検索かand検索か | ||
/// </summary> | ||
public bool? StatusOr { get; set; } | ||
|
||
/// <summary> | ||
/// 実行コマンド | ||
/// 複数のワードが含まれる場合は","区切り | ||
/// </summary> | ||
public string EntryPoint { get; set; } | ||
|
||
/// <summary> | ||
/// 実行コマンドがor検索かand検索か | ||
/// </summary> | ||
public bool? EntryPointOr { get; set; } | ||
|
||
/// <summary> | ||
/// タグ | ||
/// 複数のワードが含まれる場合は","区切り | ||
/// </summary> | ||
public string Tags { get; set; } | ||
|
||
/// <summary> | ||
/// タグがor検索かand検索か | ||
/// </summary> | ||
public bool? TagsOr { get; set; } | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
web-api/platypus/platypus/ApiModels/TrainingApiModels/SearchHistoryInputModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System.ComponentModel.DataAnnotations; | ||
|
||
namespace Nssol.Platypus.ApiModels.TrainingApiModels | ||
{ | ||
/// <summary> | ||
/// 検索履歴入力モデル | ||
/// </summary> | ||
public class SearchHistoryInputModel | ||
{ | ||
/// <summary> | ||
/// 検索履歴の名前 | ||
/// </summary> | ||
[Required] | ||
[MinLength(4)] | ||
public string Name { set; get; } | ||
|
||
/// <summary> | ||
/// 詳細検索入力モデル | ||
/// </summary> | ||
public SearchDetailInputModel SearchDetailInputModel { set; get; } | ||
} | ||
} |
111 changes: 111 additions & 0 deletions
111
web-api/platypus/platypus/ApiModels/TrainingApiModels/SearchHistoryOutputModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
using Nssol.Platypus.Models.TenantModels; | ||
|
||
namespace Nssol.Platypus.ApiModels.TrainingApiModels | ||
{ | ||
/// <summary> | ||
/// 検索履歴出力モデル | ||
/// </summary> | ||
public class SearchHistoryOutputModel : Components.OutputModelBase | ||
{ | ||
/// <summary> | ||
/// コンストラクタ | ||
/// </summary> | ||
public SearchHistoryOutputModel(TrainingSearchHistories history) : base(history) | ||
{ | ||
Name = history.Name; | ||
Id = history.Id; | ||
SearchDetail = new SearchDetailInputModel(); | ||
SearchDetail.IdUpper = history.IdUpper; | ||
SearchDetail.IdLower = history.IdLower; | ||
SearchDetail.StartedAtLower = history.StartedAtLower; | ||
SearchDetail.StartedAtUpper = history.StartedAtUpper; | ||
if (string.IsNullOrEmpty(history.TrainingName) == false) | ||
{ | ||
SearchDetail.Name = history.TrainingName; | ||
SearchDetail.NameOr = history.TrainingNameOr; | ||
} | ||
else | ||
{ | ||
SearchDetail.NameOr = true; | ||
} | ||
if (string.IsNullOrEmpty(history.ParentName) == false) | ||
{ | ||
SearchDetail.ParentName = history.ParentName; | ||
SearchDetail.ParentNameOr = history.ParentNameOr; | ||
} | ||
else | ||
{ | ||
SearchDetail.ParentNameOr = true; | ||
} | ||
if (string.IsNullOrEmpty(history.StartedBy) == false) | ||
{ | ||
SearchDetail.StartedBy = history.StartedBy; | ||
SearchDetail.StartedByOr = history.StartedByOr; | ||
} | ||
else | ||
{ | ||
SearchDetail.StartedByOr = true; | ||
} | ||
if (string.IsNullOrEmpty(history.DataSet) == false) | ||
{ | ||
SearchDetail.DataSet = history.DataSet; | ||
SearchDetail.DataSetOr = history.DataSetOr; | ||
} | ||
else | ||
{ | ||
SearchDetail.DataSetOr = true; | ||
} | ||
if (string.IsNullOrEmpty(history.EntryPoint) == false) | ||
{ | ||
SearchDetail.EntryPoint = history.EntryPoint; | ||
SearchDetail.EntryPointOr = history.EntryPointOr; | ||
} | ||
else | ||
{ | ||
SearchDetail.EntryPointOr = true; | ||
} | ||
if (string.IsNullOrEmpty(history.Memo) == false) | ||
{ | ||
SearchDetail.Memo = history.Memo; | ||
SearchDetail.MemoOr = history.MemoOr; | ||
} | ||
else | ||
{ | ||
SearchDetail.MemoOr = true; | ||
} | ||
if (string.IsNullOrEmpty(history.Tags) == false) | ||
{ | ||
SearchDetail.Tags = history.Tags; | ||
SearchDetail.TagsOr = history.TagsOr; | ||
} | ||
else | ||
{ | ||
SearchDetail.TagsOr = true; | ||
} | ||
if (string.IsNullOrEmpty(history.Status) == false) | ||
{ | ||
SearchDetail.Status = history.Status; | ||
SearchDetail.StatusOr = history.StatusOr; | ||
} | ||
else | ||
{ | ||
SearchDetail.StatusOr = true; | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// 履歴の登録名 | ||
/// </summary> | ||
public string Name { get; set; } | ||
|
||
/// <summary> | ||
/// 履歴のid | ||
/// </summary> | ||
public long Id { get; set; } | ||
|
||
/// <summary> | ||
/// 検索の内容 | ||
/// </summary> | ||
public SearchDetailInputModel SearchDetail { get; set; } | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
web-api/platypus/platypus/ApiModels/TrainingApiModels/TagsInputModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using System.Collections.Generic; | ||
using System.ComponentModel.DataAnnotations; | ||
|
||
namespace Nssol.Platypus.ApiModels.TrainingApiModels | ||
{ | ||
/// <summary> | ||
/// 付与または削除するタグ入力モデル | ||
/// </summary> | ||
public class TagsInputModel | ||
{ | ||
/// <summary> | ||
/// タグを付与、または、削除したい対象の学習履歴のId | ||
/// </summary> | ||
[Required] | ||
public IEnumerable<long> Id { get; set; } | ||
|
||
/// <summary> | ||
/// 付与、または、削除したいタグ | ||
/// </summary> | ||
[Required] | ||
public IEnumerable<string> Tags { get; set; } | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
web-api/platypus/platypus/ApiModels/TrainingApiModels/TrainingSearchFillOutputModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace Nssol.Platypus.ApiModels.TrainingApiModels | ||
{ | ||
/// <summary> | ||
/// 学習検索項目補完出力モデル | ||
/// </summary> | ||
public class TrainingSearchFillOutputModel | ||
{ | ||
/// <summary> | ||
/// 実行者名の一覧 | ||
/// </summary> | ||
public IEnumerable<string> CreatedBy { get; set; } | ||
|
||
/// <summary> | ||
/// ステータスの一覧 | ||
/// </summary> | ||
public IEnumerable<string> Status { get; set; } | ||
|
||
/// <summary> | ||
/// タグの一覧 | ||
/// </summary> | ||
public IEnumerable<string> Tags { get; set; } | ||
|
||
/// <summary> | ||
/// データセットの補完 | ||
/// </summary> | ||
public IEnumerable<string> Datasets { get; set; } | ||
} | ||
} |
Oops, something went wrong.