submodule对gitea不管用,所以直接拉了一份拉格兰
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using Lagrange.Core.Common.Entity;
|
||||
|
||||
namespace Lagrange.OneBot.Core.Entity;
|
||||
|
||||
[Serializable]
|
||||
public class OneBotAiCharacter(AiCharacter aiCharacter)
|
||||
{
|
||||
[JsonPropertyName("character_id")] public string CharacterId { get; set; } = aiCharacter.VoiceId;
|
||||
|
||||
[JsonPropertyName("character_name")] public string CharacterName { get; set; } = aiCharacter.CharacterName;
|
||||
|
||||
[JsonPropertyName("preview_url")] public string PreviewUrl { get; set; } = aiCharacter.CharacterVoiceUrl;
|
||||
}
|
||||
|
||||
public class OneBotAiCharacters(AiCharacterList aiCharacters)
|
||||
{
|
||||
[JsonPropertyName("type")] public string Type { get; set; } = aiCharacters.Type;
|
||||
|
||||
[JsonPropertyName("characters")]
|
||||
public List<OneBotAiCharacter> Characters { get; set; } =
|
||||
aiCharacters.Characters.Select(x => new OneBotAiCharacter(x)).ToList();
|
||||
}
|
||||
Reference in New Issue
Block a user