Init
This commit is contained in:
15
src/Band/Models/Bands/Band.cs
Normal file
15
src/Band/Models/Bands/Band.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Band.Models.Bands;
|
||||
|
||||
public record Band(
|
||||
[property: JsonPropertyName("band_key")] string BandKey,
|
||||
[property: JsonPropertyName("cover")] string Cover,
|
||||
[property: JsonPropertyName("member_count")] int MemberCount,
|
||||
[property: JsonPropertyName("name")] string Name
|
||||
);
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||
[JsonSerializable(typeof(Band))]
|
||||
public partial class BandsBandSourceGenerationContext : JsonSerializerContext {
|
||||
}
|
||||
12
src/Band/Models/Bands/ResultData.cs
Normal file
12
src/Band/Models/Bands/ResultData.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Band.Models.Bands;
|
||||
|
||||
public record ResultData(
|
||||
[property: JsonPropertyName("bands")] IReadOnlyList<Band> Bands
|
||||
);
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||
[JsonSerializable(typeof(ResultData))]
|
||||
public partial class BandsResultDataSourceGenerationContext : JsonSerializerContext {
|
||||
}
|
||||
13
src/Band/Models/Bands/Root.cs
Normal file
13
src/Band/Models/Bands/Root.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Band.Models.Bands;
|
||||
|
||||
public record Root(
|
||||
[property: JsonPropertyName("result_code")] int ResultCode,
|
||||
[property: JsonPropertyName("result_data")] ResultData ResultData
|
||||
);
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||
[JsonSerializable(typeof(Root))]
|
||||
public partial class BandsRootSourceGenerationContext : JsonSerializerContext {
|
||||
}
|
||||
Reference in New Issue
Block a user