Forum-Inzynieria1/Trunk/Server/Forum/MailSender/Models/MailModel.cs
2018-12-08 19:27:21 +01:00

30 lines
925 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace MailSender.Models
{
[Table("Mail")]
public class MailModel
{
[Key]
public int Id { get; set; }
//[ForeignKey]
//public int UserId //id usera ktory wyslal maila
[Display(Name = "Subject")]
[Required]
public string Subject { get; set; }
[EmailAddress]
[Required]
[Display(Name = "E-Mail to")]
public string EMailTo { get; set; }
[Required(AllowEmptyStrings = false, ErrorMessage = "You need to type in a message to send")]
[DataType(DataType.Text)]
[StringLength(500, ErrorMessage = "Message can be at most 500 characters long")]
public string Content { get; set; }
}
}