GIT: perform LF normalization
This commit is contained in:
@@ -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; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
@@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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; }
|
||||
// }
|
||||
//}
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user