2025-10-31 22:16:46 +00:00
|
|
|
using System;
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
namespace Kurs.Platform.Entities;
|
|
|
|
|
|
|
|
|
|
public class Partner : FullAuditedEntity<Guid>, IMultiTenant
|
|
|
|
|
{
|
|
|
|
|
public Guid? TenantId { get; set; }
|
|
|
|
|
|
|
|
|
|
public string Code { get; set; }
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
2025-11-01 08:16:20 +00:00
|
|
|
public PartnerType PartyType { get; set; }
|
|
|
|
|
|
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; }
|
|
|
|
|
public string Street { get; set; }
|
|
|
|
|
public string Address1 { get; set; }
|
|
|
|
|
public string Address2 { get; set; }
|
|
|
|
|
public string PostalCode { get; set; }
|
2025-11-03 20:31:28 +00:00
|
|
|
public long MobileNumber { get; set; }
|
|
|
|
|
public long? PhoneNumber { get; set; }
|
|
|
|
|
public long? 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
|
|
|
|
|
|
|
|
public PartnerStatus Status { get; set; }
|
|
|
|
|
|
|
|
|
|
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; }
|
|
|
|
|
|
|
|
|
|
public Guid? AssignedEmployeeId { get; set; }
|
|
|
|
|
public Employee? AssignedEmployee { get; set; }
|
|
|
|
|
|
|
|
|
|
public string? TeamCode { get; set; } // Organization Unit Code
|
|
|
|
|
|
|
|
|
|
public decimal TotalRevenue { get; set; } // Toplam Gelir
|
|
|
|
|
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; }
|
|
|
|
|
}
|