]> git.somenet.org - pub/jan/aic18.git/blob - service-reporting/Models/Term.cs
added constraint for sentiment to model
[pub/jan/aic18.git] / service-reporting / Models / Term.cs
1 using System.ComponentModel.DataAnnotations;
2 namespace PdfService.Models
3 {
4     // represents the data got from sentiment analysis.
5     // TODO: adapt to real data from sentiment analysis
6     public class Term
7     {
8         public Term(string Name, double Sentiment) {
9             this.Name = Name;
10             this.Sentiment = Sentiment;
11         }
12         [Required]
13         public string Name { get; set; }
14         [Range(0.0,1.0)]
15         [Required]
16         public double Sentiment { get; set; }
17     }
18 }