qol: formatting
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
|
||||
namespace Disco.Models.Repository
|
||||
{
|
||||
@@ -51,7 +51,7 @@ namespace Disco.Models.Repository
|
||||
[InverseProperty(nameof(Job.Device))]
|
||||
public virtual IList<Job> Jobs { get; set; }
|
||||
public virtual IList<DeviceFlagAssignment> DeviceFlagAssignments { get; set; }
|
||||
|
||||
|
||||
[InverseProperty(nameof(DeviceComment.Device))]
|
||||
public virtual IList<DeviceComment> DeviceComments { get; set; }
|
||||
|
||||
|
||||
@@ -15,10 +15,10 @@ namespace Disco.Models.Repository
|
||||
public DateTime Timestamp { get; set; }
|
||||
[Required]
|
||||
public string Comments { get; set; }
|
||||
|
||||
|
||||
[ForeignKey(nameof(DeviceSerialNumber))]
|
||||
public Device Device { get; set; }
|
||||
|
||||
|
||||
[ForeignKey(nameof(TechUserId))]
|
||||
public User TechUser { get; set; }
|
||||
}
|
||||
|
||||
@@ -12,10 +12,10 @@ namespace Disco.Models.Repository
|
||||
[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; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,13 +24,13 @@ namespace Disco.Models.Repository
|
||||
|
||||
[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")]
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace Disco.Models.Repository
|
||||
// 2012-06-14 G#
|
||||
[Required, DataType(DataType.MultilineText)]
|
||||
public string ComputerNameTemplate { get; set; }
|
||||
|
||||
|
||||
[Required]
|
||||
public DistributionTypes? DistributionType { get; set; }
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
|
||||
namespace Disco.Models.Repository
|
||||
{
|
||||
|
||||
@@ -41,6 +41,6 @@ namespace Disco.Models.Repository
|
||||
public virtual User TechUser { get; set; }
|
||||
|
||||
[ForeignKey("DocumentTemplateId")]
|
||||
public virtual DocumentTemplate DocumentTemplate { get; set; }
|
||||
public virtual DocumentTemplate DocumentTemplate { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,10 +14,10 @@ namespace Disco.Models.Repository
|
||||
[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; }
|
||||
}
|
||||
|
||||
@@ -15,10 +15,10 @@ namespace Disco.Models.Repository
|
||||
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; }
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace Disco.Models.Repository
|
||||
public string Insurer { get; set; }
|
||||
[StringLength(200)]
|
||||
public string InsurerReference { get; set; }
|
||||
|
||||
|
||||
[Required, ForeignKey("JobId")]
|
||||
public virtual Job Job { get; set; }
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace Disco.Models.Repository
|
||||
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; }
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Disco.Models.Repository
|
||||
public string Id { get; set; }
|
||||
[StringLength(100)]
|
||||
public string Description { get; set; }
|
||||
|
||||
|
||||
public virtual IList<JobSubType> JobSubTypes { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
|
||||
@@ -12,13 +12,13 @@ namespace Disco.Models.Repository
|
||||
public int JobQueueId { get; set; }
|
||||
[Required]
|
||||
public int JobId { get; set; }
|
||||
|
||||
|
||||
[Required]
|
||||
public DateTime AddedDate { get; set; }
|
||||
[Required]
|
||||
public string AddedUserId { get; set; }
|
||||
public string AddedComment { get; set; }
|
||||
|
||||
|
||||
public DateTime? RemovedDate { get; set; }
|
||||
public string RemovedUserId { get; set; }
|
||||
public string RemovedComment { get; set; }
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace Disco.Models.Repository
|
||||
return DomainUsername;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[NotMapped]
|
||||
public string DomainUsername
|
||||
{
|
||||
|
||||
@@ -15,10 +15,10 @@ namespace Disco.Models.Repository
|
||||
public DateTime Timestamp { get; set; }
|
||||
[Required]
|
||||
public string Comments { get; set; }
|
||||
|
||||
|
||||
[ForeignKey(nameof(UserId))]
|
||||
public User User { get; set; }
|
||||
|
||||
|
||||
[ForeignKey(nameof(TechUserId))]
|
||||
public User TechUser { get; set; }
|
||||
}
|
||||
|
||||
@@ -7,10 +7,10 @@ namespace Disco.Models.Repository
|
||||
{
|
||||
[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; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user