GIT: perform LF normalization

This commit is contained in:
Gary Sharp
2013-02-28 17:15:46 +11:00
parent 989f08a24d
commit 7d9be5620d
729 changed files with 300734 additions and 300712 deletions
+16 -16
View File
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework">
<parameters>
<parameter value="Data Source=(localdb)\v11.0; Integrated Security=True; MultipleActiveResultSets=True" />
</parameters>
</defaultConnectionFactory>
</entityFramework>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework">
<parameters>
<parameter value="Data Source=(localdb)\v11.0; Integrated Security=True; MultipleActiveResultSets=True" />
</parameters>
</defaultConnectionFactory>
</entityFramework>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>
+74 -74
View File
@@ -1,74 +1,74 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
namespace Disco.Models.BI.Config
{
public class OrganisationAddress
{
public int? Id { get; set; }
[Required]
public string Name { get; set; }
[Required]
public string Address { get; set; }
[Required]
public string Suburb { get; set; }
[Required]
public string Postcode { get; set; }
[Required]
public string State { get; set; }
[Required]
public string Country { get; set; }
[Required]
public string ShortName { get; set; }
// Added 2012-12-11 G#
// http://discoict.com.au/forum/support/2012/12/address-details.aspx
public string PhoneNumber { get; set; }
public string FaxNumber { get; set; }
// End Added 2012-12-11 G#
public string ToConfigurationEntry()
{
StringBuilder entryBuilder = new StringBuilder();
entryBuilder.AppendLine(Name.Trim());
entryBuilder.AppendLine(Address.Trim());
entryBuilder.AppendLine(Suburb.Trim());
entryBuilder.AppendLine(Postcode.Trim());
entryBuilder.AppendLine(State.Trim());
entryBuilder.AppendLine(Country.Trim());
if (!string.IsNullOrEmpty(ShortName))
{
entryBuilder.AppendLine(ShortName.Trim());
}
return entryBuilder.ToString();
}
public static OrganisationAddress FromConfigurationEntry(int Id, string Entry)
{
string[] entryLines = Entry.Split(new string[] { Environment.NewLine }, StringSplitOptions.None);
if (entryLines.Length >= 6)
{
return new OrganisationAddress()
{
Id = Id,
Name = entryLines[0].Trim(),
Address = entryLines[1].Trim(),
Suburb = entryLines[2].Trim(),
Postcode = entryLines[3].Trim(),
State = entryLines[4].Trim(),
Country = entryLines[5].Trim(),
ShortName = (entryLines.Length > 6 ? entryLines[6].Trim() : string.Empty)
};
}
throw new ArgumentException("Invalid Configuration Address Entry", "entry");
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
namespace Disco.Models.BI.Config
{
public class OrganisationAddress
{
public int? Id { get; set; }
[Required]
public string Name { get; set; }
[Required]
public string Address { get; set; }
[Required]
public string Suburb { get; set; }
[Required]
public string Postcode { get; set; }
[Required]
public string State { get; set; }
[Required]
public string Country { get; set; }
[Required]
public string ShortName { get; set; }
// Added 2012-12-11 G#
// http://discoict.com.au/forum/support/2012/12/address-details.aspx
public string PhoneNumber { get; set; }
public string FaxNumber { get; set; }
// End Added 2012-12-11 G#
public string ToConfigurationEntry()
{
StringBuilder entryBuilder = new StringBuilder();
entryBuilder.AppendLine(Name.Trim());
entryBuilder.AppendLine(Address.Trim());
entryBuilder.AppendLine(Suburb.Trim());
entryBuilder.AppendLine(Postcode.Trim());
entryBuilder.AppendLine(State.Trim());
entryBuilder.AppendLine(Country.Trim());
if (!string.IsNullOrEmpty(ShortName))
{
entryBuilder.AppendLine(ShortName.Trim());
}
return entryBuilder.ToString();
}
public static OrganisationAddress FromConfigurationEntry(int Id, string Entry)
{
string[] entryLines = Entry.Split(new string[] { Environment.NewLine }, StringSplitOptions.None);
if (entryLines.Length >= 6)
{
return new OrganisationAddress()
{
Id = Id,
Name = entryLines[0].Trim(),
Address = entryLines[1].Trim(),
Suburb = entryLines[2].Trim(),
Postcode = entryLines[3].Trim(),
State = entryLines[4].Trim(),
Country = entryLines[5].Trim(),
ShortName = (entryLines.Length > 6 ? entryLines[6].Trim() : string.Empty)
};
}
throw new ArgumentException("Invalid Configuration Address Entry", "entry");
}
}
}
@@ -1,59 +1,59 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
namespace Disco.Models.BI.DocumentTemplates
{
public class DocumentState : IDisposable
{
public int SequenceNumber { get; set; }
public Hashtable FieldCache { get; set; }
public Hashtable ScopeCache { get; set; }
public Hashtable DocumentCache { get; set; }
public DocumentState(int SequenceNumber)
{
this.SequenceNumber = SequenceNumber;
this.FieldCache = new Hashtable();
this.ScopeCache = new Hashtable();
this.DocumentCache = new Hashtable();
}
public void FlushFieldCache()
{
FlushDictionary(this.FieldCache);
}
public void FlushScopeCache()
{
FlushFieldCache();
FlushDictionary(this.ScopeCache);
}
public void FlushDocumentCache()
{
FlushScopeCache();
FlushDictionary(this.DocumentCache);
}
private static void FlushDictionary(Hashtable d)
{
foreach (var key in d.Keys)
{
var disposeItem = d[key] as IDisposable;
if (disposeItem != null)
disposeItem.Dispose();
}
d.Clear();
}
public static DocumentState DefaultState()
{
return new DocumentState(1);
}
public void Dispose()
{
FlushDocumentCache();
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
namespace Disco.Models.BI.DocumentTemplates
{
public class DocumentState : IDisposable
{
public int SequenceNumber { get; set; }
public Hashtable FieldCache { get; set; }
public Hashtable ScopeCache { get; set; }
public Hashtable DocumentCache { get; set; }
public DocumentState(int SequenceNumber)
{
this.SequenceNumber = SequenceNumber;
this.FieldCache = new Hashtable();
this.ScopeCache = new Hashtable();
this.DocumentCache = new Hashtable();
}
public void FlushFieldCache()
{
FlushDictionary(this.FieldCache);
}
public void FlushScopeCache()
{
FlushFieldCache();
FlushDictionary(this.ScopeCache);
}
public void FlushDocumentCache()
{
FlushScopeCache();
FlushDictionary(this.DocumentCache);
}
private static void FlushDictionary(Hashtable d)
{
foreach (var key in d.Keys)
{
var disposeItem = d[key] as IDisposable;
if (disposeItem != null)
disposeItem.Dispose();
}
d.Clear();
}
public static DocumentState DefaultState()
{
return new DocumentState(1);
}
public void Dispose()
{
FlushDocumentCache();
}
}
}
@@ -1,18 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace Disco.Models.BI.Expressions
{
public interface IImageExpressionResult
{
Stream GetImage(int Width, int Height);
byte Quality { get; set; }
bool LosslessFormat { get; set; }
bool ShowField { get; set; }
string BackgroundColour { get; set; }
bool BackgroundPreferTransparent { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace Disco.Models.BI.Expressions
{
public interface IImageExpressionResult
{
Stream GetImage(int Width, int Height);
byte Quality { get; set; }
bool LosslessFormat { get; set; }
bool ShowField { get; set; }
string BackgroundColour { get; set; }
bool BackgroundPreferTransparent { get; set; }
}
}
@@ -1,16 +1,16 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
namespace Disco.Models.BI.Interop.Community
{
public class UpdateRequestBase
{
public virtual int RequestVersion { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
namespace Disco.Models.BI.Interop.Community
{
public class UpdateRequestBase
{
public virtual int RequestVersion { get; set; }
}
}
@@ -1,24 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Disco.Models.BI.Interop.Community
{
public class UpdateResponse
{
public string Version { get; set; }
public DateTime VersionReleasedTimestamp { get; set; }
public string Blurb { get; set; }
public string UrlLink { get; set; }
public DateTime ResponseTimestamp { get; set; }
public bool BetaRelease { get; set; }
public bool IsUpdatable(Version TestVersion)
{
var updateVersion = System.Version.Parse(this.Version);
return (updateVersion > TestVersion);
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Disco.Models.BI.Interop.Community
{
public class UpdateResponse
{
public string Version { get; set; }
public DateTime VersionReleasedTimestamp { get; set; }
public string Blurb { get; set; }
public string UrlLink { get; set; }
public DateTime ResponseTimestamp { get; set; }
public bool BetaRelease { get; set; }
public bool IsUpdatable(Version TestVersion)
{
var updateVersion = System.Version.Parse(this.Version);
return (updateVersion > TestVersion);
}
}
}
+74 -74
View File
@@ -1,74 +1,74 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Disco.Models.BI.Job
{
public class JobTableModel
{
public bool ShowId { get; set; }
public bool? ShowDeviceAddress { get; set; }
public bool ShowDates { get; set; }
public bool ShowType { get; set; }
public bool ShowDevice { get; set; }
public bool ShowUser { get; set; }
public bool ShowTechnician { get; set; }
public bool ShowLocation { get; set; }
public bool ShowStatus { get; set; }
public bool IsSmallTable { get; set; }
public bool HideClosedJobs { get; set; }
public List<JobTableItemModel> Items { get; set; }
public JobTableModel()
{
ShowId = true;
ShowDates = true;
ShowType = true;
ShowDevice = true;
ShowUser = true;
ShowTechnician = true;
}
public class JobTableItemModel
{
public int Id { get; set; }
public int? DeviceAddressId { get; set; }
public string DeviceAddress { get; set; }
public DateTime OpenedDate { get; set; }
public DateTime? ClosedDate { get; set; }
public string TypeId { get; set; }
public string TypeDescription { get; set; }
public string DeviceSerialNumber { get; set; }
public string DeviceModelDescription { get; set; }
public string UserId { get; set; }
public string UserDisplayName { get; set; }
public string OpenedTechUserId { get; set; }
public string OpenedTechUserDisplayName { get; set; }
public string StatusDescription { get; set; }
public string StatusId { get; set; }
public string Location { get; set; }
}
public class JobTableItemModelIncludeStatus : JobTableItemModel
{
public string JobMetaWarranty_ExternalReference { get; set; }
public DateTime? JobMetaWarranty_ExternalCompletedDate { get; set; }
public DateTime? JobMetaNonWarranty_RepairerLoggedDate { get; set; }
public DateTime? JobMetaNonWarranty_RepairerCompletedDate { get; set; }
public DateTime? JobMetaNonWarranty_AccountingChargeAddedDate { get; set; }
public DateTime? JobMetaNonWarranty_AccountingChargePaidDate { get; set; }
public DateTime? JobMetaNonWarranty_AccountingChargeRequiredDate { get; set; }
public bool? JobMetaNonWarranty_IsInsuranceClaim { get; set; }
public DateTime? JobMetaInsurance_ClaimFormSentDate { get; set; }
public DateTime? WaitingForUserAction { get; set; }
public DateTime? DeviceReadyForReturn { get; set; }
public DateTime? DeviceHeld { get; set; }
public DateTime? DeviceReturnedDate { get; set; }
public string JobMetaWarranty_ExternalName { get; set; }
public string JobMetaNonWarranty_RepairerName { get; set; }
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Disco.Models.BI.Job
{
public class JobTableModel
{
public bool ShowId { get; set; }
public bool? ShowDeviceAddress { get; set; }
public bool ShowDates { get; set; }
public bool ShowType { get; set; }
public bool ShowDevice { get; set; }
public bool ShowUser { get; set; }
public bool ShowTechnician { get; set; }
public bool ShowLocation { get; set; }
public bool ShowStatus { get; set; }
public bool IsSmallTable { get; set; }
public bool HideClosedJobs { get; set; }
public List<JobTableItemModel> Items { get; set; }
public JobTableModel()
{
ShowId = true;
ShowDates = true;
ShowType = true;
ShowDevice = true;
ShowUser = true;
ShowTechnician = true;
}
public class JobTableItemModel
{
public int Id { get; set; }
public int? DeviceAddressId { get; set; }
public string DeviceAddress { get; set; }
public DateTime OpenedDate { get; set; }
public DateTime? ClosedDate { get; set; }
public string TypeId { get; set; }
public string TypeDescription { get; set; }
public string DeviceSerialNumber { get; set; }
public string DeviceModelDescription { get; set; }
public string UserId { get; set; }
public string UserDisplayName { get; set; }
public string OpenedTechUserId { get; set; }
public string OpenedTechUserDisplayName { get; set; }
public string StatusDescription { get; set; }
public string StatusId { get; set; }
public string Location { get; set; }
}
public class JobTableItemModelIncludeStatus : JobTableItemModel
{
public string JobMetaWarranty_ExternalReference { get; set; }
public DateTime? JobMetaWarranty_ExternalCompletedDate { get; set; }
public DateTime? JobMetaNonWarranty_RepairerLoggedDate { get; set; }
public DateTime? JobMetaNonWarranty_RepairerCompletedDate { get; set; }
public DateTime? JobMetaNonWarranty_AccountingChargeAddedDate { get; set; }
public DateTime? JobMetaNonWarranty_AccountingChargePaidDate { get; set; }
public DateTime? JobMetaNonWarranty_AccountingChargeRequiredDate { get; set; }
public bool? JobMetaNonWarranty_IsInsuranceClaim { get; set; }
public DateTime? JobMetaInsurance_ClaimFormSentDate { get; set; }
public DateTime? WaitingForUserAction { get; set; }
public DateTime? DeviceReadyForReturn { get; set; }
public DateTime? DeviceHeld { get; set; }
public DateTime? DeviceReturnedDate { get; set; }
public string JobMetaWarranty_ExternalName { get; set; }
public string JobMetaNonWarranty_RepairerName { get; set; }
}
}
}
@@ -1,15 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Disco.Models.BI.Job.Statistics
{
public class DailyOpenedClosedItem
{
public DateTime Timestamp { get; set; }
public int TotalJobs { get; set; }
public int OpenedJobs { get; set; }
public int ClosedJobs { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Disco.Models.BI.Job.Statistics
{
public class DailyOpenedClosedItem
{
public DateTime Timestamp { get; set; }
public int TotalJobs { get; set; }
public int OpenedJobs { get; set; }
public int ClosedJobs { get; set; }
}
}
@@ -1,34 +1,34 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Disco.Models.BI.Search
{
public class DeviceSearchResultItem
{
public string AssetNumber { get; set; }
public string AssignedUserDescription
{
get
{
if (AssignedUserId != null)
{
if (AssignedUserDisplayName != null)
return string.Format("{0} ({1})", AssignedUserDisplayName, AssignedUserId);
else
return AssignedUserId;
}
return string.Empty;
}
}
public string AssignedUserDisplayName { get; set; }
public string AssignedUserId { get; set; }
public string ComputerName { get; set; }
public string DeviceModelDescription { get; set; }
public string DeviceProfileDescription { get; set; }
public int JobCount { get; set; }
public DateTime? DecommissionedDate { get; set; }
public string SerialNumber { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Disco.Models.BI.Search
{
public class DeviceSearchResultItem
{
public string AssetNumber { get; set; }
public string AssignedUserDescription
{
get
{
if (AssignedUserId != null)
{
if (AssignedUserDisplayName != null)
return string.Format("{0} ({1})", AssignedUserDisplayName, AssignedUserId);
else
return AssignedUserId;
}
return string.Empty;
}
}
public string AssignedUserDisplayName { get; set; }
public string AssignedUserId { get; set; }
public string ComputerName { get; set; }
public string DeviceModelDescription { get; set; }
public string DeviceProfileDescription { get; set; }
public int JobCount { get; set; }
public DateTime? DecommissionedDate { get; set; }
public string SerialNumber { get; set; }
}
}
+17 -17
View File
@@ -1,17 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Disco.Models.BI.Search
{
public class UserSearchResultItem
{
public int AssignedDevicesCount { get; set; }
public string DisplayName { get; set; }
public string GivenName { get; set; }
public string Id { get; set; }
public int JobCount { get; set; }
public string Surname { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Disco.Models.BI.Search
{
public class UserSearchResultItem
{
public int AssignedDevicesCount { get; set; }
public string DisplayName { get; set; }
public string GivenName { get; set; }
public string Id { get; set; }
public int JobCount { get; set; }
public string Surname { get; set; }
}
}
+31 -31
View File
@@ -1,31 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Disco.Models.ClientServices
{
public class Enrol : ServiceBase<EnrolResponse>
{
public override string Feature
{
get { return "Enrol"; }
}
public string DeviceSerialNumber { get; set; }
public string DeviceUUID { get; set; }
public string DeviceComputerName { get; set; }
public bool DeviceIsPartOfDomain { get; set; }
public string DeviceManufacturer { get; set; }
public string DeviceModel { get; set; }
public string DeviceModelType { get; set; }
public string DeviceLanMacAddress { get; set; }
public string DeviceWlanMacAddress { get; set; }
public List<string> DeviceCertificates { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Disco.Models.ClientServices
{
public class Enrol : ServiceBase<EnrolResponse>
{
public override string Feature
{
get { return "Enrol"; }
}
public string DeviceSerialNumber { get; set; }
public string DeviceUUID { get; set; }
public string DeviceComputerName { get; set; }
public bool DeviceIsPartOfDomain { get; set; }
public string DeviceManufacturer { get; set; }
public string DeviceModel { get; set; }
public string DeviceModelType { get; set; }
public string DeviceLanMacAddress { get; set; }
public string DeviceWlanMacAddress { get; set; }
public List<string> DeviceCertificates { get; set; }
}
}
+31 -31
View File
@@ -1,31 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Disco.Models.ClientServices
{
public class EnrolResponse
{
public string SessionId { get; set; }
public string DeviceDomainName { get; set; }
public string DeviceComputerName { get; set; }
public string DeviceAssignedUserDomain { get; set; }
public string DeviceAssignedUserName { get; set; }
public string DeviceAssignedUserSID { get; set; }
public string DeviceAssignedUserUsername { get; set; }
public string OfflineDomainJoin { get; set; }
public string DeviceCertificate { get; set; }
public List<string> DeviceCertificateRemoveExisting { get; set; }
// Actions
public bool AllowBootstrapperUninstall { get; set; }
public bool RequireReboot { get; set; }
public string ErrorMessage { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Disco.Models.ClientServices
{
public class EnrolResponse
{
public string SessionId { get; set; }
public string DeviceDomainName { get; set; }
public string DeviceComputerName { get; set; }
public string DeviceAssignedUserDomain { get; set; }
public string DeviceAssignedUserName { get; set; }
public string DeviceAssignedUserSID { get; set; }
public string DeviceAssignedUserUsername { get; set; }
public string OfflineDomainJoin { get; set; }
public string DeviceCertificate { get; set; }
public List<string> DeviceCertificateRemoveExisting { get; set; }
// Actions
public bool AllowBootstrapperUninstall { get; set; }
public bool RequireReboot { get; set; }
public string ErrorMessage { get; set; }
}
}
+28 -28
View File
@@ -1,28 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Disco.Models.ClientServices
{
public class MacEnrol : ServiceBase<MacEnrolResponse>
{
public override string Feature
{
get { return "MacEnrol"; }
}
public string DeviceSerialNumber { get; set; }
public string DeviceUUID { get; set; }
public string DeviceComputerName { get; set; }
public string DeviceManufacturer { get; set; }
public string DeviceModel { get; set; }
public string DeviceModelType { get; set; }
public string DeviceLanMacAddress { get; set; }
public string DeviceWlanMacAddress { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Disco.Models.ClientServices
{
public class MacEnrol : ServiceBase<MacEnrolResponse>
{
public override string Feature
{
get { return "MacEnrol"; }
}
public string DeviceSerialNumber { get; set; }
public string DeviceUUID { get; set; }
public string DeviceComputerName { get; set; }
public string DeviceManufacturer { get; set; }
public string DeviceModel { get; set; }
public string DeviceModelType { get; set; }
public string DeviceLanMacAddress { get; set; }
public string DeviceWlanMacAddress { get; set; }
}
}
+19 -19
View File
@@ -1,19 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Disco.Models.ClientServices
{
public class MacEnrolResponse
{
public string DeviceComputerName { get; set; }
public string DeviceAssignedUserDomain { get; set; }
public string DeviceAssignedUserName { get; set; }
public string DeviceAssignedUserSID { get; set; }
public string DeviceAssignedUserUsername { get; set; }
public string ErrorMessage { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Disco.Models.ClientServices
{
public class MacEnrolResponse
{
public string DeviceComputerName { get; set; }
public string DeviceAssignedUserDomain { get; set; }
public string DeviceAssignedUserName { get; set; }
public string DeviceAssignedUserSID { get; set; }
public string DeviceAssignedUserUsername { get; set; }
public string ErrorMessage { get; set; }
}
}
@@ -1,32 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Disco.Models.ClientServices
{
public class MacSecureEnrolResponse
{
public string DeviceComputerName { get; set; }
public string DeviceAssignedUserDomain { get; set; }
public string DeviceAssignedUserName { get; set; }
public string DeviceAssignedUserSID { get; set; }
public string DeviceAssignedUserUsername { get; set; }
public string ErrorMessage { get; set; }
public static MacSecureEnrolResponse FromMacEnrolResponse(MacEnrolResponse mer)
{
return new MacSecureEnrolResponse
{
DeviceComputerName = mer.DeviceComputerName,
DeviceAssignedUserDomain = mer.DeviceAssignedUserDomain,
DeviceAssignedUserName = mer.DeviceAssignedUserName,
DeviceAssignedUserSID = mer.DeviceAssignedUserSID,
DeviceAssignedUserUsername = mer.DeviceAssignedUserUsername
};
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Disco.Models.ClientServices
{
public class MacSecureEnrolResponse
{
public string DeviceComputerName { get; set; }
public string DeviceAssignedUserDomain { get; set; }
public string DeviceAssignedUserName { get; set; }
public string DeviceAssignedUserSID { get; set; }
public string DeviceAssignedUserUsername { get; set; }
public string ErrorMessage { get; set; }
public static MacSecureEnrolResponse FromMacEnrolResponse(MacEnrolResponse mer)
{
return new MacSecureEnrolResponse
{
DeviceComputerName = mer.DeviceComputerName,
DeviceAssignedUserDomain = mer.DeviceAssignedUserDomain,
DeviceAssignedUserName = mer.DeviceAssignedUserName,
DeviceAssignedUserSID = mer.DeviceAssignedUserSID,
DeviceAssignedUserUsername = mer.DeviceAssignedUserUsername
};
}
}
}
+16 -16
View File
@@ -1,16 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Disco.Models.ClientServices
{
public abstract class ServiceBase<ResponseType>
{
internal ServiceBase()
{
}
public abstract string Feature { get; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Disco.Models.ClientServices
{
public abstract class ServiceBase<ResponseType>
{
internal ServiceBase()
{
}
public abstract string Feature { get; }
}
}
+16 -16
View File
@@ -1,16 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Disco.Models.ClientServices
{
public class WhoAmI : ServiceBase<WhoAmIResponse>
{
public override string Feature
{
get { return "WhoAmI"; }
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Disco.Models.ClientServices
{
public class WhoAmI : ServiceBase<WhoAmIResponse>
{
public override string Feature
{
get { return "WhoAmI"; }
}
}
}
+19 -19
View File
@@ -1,19 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Disco.Models.ClientServices
{
public class WhoAmIResponse
{
public string DisplayName { get; set; }
public string Type { get; set; }
public string Username { get; set; }
public override string ToString()
{
return string.Format("{0} ({1})", DisplayName, Username);
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Disco.Models.ClientServices
{
public class WhoAmIResponse
{
public string DisplayName { get; set; }
public string Type { get; set; }
public string Username { get; set; }
public override string ToString()
{
return string.Format("{0} ({1})", DisplayName, Username);
}
}
}
@@ -1,45 +1,45 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Disco.Models.Repository;
namespace Disco.Models.Interop.ActiveDirectory
{
public class ActiveDirectoryMachineAccount
{
public string DistinguishedName { get; set; }
public string DnsName { get; set; }
public string Domain { get; set; }
public string Name { get; set; }
public Guid NetbootGUID { get; set; }
public string ObjectSid { get; set; }
public string Path { get; set; }
public string sAMAccountName { get; set; }
public bool IsCriticalSystemObject { get; set; }
public Dictionary<string, object[]> LoadedProperties { get; set; }
public string ParentDistinguishedName
{
get
{
// Determine Parent
if (!string.IsNullOrWhiteSpace(DistinguishedName))
return DistinguishedName.Substring(0, DistinguishedName.IndexOf(",DC=")).Substring(DistinguishedName.IndexOf(",") + 1);
else
return null;
}
}
public User ToRepositoryUser()
{
return new User
{
Id = this.sAMAccountName,
Type = "Computer",
DisplayName = this.Name
};
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Disco.Models.Repository;
namespace Disco.Models.Interop.ActiveDirectory
{
public class ActiveDirectoryMachineAccount
{
public string DistinguishedName { get; set; }
public string DnsName { get; set; }
public string Domain { get; set; }
public string Name { get; set; }
public Guid NetbootGUID { get; set; }
public string ObjectSid { get; set; }
public string Path { get; set; }
public string sAMAccountName { get; set; }
public bool IsCriticalSystemObject { get; set; }
public Dictionary<string, object[]> LoadedProperties { get; set; }
public string ParentDistinguishedName
{
get
{
// Determine Parent
if (!string.IsNullOrWhiteSpace(DistinguishedName))
return DistinguishedName.Substring(0, DistinguishedName.IndexOf(",DC=")).Substring(DistinguishedName.IndexOf(",") + 1);
else
return null;
}
}
public User ToRepositoryUser()
{
return new User
{
Id = this.sAMAccountName,
Type = "Computer",
DisplayName = this.Name
};
}
}
}
@@ -1,41 +1,41 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Disco.Models.Repository;
namespace Disco.Models.Interop.ActiveDirectory
{
public class ActiveDirectoryUserAccount
{
public string DisplayName { get; set; }
public string DistinguishedName { get; set; }
public string Domain { get; set; }
public string Email { get; set; }
public string GivenName { get; set; }
public List<string> Groups { get; set; }
public string Name { get; set; }
public string ObjectSid { get; set; }
public string Path { get; set; }
public string Phone { get; set; }
public string sAMAccountName { get; set; }
public string Surname { get; set; }
public string Type { get; set; }
public Dictionary<string, object[]> LoadedProperties { get; set; }
public User ToRepositoryUser()
{
return new User
{
Id = this.sAMAccountName,
DisplayName = this.DisplayName,
Surname = this.Surname,
GivenName = this.GivenName,
EmailAddress = this.Email,
PhoneNumber = this.Phone,
Type = this.Type
};
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Disco.Models.Repository;
namespace Disco.Models.Interop.ActiveDirectory
{
public class ActiveDirectoryUserAccount
{
public string DisplayName { get; set; }
public string DistinguishedName { get; set; }
public string Domain { get; set; }
public string Email { get; set; }
public string GivenName { get; set; }
public List<string> Groups { get; set; }
public string Name { get; set; }
public string ObjectSid { get; set; }
public string Path { get; set; }
public string Phone { get; set; }
public string sAMAccountName { get; set; }
public string Surname { get; set; }
public string Type { get; set; }
public Dictionary<string, object[]> LoadedProperties { get; set; }
public User ToRepositoryUser()
{
return new User
{
Id = this.sAMAccountName,
DisplayName = this.DisplayName,
Surname = this.Surname,
GivenName = this.GivenName,
EmailAddress = this.Email,
PhoneNumber = this.Phone,
Type = this.Type
};
}
}
}
+19 -19
View File
@@ -1,19 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
[Table("Configuration")]
public class ConfigurationItem
{
[StringLength(80), Column(Order = 1), Key]
public string Key { get; set; }
[Column(Order = 0), StringLength(80), Key]
public string Scope { get; set; }
public string Value { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
[Table("Configuration")]
public class ConfigurationItem
{
[StringLength(80), Column(Order = 1), Key]
public string Key { get; set; }
[Column(Order = 0), StringLength(80), Key]
public string Scope { get; set; }
public string Value { get; set; }
}
}
@@ -1,37 +1,37 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
public class DeviceAttachment
{
[Key]
public int Id { get; set; }
public string DeviceSerialNumber { get; set; }
[Required]
public string TechUserId { get; set; }
[StringLength(500), Required]
public string Filename { get; set; }
[Required, StringLength(500)]
public string MimeType { get; set; }
public DateTime Timestamp { get; set; }
[Required, StringLength(500)]
public string Comments { get; set; }
public string DocumentTemplateId { get; set; }
[InverseProperty("DeviceAttachments"), ForeignKey("DeviceSerialNumber")]
public virtual Device Device { get; set; }
[ForeignKey("TechUserId")]
public virtual User TechUser { get; set; }
[ForeignKey("DocumentTemplateId")]
public virtual DocumentTemplate DocumentTemplate { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
public class DeviceAttachment
{
[Key]
public int Id { get; set; }
public string DeviceSerialNumber { get; set; }
[Required]
public string TechUserId { get; set; }
[StringLength(500), Required]
public string Filename { get; set; }
[Required, StringLength(500)]
public string MimeType { get; set; }
public DateTime Timestamp { get; set; }
[Required, StringLength(500)]
public string Comments { get; set; }
public string DocumentTemplateId { get; set; }
[InverseProperty("DeviceAttachments"), ForeignKey("DeviceSerialNumber")]
public virtual Device Device { get; set; }
[ForeignKey("TechUserId")]
public virtual User TechUser { get; set; }
[ForeignKey("DocumentTemplateId")]
public virtual DocumentTemplate DocumentTemplate { get; set; }
}
}
+61 -61
View File
@@ -1,61 +1,61 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
public class DeviceBatch
{
[Key]
public int Id { get; set; }
[StringLength(500)]
public string Name { get; set; }
[Required, DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd}", HtmlEncode = false)]
public DateTime PurchaseDate { get; set; }
[StringLength(200)]
public string Supplier { get; set; }
[DataType(DataType.MultilineText), StringLength(500)]
public string PurchaseDetails { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:c}")]
public decimal? UnitCost { get; set; }
public int? UnitQuantity { get; set; }
public int? DefaultDeviceModelId { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd}", HtmlEncode = false)]
public DateTime? WarrantyValidUntil { get; set; }
[DataType(DataType.MultilineText)]
public string WarrantyDetails { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd}", HtmlEncode = false)]
public DateTime? InsuredDate { get; set; }
[StringLength(200)]
public string InsuranceSupplier { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd}", HtmlEncode = false)]
public DateTime? InsuredUntil { get; set; }
[DataType(DataType.MultilineText)]
public string InsuranceDetails { get; set; }
[DataType(DataType.MultilineText)]
public string Comments { get; set; }
[ForeignKey("DefaultDeviceModelId")]
public virtual DeviceModel DefaultDeviceModel { get; set; }
public virtual IList<Device> Devices { get; set; }
public override string ToString()
{
if (string.IsNullOrWhiteSpace(this.Name))
{
return string.Format("{0}: {1}", this.Id, this.PurchaseDate.ToLongDateString());
}
return this.Name;
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
public class DeviceBatch
{
[Key]
public int Id { get; set; }
[StringLength(500)]
public string Name { get; set; }
[Required, DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd}", HtmlEncode = false)]
public DateTime PurchaseDate { get; set; }
[StringLength(200)]
public string Supplier { get; set; }
[DataType(DataType.MultilineText), StringLength(500)]
public string PurchaseDetails { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:c}")]
public decimal? UnitCost { get; set; }
public int? UnitQuantity { get; set; }
public int? DefaultDeviceModelId { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd}", HtmlEncode = false)]
public DateTime? WarrantyValidUntil { get; set; }
[DataType(DataType.MultilineText)]
public string WarrantyDetails { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd}", HtmlEncode = false)]
public DateTime? InsuredDate { get; set; }
[StringLength(200)]
public string InsuranceSupplier { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd}", HtmlEncode = false)]
public DateTime? InsuredUntil { get; set; }
[DataType(DataType.MultilineText)]
public string InsuranceDetails { get; set; }
[DataType(DataType.MultilineText)]
public string Comments { get; set; }
[ForeignKey("DefaultDeviceModelId")]
public virtual DeviceModel DefaultDeviceModel { get; set; }
public virtual IList<Device> Devices { get; set; }
public override string ToString()
{
if (string.IsNullOrWhiteSpace(this.Name))
{
return string.Format("{0}: {1}", this.Id, this.PurchaseDate.ToLongDateString());
}
return this.Name;
}
}
}
@@ -1,35 +1,35 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
public class DeviceCertificate
{
[Key]
public int Id { get; set; }
[Required, StringLength(64)]
public string ProviderId { get; set; }
public int ProviderIndex { get; set; }
[StringLength(28)]
public string Name { get; set; }
[MaxLength(16384)]
public byte[] Content { get; set; }
public bool Enabled { get; set; }
// Added 2011-10-24 G#
public DateTime? ExpirationDate { get; set; }
// Added 2011-10-24 G#
public DateTime? AllocatedDate { get; set; }
public string DeviceSerialNumber { get; set; }
[ForeignKey("DeviceSerialNumber")]
public virtual Device Device { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
public class DeviceCertificate
{
[Key]
public int Id { get; set; }
[Required, StringLength(64)]
public string ProviderId { get; set; }
public int ProviderIndex { get; set; }
[StringLength(28)]
public string Name { get; set; }
[MaxLength(16384)]
public byte[] Content { get; set; }
public bool Enabled { get; set; }
// Added 2011-10-24 G#
public DateTime? ExpirationDate { get; set; }
// Added 2011-10-24 G#
public DateTime? AllocatedDate { get; set; }
public string DeviceSerialNumber { get; set; }
[ForeignKey("DeviceSerialNumber")]
public virtual Device Device { get; set; }
}
}
@@ -1,24 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
public class DeviceComponent
{
[Key]
public int Id { get; set; }
public int? DeviceModelId { get; set; }
[StringLength(100)]
public string Description { get; set; }
public decimal Cost { get; set; }
[ForeignKey("DeviceModelId")]
public virtual DeviceModel DeviceModel { get; set; }
public virtual IList<JobSubType> JobSubTypes { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
public class DeviceComponent
{
[Key]
public int Id { get; set; }
public int? DeviceModelId { get; set; }
[StringLength(100)]
public string Description { get; set; }
public decimal Cost { get; set; }
[ForeignKey("DeviceModelId")]
public virtual DeviceModel DeviceModel { get; set; }
public virtual IList<JobSubType> JobSubTypes { get; set; }
}
}
+26 -26
View File
@@ -1,26 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
public class DeviceDetail
{
[Column(Order = 0), Key]
public string DeviceSerialNumber { get; set; }
[Key, StringLength(100), Column(Order = 2)]
public string Key { get; set; }
[Column(Order = 1), StringLength(100), Key]
public string Scope { get; set; }
public string Value { get; set; }
[ForeignKey("DeviceSerialNumber")]
public virtual Device Device { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
public class DeviceDetail
{
[Column(Order = 0), Key]
public string DeviceSerialNumber { get; set; }
[Key, StringLength(100), Column(Order = 2)]
public string Key { get; set; }
[Column(Order = 1), StringLength(100), Key]
public string Scope { get; set; }
public string Value { get; set; }
[ForeignKey("DeviceSerialNumber")]
public virtual Device Device { get; set; }
}
}
+49 -49
View File
@@ -1,49 +1,49 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
namespace Disco.Models.Repository
{
public class DeviceModel
{
[Key]
public int Id { get; set; }
[StringLength(500)]
public string Description { get; set; }
[StringLength(200)]
public string Manufacturer { get; set; }
[StringLength(200)]
public string Model { get; set; }
[StringLength(40)]
public string ModelType { get; set; }
// Remove Reliance On!
// Removed: 2013-01-14 G#
//[Obsolete("Image to be removed from the Database")]
//public byte[] Image { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd}", HtmlEncode = false)]
public DateTime? DefaultPurchaseDate { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:c}")]
public decimal? DeviceCost { get; set; }
[StringLength(40)]
public string DefaultWarrantyProvider { get; set; }
public virtual IList<DeviceComponent> DeviceComponents { get; set; }
public virtual IList<Device> Devices { get; set; }
public override string ToString()
{
if (string.IsNullOrWhiteSpace(this.Description))
{
return string.Format("{0} {1}", this.Manufacturer, this.Model);
}
return this.Description;
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
namespace Disco.Models.Repository
{
public class DeviceModel
{
[Key]
public int Id { get; set; }
[StringLength(500)]
public string Description { get; set; }
[StringLength(200)]
public string Manufacturer { get; set; }
[StringLength(200)]
public string Model { get; set; }
[StringLength(40)]
public string ModelType { get; set; }
// Remove Reliance On!
// Removed: 2013-01-14 G#
//[Obsolete("Image to be removed from the Database")]
//public byte[] Image { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd}", HtmlEncode = false)]
public DateTime? DefaultPurchaseDate { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:c}")]
public decimal? DeviceCost { get; set; }
[StringLength(40)]
public string DefaultWarrantyProvider { get; set; }
public virtual IList<DeviceComponent> DeviceComponents { get; set; }
public virtual IList<Device> Devices { get; set; }
public override string ToString()
{
if (string.IsNullOrWhiteSpace(this.Description))
{
return string.Format("{0} {1}", this.Manufacturer, this.Model);
}
return this.Description;
}
}
}
+83 -83
View File
@@ -1,83 +1,83 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel;
using System.Linq.Expressions;
namespace Disco.Models.Repository
{
public partial class DeviceProfile
{
[Key]
public int Id { get; set; }
[Required, StringLength(100)]
public string Name { get; set; }
[Required, StringLength(10)]
public string ShortName { get; set; }
[StringLength(500)]
public string Description { get; set; }
public int? DefaultOrganisationAddress { get; set; }
// Migration from DeviceProfile Configuration
// 2012-06-14 G#
[Required()]
public string ComputerNameTemplate { get; set; }
public enum DistributionTypes : int
{
OneToMany = 0,
OneToOne = 1
}
[Column("DistributionType"), EditorBrowsable(EditorBrowsableState.Never)]
public int DistributionTypeDb { get; set; }
[NotMapped]
public DistributionTypes DistributionType
{
get
{
return (DistributionTypes)this.DistributionTypeDb;
}
set
{
this.DistributionTypeDb = (int)value;
}
}
public string OrganisationalUnit { get; set; }
// End Migration
// 2012-06-14 G#
public bool EnforceComputerNameConvention { get; set; }
public bool EnforceOrganisationalUnit { get; set; }
// 2012-06-28 G#
public bool ProvisionADAccount { get; set; }
public virtual IList<Device> Devices { get; set; }
public override string ToString()
{
if (string.IsNullOrEmpty(this.ShortName))
{
return this.Name;
}
return string.Format("{0} ({1})", this.Name, this.ShortName);
}
// 2012-06-21
// public bool AllocateCertificate { get; set; } // Renamed from 'AllocateWirelessCertificate'
[StringLength(64)]
public string CertificateProviderId { get; set; }
}
public partial class DeviceProfile
{
public class PropertyAccessExpressions {
public static readonly Expression<Func<DeviceProfile, int>> DistributionTypeDb = x => x.DistributionTypeDb;
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel;
using System.Linq.Expressions;
namespace Disco.Models.Repository
{
public partial class DeviceProfile
{
[Key]
public int Id { get; set; }
[Required, StringLength(100)]
public string Name { get; set; }
[Required, StringLength(10)]
public string ShortName { get; set; }
[StringLength(500)]
public string Description { get; set; }
public int? DefaultOrganisationAddress { get; set; }
// Migration from DeviceProfile Configuration
// 2012-06-14 G#
[Required()]
public string ComputerNameTemplate { get; set; }
public enum DistributionTypes : int
{
OneToMany = 0,
OneToOne = 1
}
[Column("DistributionType"), EditorBrowsable(EditorBrowsableState.Never)]
public int DistributionTypeDb { get; set; }
[NotMapped]
public DistributionTypes DistributionType
{
get
{
return (DistributionTypes)this.DistributionTypeDb;
}
set
{
this.DistributionTypeDb = (int)value;
}
}
public string OrganisationalUnit { get; set; }
// End Migration
// 2012-06-14 G#
public bool EnforceComputerNameConvention { get; set; }
public bool EnforceOrganisationalUnit { get; set; }
// 2012-06-28 G#
public bool ProvisionADAccount { get; set; }
public virtual IList<Device> Devices { get; set; }
public override string ToString()
{
if (string.IsNullOrEmpty(this.ShortName))
{
return this.Name;
}
return string.Format("{0} ({1})", this.Name, this.ShortName);
}
// 2012-06-21
// public bool AllocateCertificate { get; set; } // Renamed from 'AllocateWirelessCertificate'
[StringLength(64)]
public string CertificateProviderId { get; set; }
}
public partial class DeviceProfile
{
public class PropertyAccessExpressions {
public static readonly Expression<Func<DeviceProfile, int>> DistributionTypeDb = x => x.DistributionTypeDb;
}
}
}
@@ -1,26 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
public class DeviceUserAssignment
{
[Key, Column(Order = 0)]
public string DeviceSerialNumber { get; set; }
public string AssignedUserId { get; set; }
[Column(Order = 1), Key]
public DateTime AssignedDate { get; set; }
public DateTime? UnassignedDate { get; set; }
[ForeignKey("AssignedUserId")]
public virtual User AssignedUser { get; set; }
[ForeignKey("DeviceSerialNumber")]
public virtual Device Device { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
public class DeviceUserAssignment
{
[Key, Column(Order = 0)]
public string DeviceSerialNumber { get; set; }
public string AssignedUserId { get; set; }
[Column(Order = 1), Key]
public DateTime AssignedDate { get; set; }
public DateTime? UnassignedDate { get; set; }
[ForeignKey("AssignedUserId")]
public virtual User AssignedUser { get; set; }
[ForeignKey("DeviceSerialNumber")]
public virtual Device Device { get; set; }
}
}
@@ -1,44 +1,44 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
public class DocumentTemplate
{
public const string PdfMimeType = "application/pdf";
[StringLength(30), Required, Key]
public string Id { get; set; }
[StringLength(250), Required]
public string Description { get; set; }
[Required, StringLength(6)]
public string Scope { get; set; }
[StringLength(250)]
public string FilterExpression { get; set; }
// Feature Request 2012-05-10 by G#: https://disco.uservoice.com/forums/159707-feedback/suggestions/2811092-document-template-option-flatten-form-on-generate
public bool FlattenForm { get; set; }
// End Feature Request
[InverseProperty("DocumentTemplates")]
public virtual IList<JobSubType> JobSubTypes { get; set; }
public static class DocumentTemplateScopes
{
public const string Device = "Device";
public const string Job = "Job";
public const string User = "User";
public static List<string> ToList()
{
return new List<string> { Device, Job, User };
}
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
public class DocumentTemplate
{
public const string PdfMimeType = "application/pdf";
[StringLength(30), Required, Key]
public string Id { get; set; }
[StringLength(250), Required]
public string Description { get; set; }
[Required, StringLength(6)]
public string Scope { get; set; }
[StringLength(250)]
public string FilterExpression { get; set; }
// Feature Request 2012-05-10 by G#: https://disco.uservoice.com/forums/159707-feedback/suggestions/2811092-document-template-option-flatten-form-on-generate
public bool FlattenForm { get; set; }
// End Feature Request
[InverseProperty("DocumentTemplates")]
public virtual IList<JobSubType> JobSubTypes { get; set; }
public static class DocumentTemplateScopes
{
public const string Device = "Device";
public const string Job = "Job";
public const string User = "User";
public static List<string> ToList()
{
return new List<string> { Device, Job, User };
}
}
}
}
+132 -132
View File
@@ -1,132 +1,132 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
public class Job
{
[Key]
public int Id { get; set; }
[Required]
public string JobTypeId { get; set; }
public string DeviceSerialNumber { get; set; }
public string UserId { get; set; }
[Required]
public string OpenedTechUserId { get; set; }
public DateTime OpenedDate { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)]
public DateTime? ExpectedClosedDate { get; set; }
public string ClosedTechUserId { get; set; }
public DateTime? ClosedDate { get; set; }
public long? Flags { get; set; }
[Display(Name = "Technician Held Device")]
public DateTime? DeviceHeld { get; set; }
public string DeviceHeldTechUserId { get; set; }
[StringLength(100)]
public string DeviceHeldLocation { get; set; }
public DateTime? DeviceReadyForReturn { get; set; }
public string DeviceReadyForReturnTechUserId { get; set; }
public DateTime? DeviceReturnedDate { get; set; }
public string DeviceReturnedTechUserId { get; set; }
public DateTime? WaitingForUserAction { get; set; }
[ForeignKey("JobTypeId")]
public virtual JobType JobType { get; set; }
public virtual IList<JobSubType> JobSubTypes { get; set; }
[ForeignKey("DeviceSerialNumber")]
public virtual Device Device { get; set; }
[ForeignKey("UserId")]
public virtual User User { get; set; }
[ForeignKey("OpenedTechUserId")]
public virtual User OpenedTechUser { get; set; }
[ForeignKey("ClosedTechUserId")]
public virtual User ClosedTechUser { get; set; }
[ForeignKey("DeviceHeldTechUserId")]
public virtual User DeviceHeldTechUser { get; set; }
[ForeignKey("DeviceReadyForReturnTechUserId")]
public virtual User DeviceReadyForReturnTechUser { get; set; }
[ForeignKey("DeviceReturnedTechUserId")]
public virtual User DeviceReturnedTechUser { get; set; }
//// Added 2012-10-23 G# - DBv5 Migration
//public virtual IList<JobAssignment> JobAssignments { get; set; }
//// End Added 2012-10-23 G# - DBv5 Migration
public virtual IList<JobAttachment> JobAttachments { get; set; }
public virtual IList<JobComponent> JobComponents { get; set; }
public virtual IList<JobLog> JobLogs { get; set; }
public virtual JobMetaInsurance JobMetaInsurance { get; set; }
public virtual JobMetaWarranty JobMetaWarranty { get; set; }
public virtual JobMetaNonWarranty JobMetaNonWarranty { get; set; }
#region Helper Members
public decimal JobComponentsTotalCost()
{
if (this.JobComponents != null)
{
return this.JobComponents.Sum(jc => jc.Cost);
}
return decimal.Zero;
}
#endregion
public static class JobStatusIds
{
public const string AwaitingAccountingPayment = "AwaitingAccountingPayment";
public const string AwaitingAccountingCharge = "AwaitingAccountingCharge";
public const string AwaitingDeviceReturn = "AwaitingDeviceReturn";
public const string AwaitingInsuranceProcessing = "AwaitingInsuranceProcessing";
public const string AwaitingRepairs = "AwaitingRepairs";
public const string AwaitingUserAction = "AwaitingUserAction";
public const string AwaitingWarrantyRepair = "AwaitingWarrantyRepair";
public const string Closed = "Closed";
public const string Open = "Open";
}
[Flags]
public enum UserManagementFlags : long
{
[Display(GroupName = JobSubType.UserManagementJobSubTypes.Infringement, Name = "Content - Games")]
Infringement_ContentGames = 1,
[Display(GroupName = JobSubType.UserManagementJobSubTypes.Infringement, Name = "Content - Illegal")]
Infringement_ContentIllegal = 2,
[Display(GroupName = JobSubType.UserManagementJobSubTypes.Infringement, Name = "Content - Violence")]
Infringement_ContentViolence = 4,
[Display(GroupName = JobSubType.UserManagementJobSubTypes.Infringement, Name = "Content - Pornography")]
Infringement_ContentPornography = 8,
[Display(GroupName = JobSubType.UserManagementJobSubTypes.Infringement, Name = "Hacking")]
Infringement_Hacking = 16,
[Display(GroupName = JobSubType.UserManagementJobSubTypes.Infringement, Name = "Proxy Bypass")]
Infringement_ProxyBypass = 32,
[Display(GroupName = JobSubType.UserManagementJobSubTypes.Infringement, Name = "Breach Usage Agreement")]
Infringement_BreachUsageAgreement = 64,
[Display(GroupName = JobSubType.UserManagementJobSubTypes.Infringement, Name = "Breach Financial Agreement")]
Infringement_BreachFinancialAgreement = 128,
[Display(GroupName = JobSubType.UserManagementJobSubTypes.Contact, Name = "Phone")]
Contact_Phone = 4294967296,
[Display(GroupName = JobSubType.UserManagementJobSubTypes.Contact, Name = "Email")]
Contact_Email = 8589934592,
[Display(GroupName = JobSubType.UserManagementJobSubTypes.Contact, Name = "In Person")]
Contact_InPerson = 17179869184,
[Display(GroupName = JobSubType.UserManagementJobSubTypes.Contact, Name = "SMS")]
Contact_SMS = 34359738368,
[Display(GroupName = JobSubType.UserManagementJobSubTypes.Contact, Name = "Mail")]
Contact_Mail = 68719476736,
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
public class Job
{
[Key]
public int Id { get; set; }
[Required]
public string JobTypeId { get; set; }
public string DeviceSerialNumber { get; set; }
public string UserId { get; set; }
[Required]
public string OpenedTechUserId { get; set; }
public DateTime OpenedDate { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)]
public DateTime? ExpectedClosedDate { get; set; }
public string ClosedTechUserId { get; set; }
public DateTime? ClosedDate { get; set; }
public long? Flags { get; set; }
[Display(Name = "Technician Held Device")]
public DateTime? DeviceHeld { get; set; }
public string DeviceHeldTechUserId { get; set; }
[StringLength(100)]
public string DeviceHeldLocation { get; set; }
public DateTime? DeviceReadyForReturn { get; set; }
public string DeviceReadyForReturnTechUserId { get; set; }
public DateTime? DeviceReturnedDate { get; set; }
public string DeviceReturnedTechUserId { get; set; }
public DateTime? WaitingForUserAction { get; set; }
[ForeignKey("JobTypeId")]
public virtual JobType JobType { get; set; }
public virtual IList<JobSubType> JobSubTypes { get; set; }
[ForeignKey("DeviceSerialNumber")]
public virtual Device Device { get; set; }
[ForeignKey("UserId")]
public virtual User User { get; set; }
[ForeignKey("OpenedTechUserId")]
public virtual User OpenedTechUser { get; set; }
[ForeignKey("ClosedTechUserId")]
public virtual User ClosedTechUser { get; set; }
[ForeignKey("DeviceHeldTechUserId")]
public virtual User DeviceHeldTechUser { get; set; }
[ForeignKey("DeviceReadyForReturnTechUserId")]
public virtual User DeviceReadyForReturnTechUser { get; set; }
[ForeignKey("DeviceReturnedTechUserId")]
public virtual User DeviceReturnedTechUser { get; set; }
//// Added 2012-10-23 G# - DBv5 Migration
//public virtual IList<JobAssignment> JobAssignments { get; set; }
//// End Added 2012-10-23 G# - DBv5 Migration
public virtual IList<JobAttachment> JobAttachments { get; set; }
public virtual IList<JobComponent> JobComponents { get; set; }
public virtual IList<JobLog> JobLogs { get; set; }
public virtual JobMetaInsurance JobMetaInsurance { get; set; }
public virtual JobMetaWarranty JobMetaWarranty { get; set; }
public virtual JobMetaNonWarranty JobMetaNonWarranty { get; set; }
#region Helper Members
public decimal JobComponentsTotalCost()
{
if (this.JobComponents != null)
{
return this.JobComponents.Sum(jc => jc.Cost);
}
return decimal.Zero;
}
#endregion
public static class JobStatusIds
{
public const string AwaitingAccountingPayment = "AwaitingAccountingPayment";
public const string AwaitingAccountingCharge = "AwaitingAccountingCharge";
public const string AwaitingDeviceReturn = "AwaitingDeviceReturn";
public const string AwaitingInsuranceProcessing = "AwaitingInsuranceProcessing";
public const string AwaitingRepairs = "AwaitingRepairs";
public const string AwaitingUserAction = "AwaitingUserAction";
public const string AwaitingWarrantyRepair = "AwaitingWarrantyRepair";
public const string Closed = "Closed";
public const string Open = "Open";
}
[Flags]
public enum UserManagementFlags : long
{
[Display(GroupName = JobSubType.UserManagementJobSubTypes.Infringement, Name = "Content - Games")]
Infringement_ContentGames = 1,
[Display(GroupName = JobSubType.UserManagementJobSubTypes.Infringement, Name = "Content - Illegal")]
Infringement_ContentIllegal = 2,
[Display(GroupName = JobSubType.UserManagementJobSubTypes.Infringement, Name = "Content - Violence")]
Infringement_ContentViolence = 4,
[Display(GroupName = JobSubType.UserManagementJobSubTypes.Infringement, Name = "Content - Pornography")]
Infringement_ContentPornography = 8,
[Display(GroupName = JobSubType.UserManagementJobSubTypes.Infringement, Name = "Hacking")]
Infringement_Hacking = 16,
[Display(GroupName = JobSubType.UserManagementJobSubTypes.Infringement, Name = "Proxy Bypass")]
Infringement_ProxyBypass = 32,
[Display(GroupName = JobSubType.UserManagementJobSubTypes.Infringement, Name = "Breach Usage Agreement")]
Infringement_BreachUsageAgreement = 64,
[Display(GroupName = JobSubType.UserManagementJobSubTypes.Infringement, Name = "Breach Financial Agreement")]
Infringement_BreachFinancialAgreement = 128,
[Display(GroupName = JobSubType.UserManagementJobSubTypes.Contact, Name = "Phone")]
Contact_Phone = 4294967296,
[Display(GroupName = JobSubType.UserManagementJobSubTypes.Contact, Name = "Email")]
Contact_Email = 8589934592,
[Display(GroupName = JobSubType.UserManagementJobSubTypes.Contact, Name = "In Person")]
Contact_InPerson = 17179869184,
[Display(GroupName = JobSubType.UserManagementJobSubTypes.Contact, Name = "SMS")]
Contact_SMS = 34359738368,
[Display(GroupName = JobSubType.UserManagementJobSubTypes.Contact, Name = "Mail")]
Contact_Mail = 68719476736,
}
}
}
+30 -30
View File
@@ -1,30 +1,30 @@
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using System.ComponentModel.DataAnnotations;
//using System.ComponentModel.DataAnnotations.Schema;
//namespace Disco.Models.Repository
//{
// // Added 2012-10-23 G# - DBv5 Migration
// public class JobAssignment
// {
// [Key, Required, ColumnAttribute(Order = 0)]
// public int JobId { get; set; }
// [Key, Required, ColumnAttribute(Order = 1)]
// public string TechUserId { get; set; }
// [Key, Required, ColumnAttribute(Order = 2)]
// public DateTime AssignedDate { get; set; }
// public DateTime? UnassignedDate { get; set; }
// public DateTime? TargetCompletionDate { get; set; }
// [ForeignKey("JobId"), InverseProperty("JobAssignments")]
// public virtual Job Job { get; set; }
// [ForeignKey("TechUserId")]
// public User TechUser { get; set; }
// }
//}
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using System.ComponentModel.DataAnnotations;
//using System.ComponentModel.DataAnnotations.Schema;
//namespace Disco.Models.Repository
//{
// // Added 2012-10-23 G# - DBv5 Migration
// public class JobAssignment
// {
// [Key, Required, ColumnAttribute(Order = 0)]
// public int JobId { get; set; }
// [Key, Required, ColumnAttribute(Order = 1)]
// public string TechUserId { get; set; }
// [Key, Required, ColumnAttribute(Order = 2)]
// public DateTime AssignedDate { get; set; }
// public DateTime? UnassignedDate { get; set; }
// public DateTime? TargetCompletionDate { get; set; }
// [ForeignKey("JobId"), InverseProperty("JobAssignments")]
// public virtual Job Job { get; set; }
// [ForeignKey("TechUserId")]
// public User TechUser { get; set; }
// }
//}
+37 -37
View File
@@ -1,37 +1,37 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
public class JobAttachment
{
[Key]
public int Id { get; set; }
public int JobId { get; set; }
[Required]
public string TechUserId { get; set; }
[Required, StringLength(500)]
public string Filename { get; set; }
[Required, StringLength(500)]
public string MimeType { get; set; }
public DateTime Timestamp { get; set; }
[StringLength(500), Required]
public string Comments { get; set; }
public string DocumentTemplateId { get; set; }
[ForeignKey("JobId"), InverseProperty("JobAttachments")]
public virtual Job Job { get; set; }
[ForeignKey("TechUserId")]
public virtual User TechUser { get; set; }
[ForeignKey("DocumentTemplateId")]
public virtual DocumentTemplate DocumentTemplate { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
public class JobAttachment
{
[Key]
public int Id { get; set; }
public int JobId { get; set; }
[Required]
public string TechUserId { get; set; }
[Required, StringLength(500)]
public string Filename { get; set; }
[Required, StringLength(500)]
public string MimeType { get; set; }
public DateTime Timestamp { get; set; }
[StringLength(500), Required]
public string Comments { get; set; }
public string DocumentTemplateId { get; set; }
[ForeignKey("JobId"), InverseProperty("JobAttachments")]
public virtual Job Job { get; set; }
[ForeignKey("TechUserId")]
public virtual User TechUser { get; set; }
[ForeignKey("DocumentTemplateId")]
public virtual DocumentTemplate DocumentTemplate { get; set; }
}
}
+28 -28
View File
@@ -1,28 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
public class JobComponent
{
[Key]
public int Id { get; set; }
public int JobId { get; set; }
[Required]
public string TechUserId { get; set; }
[StringLength(500)]
public string Description { get; set; }
public decimal Cost { get; set; }
[ForeignKey("JobId")]
public virtual Job Job { get; set; }
[ForeignKey("TechUserId")]
public virtual User TechUser { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
public class JobComponent
{
[Key]
public int Id { get; set; }
public int JobId { get; set; }
[Required]
public string TechUserId { get; set; }
[StringLength(500)]
public string Description { get; set; }
public decimal Cost { get; set; }
[ForeignKey("JobId")]
public virtual Job Job { get; set; }
[ForeignKey("TechUserId")]
public virtual User TechUser { get; set; }
}
}
+28 -28
View File
@@ -1,28 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
public class JobLog
{
[Key]
public int Id { get; set; }
public int JobId { get; set; }
[Required]
public string TechUserId { get; set; }
public DateTime Timestamp { get; set; }
[Required]
public string Comments { get; set; }
[ForeignKey("JobId")]
public Job Job { get; set; }
[ForeignKey("TechUserId")]
public User TechUser { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
public class JobLog
{
[Key]
public int Id { get; set; }
public int JobId { get; set; }
[Required]
public string TechUserId { get; set; }
public DateTime Timestamp { get; set; }
[Required]
public string Comments { get; set; }
[ForeignKey("JobId")]
public Job Job { get; set; }
[ForeignKey("TechUserId")]
public User TechUser { get; set; }
}
}
@@ -1,68 +1,68 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
public class JobMetaInsurance
{
[Required, Key]
public int JobId { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)]
public DateTime? LossOrDamageDate { get; set; }
[StringLength(200)]
public string EventLocation { get; set; }
[DataType(DataType.MultilineText)]
public string Description { get; set; }
[Display(Name = "Caused by Third Party")]
public bool ThirdPartyCaused { get; set; }
[StringLength(200)]
public string ThirdPartyCausedName { get; set; }
[DataType(DataType.MultilineText), StringLength(600)]
public string ThirdPartyCausedWhy { get; set; }
[StringLength(1200), DataType(DataType.MultilineText)]
public string WitnessesNamesAddresses { get; set; }
[StringLength(200)]
public string BurglaryTheftMethodOfEntry { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)]
public DateTime? PropertyLastSeenDate { get; set; }
[Display(Name = "Police Notified")]
public bool PoliceNotified { get; set; }
[StringLength(200)]
public string PoliceNotifiedStation { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd}", HtmlEncode = false)]
public DateTime? PoliceNotifiedDate { get; set; }
[StringLength(400)]
public string PoliceNotifiedCrimeReportNo { get; set; }
[DataType(DataType.MultilineText), StringLength(800)]
public string RecoverReduceAction { get; set; }
[StringLength(500)]
public string OtherInterestedParties { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd}", HtmlEncode = false)]
public DateTime? DateOfPurchase { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)]
public DateTime? ClaimFormSentDate { get; set; }
public string ClaimFormSentUserId { get; set; }
[Required, ForeignKey("JobId")]
public virtual Job Job { get; set; }
[ForeignKey("ClaimFormSentUserId")]
public virtual User ClaimFormSentUser { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
public class JobMetaInsurance
{
[Required, Key]
public int JobId { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)]
public DateTime? LossOrDamageDate { get; set; }
[StringLength(200)]
public string EventLocation { get; set; }
[DataType(DataType.MultilineText)]
public string Description { get; set; }
[Display(Name = "Caused by Third Party")]
public bool ThirdPartyCaused { get; set; }
[StringLength(200)]
public string ThirdPartyCausedName { get; set; }
[DataType(DataType.MultilineText), StringLength(600)]
public string ThirdPartyCausedWhy { get; set; }
[StringLength(1200), DataType(DataType.MultilineText)]
public string WitnessesNamesAddresses { get; set; }
[StringLength(200)]
public string BurglaryTheftMethodOfEntry { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)]
public DateTime? PropertyLastSeenDate { get; set; }
[Display(Name = "Police Notified")]
public bool PoliceNotified { get; set; }
[StringLength(200)]
public string PoliceNotifiedStation { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd}", HtmlEncode = false)]
public DateTime? PoliceNotifiedDate { get; set; }
[StringLength(400)]
public string PoliceNotifiedCrimeReportNo { get; set; }
[DataType(DataType.MultilineText), StringLength(800)]
public string RecoverReduceAction { get; set; }
[StringLength(500)]
public string OtherInterestedParties { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd}", HtmlEncode = false)]
public DateTime? DateOfPurchase { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)]
public DateTime? ClaimFormSentDate { get; set; }
public string ClaimFormSentUserId { get; set; }
[Required, ForeignKey("JobId")]
public virtual Job Job { get; set; }
[ForeignKey("ClaimFormSentUserId")]
public virtual User ClaimFormSentUser { get; set; }
}
}
@@ -1,67 +1,67 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
public class JobMetaNonWarranty
{
[Key, Required]
public int JobId { get; set; }
public bool IsInsuranceClaim { get; set; }
// Feature Request 2012-05-10 by Michael E: https://disco.uservoice.com/forums/159707-feedback/suggestions/2811092-document-template-option-flatten-form-on-generate
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)]
public DateTime? AccountingChargeRequiredDate { get; set; }
[ForeignKey("AccountingChargeRequiredUserId")]
public virtual User AccountingChargeRequiredUser { get; set; }
public string AccountingChargeRequiredUserId { get; set; }
// End Feature Request
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)]
public DateTime? AccountingChargeAddedDate { get; set; }
[ForeignKey("AccountingChargeAddedUserId")]
public virtual User AccountingChargeAddedUser { get; set; }
public string AccountingChargeAddedUserId { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)]
public DateTime? AccountingChargePaidDate { get; set; }
[ForeignKey("AccountingChargePaidUserId")]
public virtual User AccountingChargePaidUser { get; set; }
public string AccountingChargePaidUserId { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)]
public DateTime? PurchaseOrderRaisedDate { get; set; }
[ForeignKey("PurchaseOrderRaisedUserId")]
public virtual User PurchaseOrderRaisedUser { get; set; }
public string PurchaseOrderRaisedUserId { get; set; }
[StringLength(20)]
public string PurchaseOrderReference { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)]
public DateTime? PurchaseOrderSentDate { get; set; }
[ForeignKey("PurchaseOrderSentUserId")]
public virtual User PurchaseOrderSentUser { get; set; }
public string PurchaseOrderSentUserId { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)]
public DateTime? InvoiceReceivedDate { get; set; }
[ForeignKey("InvoiceReceivedUserId")]
public virtual User InvoiceReceivedUser { get; set; }
public string InvoiceReceivedUserId { get; set; }
[StringLength(100)]
public string RepairerName { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)]
public DateTime? RepairerLoggedDate { get; set; }
[StringLength(100)]
public string RepairerReference { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)]
public DateTime? RepairerCompletedDate { get; set; }
[ForeignKey("JobId"), Required]
public virtual Job Job { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
public class JobMetaNonWarranty
{
[Key, Required]
public int JobId { get; set; }
public bool IsInsuranceClaim { get; set; }
// Feature Request 2012-05-10 by Michael E: https://disco.uservoice.com/forums/159707-feedback/suggestions/2811092-document-template-option-flatten-form-on-generate
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)]
public DateTime? AccountingChargeRequiredDate { get; set; }
[ForeignKey("AccountingChargeRequiredUserId")]
public virtual User AccountingChargeRequiredUser { get; set; }
public string AccountingChargeRequiredUserId { get; set; }
// End Feature Request
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)]
public DateTime? AccountingChargeAddedDate { get; set; }
[ForeignKey("AccountingChargeAddedUserId")]
public virtual User AccountingChargeAddedUser { get; set; }
public string AccountingChargeAddedUserId { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)]
public DateTime? AccountingChargePaidDate { get; set; }
[ForeignKey("AccountingChargePaidUserId")]
public virtual User AccountingChargePaidUser { get; set; }
public string AccountingChargePaidUserId { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)]
public DateTime? PurchaseOrderRaisedDate { get; set; }
[ForeignKey("PurchaseOrderRaisedUserId")]
public virtual User PurchaseOrderRaisedUser { get; set; }
public string PurchaseOrderRaisedUserId { get; set; }
[StringLength(20)]
public string PurchaseOrderReference { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)]
public DateTime? PurchaseOrderSentDate { get; set; }
[ForeignKey("PurchaseOrderSentUserId")]
public virtual User PurchaseOrderSentUser { get; set; }
public string PurchaseOrderSentUserId { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)]
public DateTime? InvoiceReceivedDate { get; set; }
[ForeignKey("InvoiceReceivedUserId")]
public virtual User InvoiceReceivedUser { get; set; }
public string InvoiceReceivedUserId { get; set; }
[StringLength(100)]
public string RepairerName { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)]
public DateTime? RepairerLoggedDate { get; set; }
[StringLength(100)]
public string RepairerReference { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)]
public DateTime? RepairerCompletedDate { get; set; }
[ForeignKey("JobId"), Required]
public virtual Job Job { get; set; }
}
}
@@ -1,27 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
public class JobMetaWarranty
{
[Required, Key]
public int JobId { get; set; }
[StringLength(100)]
public string ExternalName { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)]
public DateTime? ExternalLoggedDate { get; set; }
[StringLength(100)]
public string ExternalReference { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)]
public DateTime? ExternalCompletedDate { get; set; }
[ForeignKey("JobId"), Required]
public virtual Job Job { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
public class JobMetaWarranty
{
[Required, Key]
public int JobId { get; set; }
[StringLength(100)]
public string ExternalName { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)]
public DateTime? ExternalLoggedDate { get; set; }
[StringLength(100)]
public string ExternalReference { get; set; }
[DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)]
public DateTime? ExternalCompletedDate { get; set; }
[ForeignKey("JobId"), Required]
public virtual Job Job { get; set; }
}
}
+37 -37
View File
@@ -1,37 +1,37 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
public class JobSubType
{
[Key, StringLength(20), Column(Order = 0)]
public string Id { get; set; }
[Key, Required, Column(Order = 1)]
public string JobTypeId { get; set; }
[Required, StringLength(100)]
public string Description { get; set; }
public virtual IList<DocumentTemplate> AttachmentTypes { get; set; }
public virtual IList<DeviceComponent> DeviceComponents { get; set; }
[ForeignKey("JobTypeId")]
public virtual JobType JobType { get; set; }
public virtual IList<Job> Jobs { get; set; }
public static class UserManagementJobSubTypes
{
public const string Infringement = "Infringement";
public const string Contact = "Contact";
}
public override string ToString()
{
return this.Description;
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
public class JobSubType
{
[Key, StringLength(20), Column(Order = 0)]
public string Id { get; set; }
[Key, Required, Column(Order = 1)]
public string JobTypeId { get; set; }
[Required, StringLength(100)]
public string Description { get; set; }
public virtual IList<DocumentTemplate> AttachmentTypes { get; set; }
public virtual IList<DeviceComponent> DeviceComponents { get; set; }
[ForeignKey("JobTypeId")]
public virtual JobType JobType { get; set; }
public virtual IList<Job> Jobs { get; set; }
public static class UserManagementJobSubTypes
{
public const string Infringement = "Infringement";
public const string Contact = "Contact";
}
public override string ToString()
{
return this.Description;
}
}
}
+34 -34
View File
@@ -1,34 +1,34 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
namespace Disco.Models.Repository
{
public class JobType
{
[StringLength(5), Key]
public string Id { get; set; }
[StringLength(100)]
public string Description { get; set; }
public virtual IList<JobSubType> JobSubTypes { get; set; }
public override string ToString()
{
return this.Description;
}
public static class JobTypeIds
{
public const string HMisc = "HMisc";
public const string HNWar = "HNWar";
public const string HWar = "HWar";
public const string SApp = "SApp";
public const string SImg = "SImg";
public const string SOS = "SOS";
public const string UMgmt = "UMgmt";
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
namespace Disco.Models.Repository
{
public class JobType
{
[StringLength(5), Key]
public string Id { get; set; }
[StringLength(100)]
public string Description { get; set; }
public virtual IList<JobSubType> JobSubTypes { get; set; }
public override string ToString()
{
return this.Description;
}
public static class JobTypeIds
{
public const string HMisc = "HMisc";
public const string HNWar = "HNWar";
public const string HWar = "HWar";
public const string SApp = "SApp";
public const string SImg = "SImg";
public const string SOS = "SOS";
public const string UMgmt = "UMgmt";
}
}
}
+79 -79
View File
@@ -1,79 +1,79 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
public class User
{
[StringLength(50), Key]
public string Id { get; set; }
[StringLength(200)]
public string DisplayName { get; set; }
[StringLength(200)]
public string Surname { get; set; }
[StringLength(200)]
public string GivenName { get; set; }
[StringLength(8)]
public string Type { get; set; }
[StringLength(100)]
public string PhoneNumber { get; set; }
[StringLength(150)]
public string EmailAddress { get; set; }
public virtual IList<UserDetail> UserDetails { get; set; }
public virtual IList<UserAttachment> UserAttachments { get; set; }
public virtual IList<DeviceUserAssignment> DeviceUserAssignments { get; set; }
[InverseProperty("UserId")]
public virtual IList<Job> Jobs { get; set; }
//#region Helper Members
//[NotMapped, XmlIgnore, ScriptIgnore]
//public List<DeviceUserAssignment> CurrentDeviceUserAssignments
//{
// get
// {
// return this.DeviceUserAssignments.Where(dua => !dua.UnassignedDate.HasValue).ToList();
// }
//}
//#endregion
public override string ToString()
{
return string.Format("{0} ({1})", this.DisplayName, this.Id);
}
public void UpdateSelf(User u)
{
if (!this.Id.Equals(u.Id, StringComparison.InvariantCultureIgnoreCase))
throw new ArgumentException("User Id's do not match", "u");
if (this.Surname != u.Surname)
this.Surname = u.Surname;
if (this.GivenName != u.GivenName)
this.GivenName = u.GivenName;
if (this.DisplayName != u.DisplayName)
this.DisplayName = u.DisplayName;
if (this.EmailAddress != u.EmailAddress)
this.EmailAddress = u.EmailAddress;
if (this.PhoneNumber != u.PhoneNumber)
this.PhoneNumber = u.PhoneNumber;
if (this.Type != u.Type)
this.Type = u.Type;
}
public static class Types
{
public const string Admin = "Admin";
public const string Computer = "Computer";
public const string Staff = "Staff";
public const string Student = "Student";
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
public class User
{
[StringLength(50), Key]
public string Id { get; set; }
[StringLength(200)]
public string DisplayName { get; set; }
[StringLength(200)]
public string Surname { get; set; }
[StringLength(200)]
public string GivenName { get; set; }
[StringLength(8)]
public string Type { get; set; }
[StringLength(100)]
public string PhoneNumber { get; set; }
[StringLength(150)]
public string EmailAddress { get; set; }
public virtual IList<UserDetail> UserDetails { get; set; }
public virtual IList<UserAttachment> UserAttachments { get; set; }
public virtual IList<DeviceUserAssignment> DeviceUserAssignments { get; set; }
[InverseProperty("UserId")]
public virtual IList<Job> Jobs { get; set; }
//#region Helper Members
//[NotMapped, XmlIgnore, ScriptIgnore]
//public List<DeviceUserAssignment> CurrentDeviceUserAssignments
//{
// get
// {
// return this.DeviceUserAssignments.Where(dua => !dua.UnassignedDate.HasValue).ToList();
// }
//}
//#endregion
public override string ToString()
{
return string.Format("{0} ({1})", this.DisplayName, this.Id);
}
public void UpdateSelf(User u)
{
if (!this.Id.Equals(u.Id, StringComparison.InvariantCultureIgnoreCase))
throw new ArgumentException("User Id's do not match", "u");
if (this.Surname != u.Surname)
this.Surname = u.Surname;
if (this.GivenName != u.GivenName)
this.GivenName = u.GivenName;
if (this.DisplayName != u.DisplayName)
this.DisplayName = u.DisplayName;
if (this.EmailAddress != u.EmailAddress)
this.EmailAddress = u.EmailAddress;
if (this.PhoneNumber != u.PhoneNumber)
this.PhoneNumber = u.PhoneNumber;
if (this.Type != u.Type)
this.Type = u.Type;
}
public static class Types
{
public const string Admin = "Admin";
public const string Computer = "Computer";
public const string Staff = "Staff";
public const string Student = "Student";
}
}
}
+36 -36
View File
@@ -1,36 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
public class UserAttachment
{
[Key]
public int Id { get; set; }
public string UserId { get; set; }
[Required]
public string TechUserId { get; set; }
[Required, StringLength(500)]
public string Filename { get; set; }
[StringLength(500), Required]
public string MimeType { get; set; }
public DateTime Timestamp { get; set; }
[Required, StringLength(500)]
public string Comments { get; set; }
public string DocumentTemplateId { get; set; }
[ForeignKey("UserId"), InverseProperty("UserAttachments")]
public virtual User User { get; set; }
[ForeignKey("TechUserId")]
public virtual User TechUser { get; set; }
[ForeignKey("DocumentTemplateId")]
public virtual DocumentTemplate DocumentTemplate { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
public class UserAttachment
{
[Key]
public int Id { get; set; }
public string UserId { get; set; }
[Required]
public string TechUserId { get; set; }
[Required, StringLength(500)]
public string Filename { get; set; }
[StringLength(500), Required]
public string MimeType { get; set; }
public DateTime Timestamp { get; set; }
[Required, StringLength(500)]
public string Comments { get; set; }
public string DocumentTemplateId { get; set; }
[ForeignKey("UserId"), InverseProperty("UserAttachments")]
public virtual User User { get; set; }
[ForeignKey("TechUserId")]
public virtual User TechUser { get; set; }
[ForeignKey("DocumentTemplateId")]
public virtual DocumentTemplate DocumentTemplate { get; set; }
}
}
+26 -26
View File
@@ -1,26 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
public class UserDetail
{
[Key, Column(Order = 0)]
public string UserId { get; set; }
[Column(Order = 1), Key, StringLength(100)]
public string Scope { get; set; }
[Key, Column(Order = 2), StringLength(100)]
public string Key { get; set; }
public string Value { get; set; }
[ForeignKey("UserId")]
public virtual User User { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Disco.Models.Repository
{
public class UserDetail
{
[Key, Column(Order = 0)]
public string UserId { get; set; }
[Column(Order = 1), Key, StringLength(100)]
public string Scope { get; set; }
[Key, Column(Order = 2), StringLength(100)]
public string Key { get; set; }
public string Value { get; set; }
[ForeignKey("UserId")]
public virtual User User { get; set; }
}
}