Pdf Import Rewrite
Pdf Import rewritten to greatly improve QR Code detection, reduce reliance on iTextSharp and improve thumbnails. Fixes #50
This commit is contained in:
@@ -7,7 +7,7 @@ using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Disco.Models.Repository
|
||||
{
|
||||
public class User
|
||||
public class User : IAttachmentTarget
|
||||
{
|
||||
[StringLength(50), Key, Column("Id")]
|
||||
public string UserId { get; set; }
|
||||
@@ -60,6 +60,12 @@ namespace Disco.Models.Repository
|
||||
}
|
||||
}
|
||||
|
||||
[NotMapped]
|
||||
public string AttachmentReferenceId { get { return UserId; } }
|
||||
|
||||
[NotMapped]
|
||||
public AttachmentTypes HasAttachmentType { get { return AttachmentTypes.User; } }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0} ({1})", this.DisplayName, this.UserId);
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
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
|
||||
public class UserAttachment : IAttachment
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
@@ -24,6 +21,12 @@ namespace Disco.Models.Repository
|
||||
|
||||
public string DocumentTemplateId { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public object Reference { get { return UserId; } }
|
||||
|
||||
[NotMapped]
|
||||
public AttachmentTypes AttachmentType { get { return AttachmentTypes.User; } }
|
||||
|
||||
[ForeignKey("UserId"), InverseProperty("UserAttachments")]
|
||||
public virtual User User { get; set; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user