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 Job
|
||||
public class Job : IAttachmentTarget
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
@@ -75,6 +75,12 @@ namespace Disco.Models.Repository
|
||||
public virtual JobMetaWarranty JobMetaWarranty { get; set; }
|
||||
public virtual JobMetaNonWarranty JobMetaNonWarranty { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public string AttachmentReferenceId { get { return Id.ToString(); } }
|
||||
|
||||
[NotMapped]
|
||||
public AttachmentTypes HasAttachmentType { get { return AttachmentTypes.Job; } }
|
||||
|
||||
#region Helper Members
|
||||
public decimal JobComponentsTotalCost()
|
||||
{
|
||||
@@ -86,6 +92,11 @@ namespace Disco.Models.Repository
|
||||
}
|
||||
#endregion
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"Job #{Id}";
|
||||
}
|
||||
|
||||
public static class JobStatusIds
|
||||
{
|
||||
public const string AwaitingAccountingPayment = "AwaitingAccountingPayment";
|
||||
|
||||
@@ -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 JobAttachment
|
||||
public class JobAttachment : IAttachment
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
@@ -25,6 +22,12 @@ namespace Disco.Models.Repository
|
||||
|
||||
public string DocumentTemplateId { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public object Reference { get { return JobId; } }
|
||||
|
||||
[NotMapped]
|
||||
public AttachmentTypes AttachmentType { get { return AttachmentTypes.Job; } }
|
||||
|
||||
[ForeignKey("JobId"), InverseProperty("JobAttachments")]
|
||||
public virtual Job Job { get; set; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user