Initial commit
This commit is contained in:
@@ -0,0 +1,91 @@
|
||||
namespace PowderCoating.Core.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// Company-specific application and workflow preferences
|
||||
/// </summary>
|
||||
public class CompanyPreferences : BaseEntity
|
||||
{
|
||||
public int CompanyId { get; set; }
|
||||
|
||||
// Application Defaults
|
||||
public string DefaultCurrency { get; set; } = "USD";
|
||||
public string DefaultDateFormat { get; set; } = "MM/dd/yyyy";
|
||||
public string DefaultTimeFormat { get; set; } = "12h";
|
||||
public string DefaultPaymentTerms { get; set; } = "Net 30";
|
||||
public int DefaultQuoteValidityDays { get; set; } = 30;
|
||||
public string QuoteNumberPrefix { get; set; } = "QT";
|
||||
public string JobNumberPrefix { get; set; } = "JOB";
|
||||
public string InvoiceNumberPrefix { get; set; } = "INV";
|
||||
public bool UseMetricSystem { get; set; } = false; // False = Imperial (ft, lb), True = Metric (m, kg)
|
||||
|
||||
// Job / Workflow Defaults
|
||||
public string DefaultJobPriority { get; set; } = "Normal";
|
||||
public bool RequireCustomerPO { get; set; } = false;
|
||||
public bool AllowCustomerApproval { get; set; } = true;
|
||||
public int DefaultTurnaroundDays { get; set; } = 7;
|
||||
// Email Sender Identity
|
||||
/// <summary>From address used in outgoing emails. Falls back to SendGrid:FromEmail in appsettings when null.</summary>
|
||||
public string? EmailFromAddress { get; set; }
|
||||
/// <summary>From display name used in outgoing emails. Falls back to SendGrid:FromName in appsettings when null.</summary>
|
||||
public string? EmailFromName { get; set; }
|
||||
|
||||
// Notifications & Alerts
|
||||
public bool EmailNotificationsEnabled { get; set; } = true;
|
||||
public bool NotifyOnNewJob { get; set; } = true;
|
||||
public bool NotifyOnNewQuote { get; set; } = true;
|
||||
public bool NotifyOnJobStatusChange { get; set; } = true;
|
||||
public bool NotifyOnQuoteApproval { get; set; } = true;
|
||||
public bool NotifyOnPaymentReceived { get; set; } = true;
|
||||
public int QuoteExpiryWarningDays { get; set; } = 3;
|
||||
public int DueDateWarningDays { get; set; } = 2;
|
||||
public int MaintenanceAlertDays { get; set; } = 7;
|
||||
|
||||
// Payment Reminders
|
||||
/// <summary>When true, the background service will send overdue payment reminder emails.</summary>
|
||||
public bool PaymentRemindersEnabled { get; set; } = false;
|
||||
/// <summary>Comma-separated days-past-due thresholds at which reminders are sent (e.g. "7,14,30").</summary>
|
||||
public string PaymentReminderDays { get; set; } = "7,14,30";
|
||||
|
||||
// Data Retention
|
||||
public int QuoteRetentionYears { get; set; } = 7;
|
||||
public int JobRetentionYears { get; set; } = 7;
|
||||
public int LogRetentionDays { get; set; } = 90;
|
||||
public int AutoArchiveJobsDays { get; set; } = 365;
|
||||
public int DeletedRecordRetentionDays { get; set; } = 30;
|
||||
|
||||
// Quote PDF Template
|
||||
public string QtAccentColor { get; set; } = "#374151";
|
||||
public string? QtDefaultTerms { get; set; }
|
||||
public string? QtFooterNote { get; set; }
|
||||
|
||||
// Invoice PDF Template
|
||||
public string InAccentColor { get; set; } = "#374151";
|
||||
public string? InDefaultTerms { get; set; }
|
||||
public string? InFooterNote { get; set; }
|
||||
|
||||
// Blank Work Order PDF Template
|
||||
public string WoAccentColor { get; set; } = "#374151";
|
||||
public string? WoTerms { get; set; }
|
||||
|
||||
// Setup Wizard Progress
|
||||
public bool SetupWizardStarted { get; set; } = false;
|
||||
public bool SetupWizardCompleted { get; set; } = false;
|
||||
/// <summary>Comma-separated step numbers that have been completed (e.g. "1,2,3")</summary>
|
||||
public string? SetupWizardDoneSteps { get; set; }
|
||||
/// <summary>Comma-separated step numbers the user chose to skip</summary>
|
||||
public string? SetupWizardSkippedSteps { get; set; }
|
||||
/// <summary>UTC timestamp of when the setup wizard was completed. Null if not yet completed.</summary>
|
||||
public DateTime? SetupWizardCompletedAt { get; set; }
|
||||
/// <summary>ASP.NET Identity user ID of the user who completed the setup wizard.</summary>
|
||||
public string? SetupWizardCompletedByUserId { get; set; }
|
||||
/// <summary>Display name of the user who completed the setup wizard, stored at completion time
|
||||
/// to avoid a runtime JOIN to the Identity tables when listing companies.</summary>
|
||||
public string? SetupWizardCompletedByName { get; set; }
|
||||
/// <summary>True when the company indicated they are migrating data from QuickBooks Desktop.</summary>
|
||||
public bool MigratingFromQuickBooks { get; set; } = false;
|
||||
/// <summary>JSON blob persisting QB Migration Wizard step state across sessions.</summary>
|
||||
public string? QbMigrationStateJson { get; set; }
|
||||
|
||||
// Navigation
|
||||
public virtual Company Company { get; set; } = null!;
|
||||
}
|
||||
Reference in New Issue
Block a user