forked from d4software/QueryTree
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUserDatabaseConnection.cs
More file actions
35 lines (27 loc) · 1.17 KB
/
UserDatabaseConnection.cs
File metadata and controls
35 lines (27 loc) · 1.17 KB
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
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace QueryTree.Models
{
public enum UserDatabaseTypes { Admin = 1, [Display(Name ="Report Builder")] ReportBuilder = 2, [Display(Name = "Report Viewer")] ReportViewer = 3 }
public class UserDatabaseConnection
{
[Key]
public int UserDatabaseConnectionID { get; set; }
[Display(Name = "Database")]
public int DatabaseConnectionID { get; set; }
public virtual DatabaseConnection DatabaseConnection { get; set; }
public string ApplicationUserID{ get; set; }
[ForeignKey("ApplicationUserID")]
public virtual ApplicationUser ApplicationUser { get; set; }
[Display(Name="Access Level")]
public UserDatabaseTypes Type { get; set; }
public string CreatedByID { get; set; }
[ForeignKey("CreatedByID")]
public virtual ApplicationUser CreatedBy { get; set; }
public DateTime CreatedOn { get; set; }
[Display(Name = "Email Address")]
[DataType(DataType.EmailAddress)]
public string InviteEmail { get; set; }
}
}