Note Onion - Domain - NoteTypeEntity

Here is the source code for NoteTypeEntity.cs file it is placed in the Entities directory of the Note.Domain project.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
namespace Note.Domain.Entities
{
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

public class NoteTypeEntity
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }

[Required(ErrorMessage = "NoteType is Required")]
[StringLength(12, ErrorMessage = "Maximum length for NoteType is 12 characters")]
public string NoteType { get; set; }

public bool ShowOnNew { get; set; }

[Required(ErrorMessage = "Company Key is Required")]
[StringLength(255, ErrorMessage = "Maximum length for Company Key is 255 characters")]
public string CompanyKey { get; set; }

[Required(ErrorMessage = "NoteTypeViewModel.ApplicationKey is Required")]
[StringLength(255, ErrorMessage = "Maximum length for Application Key is 255 characters")]
public string ApplicationKey { get; set; }

public ICollection<NoteEntity> Notes { get; set; }

}
}