2025-11-11 19:49:52 +00:00
|
|
|
|
using System;
|
2025-10-31 22:16:46 +00:00
|
|
|
|
using System.Collections.Generic;
|
2025-11-01 08:16:20 +00:00
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
|
|
using System.Text.Json;
|
2025-10-31 22:16:46 +00:00
|
|
|
|
using Volo.Abp.Domain.Entities.Auditing;
|
|
|
|
|
|
using Volo.Abp.MultiTenancy;
|
|
|
|
|
|
|
2025-11-11 19:49:52 +00:00
|
|
|
|
namespace Erp.Platform.Entities;
|
2025-10-31 22:16:46 +00:00
|
|
|
|
|
|
|
|
|
|
public class Partner : FullAuditedEntity<Guid>, IMultiTenant
|
|
|
|
|
|
{
|
|
|
|
|
|
public Guid? TenantId { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public string Code { get; set; }
|
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
|
2025-11-12 12:59:31 +00:00
|
|
|
|
public string PartyType { get; set; }
|
2025-11-01 08:16:20 +00:00
|
|
|
|
|
2025-10-31 22:16:46 +00:00
|
|
|
|
public Guid? SectorId { get; set; }
|
|
|
|
|
|
public Sector? Sector { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public long TaxNumber { get; set; }
|
|
|
|
|
|
public string? TaxOffice { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public string Country { get; set; }
|
|
|
|
|
|
public string City { get; set; }
|
|
|
|
|
|
public string District { get; set; }
|
2025-11-20 07:07:31 +00:00
|
|
|
|
public string Township { get; set; }
|
2025-10-31 22:16:46 +00:00
|
|
|
|
public string Address1 { get; set; }
|
|
|
|
|
|
public string Address2 { get; set; }
|
|
|
|
|
|
public string PostalCode { get; set; }
|
2025-11-11 11:50:54 +00:00
|
|
|
|
public string MobileNumber { get; set; }
|
|
|
|
|
|
public string PhoneNumber { get; set; }
|
|
|
|
|
|
public string FaxNumber { get; set; }
|
2025-10-31 22:16:46 +00:00
|
|
|
|
public string Email { get; set; }
|
|
|
|
|
|
public string Website { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public Guid? CurrencyId { get; set; }
|
|
|
|
|
|
public Currency? Currency { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public Guid? PaymentTermId { get; set; }
|
|
|
|
|
|
public PaymentTerm? PaymentTerm { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public decimal CreditLimit { get; set; }
|
2025-11-01 08:16:20 +00:00
|
|
|
|
public DateTime? LastOrderDate { get; set; }
|
2025-10-31 22:16:46 +00:00
|
|
|
|
|
2025-11-12 12:59:31 +00:00
|
|
|
|
public string Status { get; set; }
|
2025-10-31 22:16:46 +00:00
|
|
|
|
|
|
|
|
|
|
public ICollection<PartnerBank> Banks { get; set; }
|
2025-11-01 08:16:20 +00:00
|
|
|
|
public ICollection<PartnerCertificate> Certificates { get; set; }
|
2025-10-31 22:16:46 +00:00
|
|
|
|
public ICollection<PartnerContact> Contacts { get; set; }
|
|
|
|
|
|
|
2025-11-01 08:16:20 +00:00
|
|
|
|
//Customer ile ilgil bilgiler
|
|
|
|
|
|
public Guid? CustomerTypeId { get; set; }
|
|
|
|
|
|
public CustomerType? CustomerType { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public Guid? CustomerSegmentId { get; set; }
|
|
|
|
|
|
public CustomerSegment? CustomerSegment { get; set; }
|
|
|
|
|
|
|
2025-11-13 21:28:39 +00:00
|
|
|
|
public Guid? EmployeeId { get; set; }
|
|
|
|
|
|
public Employee? Employee { get; set; }
|
2025-11-01 08:16:20 +00:00
|
|
|
|
|
|
|
|
|
|
public string? TeamCode { get; set; } // Organization Unit Code
|
|
|
|
|
|
|
|
|
|
|
|
public decimal TotalRevenue { get; set; } // Toplam Gelir
|
2025-11-12 12:59:31 +00:00
|
|
|
|
public decimal AverageOrderValue { get; set; } // Ortalama Sipariş Değeri
|
|
|
|
|
|
public decimal LifetimeValue { get; set; } // Müşteri Ömrü Değeri
|
2025-10-31 22:16:46 +00:00
|
|
|
|
|
2025-11-01 08:16:20 +00:00
|
|
|
|
//Supplier ile ilgili bilgiler
|
|
|
|
|
|
public Guid? SupplierTypeId { get; set; }
|
|
|
|
|
|
public SupplyType? SupplierType { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public Guid? SupplyCardTypeId { get; set; }
|
|
|
|
|
|
public SupplyCardType? SupplyCardType { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public string? CardNumber { get; set; }
|
|
|
|
|
|
public DateTime? ValidFrom { get; set; }
|
|
|
|
|
|
public DateTime? ValidTo { get; set; }
|
|
|
|
|
|
public decimal CurrentBalance { get; set; }
|
|
|
|
|
|
public decimal DiscountRate { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public string? PerformanceMetricsJson { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public PerformanceMetrics PerformanceMetrics
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
if (!string.IsNullOrEmpty(PerformanceMetricsJson))
|
|
|
|
|
|
return JsonSerializer.Deserialize<PerformanceMetrics>(PerformanceMetricsJson);
|
|
|
|
|
|
|
|
|
|
|
|
return new PerformanceMetrics();
|
|
|
|
|
|
}
|
|
|
|
|
|
set { PerformanceMetricsJson = JsonSerializer.Serialize(value); }
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[NotMapped]
|
|
|
|
|
|
public class PerformanceMetrics
|
|
|
|
|
|
{
|
|
|
|
|
|
public int DeliveryPerformance { get; set; }
|
|
|
|
|
|
public int QualityRating { get; set; }
|
|
|
|
|
|
public int PriceCompetitiveness { get; set; }
|
|
|
|
|
|
public int Responsiveness { get; set; }
|
|
|
|
|
|
public int ComplianceRating { get; set; }
|
|
|
|
|
|
public int OverallScore { get; set; }
|
|
|
|
|
|
public DateTime LastEvaluationDate { get; set; }
|
2025-11-11 19:49:52 +00:00
|
|
|
|
}
|