aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Core/Search/Domain/SearchResponse.cs
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-05-23 12:26:31 -0500
committerJP Dillingham <jpdillingham@gmail.com>2021-05-23 12:44:22 -0500
commit2ed141e2f55207cce5ab80acc8477402fd5aae94 (patch)
tree10bc10b983c637656cb628c242abba4cef3c9307 /src/slskd/Core/Search/Domain/SearchResponse.cs
parentc72d7088ce6d39193ae1a80f2808e34d07e6078f (diff)
downloadslskd-2ed141e2f55207cce5ab80acc8477402fd5aae94.tar.gz
add DbContext and domain for search
Diffstat (limited to 'src/slskd/Core/Search/Domain/SearchResponse.cs')
-rw-r--r--src/slskd/Core/Search/Domain/SearchResponse.cs33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/slskd/Core/Search/Domain/SearchResponse.cs b/src/slskd/Core/Search/Domain/SearchResponse.cs
new file mode 100644
index 00000000..b9bafc7b
--- /dev/null
+++ b/src/slskd/Core/Search/Domain/SearchResponse.cs
@@ -0,0 +1,33 @@
+// <copyright file="SearchResponse.cs" company="slskd Team">
+// Copyright (c) slskd Team. All rights reserved.
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published
+// by the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see https://www.gnu.org/licenses/.
+// </copyright>
+
+namespace slskd.Search
+{
+ using System;
+ using System.Text.Json;
+
+ /// <summary>
+ /// A response to a file search.
+ /// </summary>
+ public class SearchResponseRecord
+ {
+ public Guid SearchId { get; init; }
+
+ public string ResponseJson { get; set; }
+ public Soulseek.SearchResponse Response => new Lazy<Soulseek.SearchResponse>(() => JsonSerializer.Deserialize<Soulseek.SearchResponse>(ResponseJson)).Value;
+ }
+} \ No newline at end of file