You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Readarr/src/NzbDrone.Core/Notifications/Goodreads/OwnedBooks/GoodreadsOwnedBooksNotifica...

35 lines
1.3 KiB

using NzbDrone.Core.Annotations;
using NzbDrone.Core.Validation;
namespace NzbDrone.Core.Notifications.Goodreads
{
public enum OwnedBookCondition
{
BrandNew = 10,
LikeNew = 20,
VeryGood = 30,
Good = 40,
Acceptable = 50,
Poor = 60
}
public class GoodreadsOwnedBooksNotificationSettings : GoodreadsSettingsBase<GoodreadsOwnedBooksNotificationSettings>
{
private static readonly GoodreadsSettingsBaseValidator<GoodreadsOwnedBooksNotificationSettings> Validator = new GoodreadsSettingsBaseValidator<GoodreadsOwnedBooksNotificationSettings>();
[FieldDefinition(1, Label = "Condition", Type = FieldType.Select, SelectOptions = typeof(OwnedBookCondition))]
public int Condition { get; set; } = (int)OwnedBookCondition.BrandNew;
[FieldDefinition(1, Label = "Condition Description", Type = FieldType.Textbox)]
public string Description { get; set; }
[FieldDefinition(1, Label = "Purchase Location", HelpText = "Will be displayed on Goodreads website", Type = FieldType.Textbox)]
public string Location { get; set; }
public override NzbDroneValidationResult Validate()
{
return new NzbDroneValidationResult(Validator.Validate(this));
}
}
}