yavsc/Yavsc/Models/Forms/Field.cs

24 lines
597 B
C#
Raw Normal View History

2016-11-16 10:17:24 +01:00
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
2017-01-16 01:20:39 +01:00
namespace Yavsc.Models.Forms
2016-11-16 10:17:24 +01:00
{
2017-01-16 01:20:39 +01:00
using Validation;
2016-11-16 10:17:24 +01:00
public abstract class Field
{
[Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id {  get; set; }
public abstract Method [] ValidationMethods ();
2016-11-24 01:01:41 +01:00
[Required]
2016-11-16 10:17:24 +01:00
public string Name { get; set; }
public string Label { get; set; }
2016-11-24 01:01:41 +01:00
2016-11-16 10:17:24 +01:00
public string PlaceHolder { get; set; }
2016-11-24 01:01:41 +01:00
[Required]
2016-11-16 10:17:24 +01:00
public string ValueType { get; set; }
}
}