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
+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; }
}
}