-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathPropertyTestBed.cs
62 lines (56 loc) · 2.25 KB
/
PropertyTestBed.cs
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
using System.ComponentModel.DataAnnotations;
using System;
using System.ComponentModel.DataAnnotations.Schema;
using Cloudy.NET.SingletonSupport;
using Cloudy.NET.UI.FieldSupport.CustomSelect;
using Cloudy.NET.UI.List;
using System.Collections.Generic;
using TestWebsite.Factories;
using TestWebsite.Constants;
namespace TestWebsite.Models
{
[Display(GroupName = General.GroupNames.Test)]
public class PropertyTestBed : ISingleton
{
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; set; }
public int Integer { get; set; }
public int? NullableInteger { get; set; }
public double Double { get; set; }
public double? NullableDouble { get; set; }
public DateTime DateTime { get; set; }
public DateTime? NullableDateTime { get; set; }
public DateTimeOffset DateTimeOffset { get; set; }
public DateTimeOffset? NullableDateTimeOffset { get; set; }
public DateTime DateTimeWithDate { get; set; }
public DateTimeOffset DateTimeOffsetWithDate { get; set; }
public DateTime DateTimeWithTime { get; set; }
public DateTimeOffset DateTimeOffsetWithTime { get; set; }
public DateOnly DateOnly { get; set; }
public DateOnly? NullableDateOnly { get; set; }
public TimeOnly TimeOnly { get; set; }
public TimeOnly? NullableTimeOnly { get; set; }
public bool Checkbox { get; set; }
public bool? NullableCheckbox { get; set; }
[Display(AutoGenerateField = false)]
public string IgnoredProperty { get; set; }
[Required]
public string Name { get; set; }
[UIHint("/components/my-awesome-component.js")]
public string CustomComponent { get; set; }
[ListColumn]
[Required]
[CustomSelect<IColorFactory>]
[Display(Prompt = "Pick something!")]
public string Color { get; set; }
[ListColumn]
[Required]
[CustomSelect<IColorFactory>]
[Display(Description = "Sub label", Prompt = "Pick something!")]
public string SecondColor { get; set; }
[ListColumn]
[CustomSelect<IColorFactory>]
public IList<string> Colors { get; set; }
public Category Category { get; set; }
}
}