BusinessParty Entity çalışması

This commit is contained in:
Sedat Öztürk 2025-11-01 01:16:46 +03:00
parent c7ae1c5c14
commit 84b9ea23b0
22 changed files with 3650 additions and 103 deletions

View file

@ -136,5 +136,16 @@ public enum TableNameEnum
SocialComment, SocialComment,
SocialLike, SocialLike,
MaterialType, MaterialType,
MaterialGroup MaterialGroup,
PaymentTerm,
Partner,
PartnerBank,
PartnerCertificate,
PartnerContact,
SupplyType,
SupplyCardType,
Supply,
CustomerType,
CustomerSegment,
Customer
} }

View file

@ -88,6 +88,9 @@ public static class TableNameResolver
{ nameof(TableNameEnum.BlogPost), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, { nameof(TableNameEnum.BlogPost), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) },
{ nameof(TableNameEnum.Demo), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, { nameof(TableNameEnum.Demo), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) },
{ nameof(TableNameEnum.Contact), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, { nameof(TableNameEnum.Contact), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) },
{ nameof(TableNameEnum.PartnerBank), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) },
{ nameof(TableNameEnum.PartnerCertificate), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) },
{ nameof(TableNameEnum.PartnerContact), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) },
// 🔹 PARTICIPANT // 🔹 PARTICIPANT
{ nameof(TableNameEnum.Interesting), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Participant) }, { nameof(TableNameEnum.Interesting), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Participant) },
@ -160,6 +163,15 @@ public static class TableNameResolver
//Supply Chain //Supply Chain
{ nameof(TableNameEnum.MaterialType), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.SupplyChain) }, { nameof(TableNameEnum.MaterialType), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
{ nameof(TableNameEnum.MaterialGroup), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.SupplyChain) }, { nameof(TableNameEnum.MaterialGroup), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
{ nameof(TableNameEnum.PaymentTerm), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
{ nameof(TableNameEnum.SupplyType), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
{ nameof(TableNameEnum.SupplyCardType), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
{ nameof(TableNameEnum.Supply), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
//Crm
{ nameof(TableNameEnum.Customer), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Crm) },
{ nameof(TableNameEnum.CustomerSegment), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Crm) },
{ nameof(TableNameEnum.CustomerType), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Crm) },
// 🔹 ACCOUNTING // 🔹 ACCOUNTING
{ nameof(TableNameEnum.Bank), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Accounting) }, { nameof(TableNameEnum.Bank), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Accounting) },

View file

@ -0,0 +1,23 @@
using System;
namespace Kurs.Platform.Entities;
public class Customer : Partner
{
public PartnerType PartyType { get; set; } = PartnerType.Customer;
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
}

View file

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;
namespace Kurs.Platform.Entities;
public class CustomerSegment : FullAuditedEntity<Guid>, IMultiTenant
{
public Guid? TenantId { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public bool IsActive { get; set; }
public ICollection<Customer> Customers { get; set; }
}

View file

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;
namespace Kurs.Platform.Entities;
public class CustomerType : FullAuditedEntity<Guid>, IMultiTenant
{
public Guid? TenantId { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public bool IsActive { get; set; }
public ICollection<Customer> Customers { get; set; }
}

View file

@ -1,4 +1,3 @@
// Domain/Entities/MmMaterialType.cs
using System; using System;
using Volo.Abp.Domain.Entities.Auditing; using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy; using Volo.Abp.MultiTenancy;

View file

@ -0,0 +1,50 @@
using System;
using System.Collections.Generic;
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; }
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; }
public string Phone { get; set; }
public string Mobile { get; set; }
public string Fax { get; set; }
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; }
public DateTime LastOrderDate { get; set; }
public PartnerStatus Status { get; set; }
public ICollection<PartnerCertificate> Certificates { get; set; }
public ICollection<PartnerBank> Banks { get; set; }
public ICollection<PartnerContact> Contacts { get; set; }
}

View file

@ -0,0 +1,29 @@
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;
namespace Kurs.Platform.Entities;
public class PartnerBank : FullAuditedEntity<Guid>, IMultiTenant
{
public Guid? TenantId { get; set; }
public Guid PartnerId { get; set; }
public Partner Partner { get; set; }
public string BankName { get; set; }
public string AccountNumber { get; set; } //Hesap Numarası
public string Iban { get; set; } //IBAN
public string SwiftCode { get; set; } //BIC
public string AccountOwner { get; set; } //Hesap Sahibi
public string BranchName { get; set; } //Şube Adı
public string AccountType { get; set; } //Hesap Türü
public Guid? CurrencyId { get; set; }
public Currency? Currency { get; set; }
public decimal Balance { get; set; }
public decimal OverdraftLimit { get; set; }
public decimal DailyTransferLimit { get; set; }
public bool IsDefault { get; set; }
public bool IsActive { get; set; }
}

View file

@ -0,0 +1,17 @@
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;
namespace Kurs.Platform.Entities;
public class PartnerCertificate : FullAuditedEntity<Guid>, IMultiTenant
{
public Guid? TenantId { get; set; }
public Guid PartnerId { get; set; }
public Partner Partner { get; set; }
public string Certificate { get; set; } // e.g., ISO 9001
public string Issuer { get; set; } // e.g., Certification Body Name
public DateTime IssueDate { get; set; } // e.g., 2020-01-01
public DateTime ExpiryDate { get; set; } // e.g., 2023-01-01
}

View file

@ -0,0 +1,21 @@
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;
namespace Kurs.Platform.Entities;
public class PartnerContact : FullAuditedEntity<Guid>, IMultiTenant
{
public Guid? TenantId { get; set; }
public Guid PartnerId { get; set; }
public Partner Partner { get; set; }
public string FullName { get; set; }
public string Title { get; set; }
public string Department { get; set; }
public string Email { get; set; }
public string Phone { get; set; }
public string Mobile { get; set; }
public bool IsPrimary { get; set; }
public bool IsActive { get; set; }
}

View file

@ -0,0 +1,18 @@
using System.Runtime.Serialization;
namespace Kurs.Platform.Entities;
public enum PartnerStatus
{
[EnumMember(Value = "Prospect")]
Prospect, // Aday
[EnumMember(Value = "Active")]
Active, // Aktif
[EnumMember(Value = "Inactive")]
Inactive, // Pasif
[EnumMember(Value = "Blocked")]
Blocked, // Engellenmiş
}

View file

@ -0,0 +1,12 @@
using System.Runtime.Serialization;
namespace Kurs.Platform.Entities;
public enum PartnerType
{
[EnumMember(Value = "Customer")]
Customer, // Müşteri
[EnumMember(Value = "Supplier")]
Supplier, // Tedarikçi
}

View file

@ -0,0 +1,14 @@
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;
namespace Kurs.Platform.Entities;
public class PaymentTerm : FullAuditedEntity<Guid>, IMultiTenant
{
public Guid? TenantId { get; set; }
public string Name { get; set; }
}

View file

@ -0,0 +1,49 @@
using System;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json;
namespace Kurs.Platform.Entities;
public class Supply : Partner
{
public PartnerType PartyType { get; set; } = PartnerType.Supplier;
public Guid? SupplierTypeId { get; set; }
public SupplyType? SupplierType { get; set; }
public string CardNumber { get; set; }
public Guid? SupplyCardTypeId { get; set; }
public SupplyCardType? SupplyCardType { 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; }
[NotMapped]
public PerformanceMetrics PerformanceMetrics
{
get
{
if (!string.IsNullOrEmpty(PerformanceMetricsJson))
return JsonSerializer.Deserialize<PerformanceMetrics>(PerformanceMetricsJson);
return new PerformanceMetrics();
}
set { PerformanceMetricsJson = JsonSerializer.Serialize(value); }
}
}
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; }
}

View file

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;
namespace Kurs.Platform.Entities;
public class SupplyCardType : FullAuditedEntity<Guid>, IMultiTenant
{
public Guid? TenantId { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public bool IsActive { get; set; }
public ICollection<Supply> Supplies { get; set; }
}

View file

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;
namespace Kurs.Platform.Entities;
public class SupplyType : FullAuditedEntity<Guid>, IMultiTenant
{
public Guid? TenantId { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public bool IsActive { get; set; }
public ICollection<Supply> Supplies { get; set; }
}

View file

@ -38,6 +38,8 @@ public class PlatformDbContext :
ITenantManagementDbContext ITenantManagementDbContext
{ {
#region Saas from the modules #region Saas from the modules
public DbSet<Tenant> Tenants { get; set; }
public DbSet<TenantConnectionString> TenantConnectionStrings { get; set; }
public DbSet<AiBot> AiBots { get; set; } public DbSet<AiBot> AiBots { get; set; }
public DbSet<Branch> Branches { get; set; } public DbSet<Branch> Branches { get; set; }
public DbSet<BranchUsers> BranchUsers { get; set; } public DbSet<BranchUsers> BranchUsers { get; set; }
@ -66,10 +68,6 @@ public class PlatformDbContext :
public DbSet<ReportCategory> ReportCategories { get; set; } public DbSet<ReportCategory> ReportCategories { get; set; }
public DbSet<Activity> Activities { get; set; } public DbSet<Activity> Activities { get; set; }
public DbSet<IpRestriction> IpRestrictions { get; set; } public DbSet<IpRestriction> IpRestrictions { get; set; }
#endregion
#region Definitions from the modules
public DbSet<Sector> Sectors { get; set; }
public DbSet<ContactTag> ContactTags { get; set; } public DbSet<ContactTag> ContactTags { get; set; }
public DbSet<ContactTitle> ContactTitles { get; set; } public DbSet<ContactTitle> ContactTitles { get; set; }
public DbSet<Currency> Currencies { get; set; } public DbSet<Currency> Currencies { get; set; }
@ -77,44 +75,17 @@ public class PlatformDbContext :
public DbSet<Country> Countries { get; set; } public DbSet<Country> Countries { get; set; }
public DbSet<City> Cities { get; set; } public DbSet<City> Cities { get; set; }
public DbSet<District> Districts { get; set; } public DbSet<District> Districts { get; set; }
public DbSet<SkillType> SkillTypes { get; set; }
public DbSet<Skill> Skills { get; set; }
public DbSet<SkillLevel> SkillLevels { get; set; }
public DbSet<UomCategory> UomCategories { get; set; }
public DbSet<Uom> Uoms { get; set; }
public DbSet<Bank> Banks { get; set; }
public DbSet<Behavior> Behaviors { get; set; }
public DbSet<BankAccount> BankAccounts { get; set; }
//Student
public DbSet<Schedule> Schedules { get; set; }
public DbSet<ScheduleLesson> ScheduleLessons { get; set; }
public DbSet<ClassType> ClassTypes { get; set; }
public DbSet<Class> Classes { get; set; }
public DbSet<LessonPeriod> LessonPeriods { get; set; }
public DbSet<Lawyer> Lawyers { get; set; }
public DbSet<Disease> Diseases { get; set; }
public DbSet<Document> Documents { get; set; }
public DbSet<Interesting> InterestAreas { get; set; }
public DbSet<RegistrationMethod> RegistrationMethods { get; set; }
public DbSet<RegistrationType> RegistrationTypes { get; set; }
public DbSet<Source> Sources { get; set; }
public DbSet<NoteType> NoteTypes { get; set; }
public DbSet<EducationStatus> EducationStatuses { get; set; }
public DbSet<Program> Programs { get; set; }
public DbSet<Psychologist> Psychologists { get; set; }
public DbSet<SalesRejectionReason> SalesRejectionReasons { get; set; }
public DbSet<Level> Levels { get; set; }
public DbSet<ClassCancellationReason> ClassCancellationReasons { get; set; }
public DbSet<MeetingMethod> MeetingMethods { get; set; }
public DbSet<MeetingResult> MeetingResults { get; set; }
public DbSet<Vaccine> Vaccines { get; set; }
public DbSet<Vehicle> Vehicles { get; set; }
public DbSet<WorkHour> WorkHours { get; set; }
#endregion #endregion
#region Web Site from the modules #region Administrator from the modules
public DbSet<IdentityUser> Users { get; set; }
public DbSet<IdentityRole> Roles { get; set; }
public DbSet<IdentityClaimType> ClaimTypes { get; set; }
public DbSet<OrganizationUnit> OrganizationUnits { get; set; }
public DbSet<IdentitySecurityLog> SecurityLogs { get; set; }
public DbSet<IdentityLinkUser> LinkUsers { get; set; }
public DbSet<IdentityUserDelegation> UserDelegations { get; set; }
public DbSet<IdentitySession> Sessions { get; set; }
public DbSet<About> Abouts { get; set; } public DbSet<About> Abouts { get; set; }
public DbSet<Service> Services { get; set; } public DbSet<Service> Services { get; set; }
public DbSet<Product> Products { get; set; } public DbSet<Product> Products { get; set; }
@ -126,9 +97,65 @@ public class PlatformDbContext :
public DbSet<BlogCategory> BlogCategories { get; set; } public DbSet<BlogCategory> BlogCategories { get; set; }
public DbSet<Demo> Demos { get; set; } public DbSet<Demo> Demos { get; set; }
public DbSet<Contact> Contacts { get; set; } public DbSet<Contact> Contacts { get; set; }
public DbSet<Sector> Sectors { get; set; }
public DbSet<SkillType> SkillTypes { get; set; }
public DbSet<Skill> Skills { get; set; }
public DbSet<SkillLevel> SkillLevels { get; set; }
public DbSet<UomCategory> UomCategories { get; set; }
public DbSet<Uom> Uoms { get; set; }
public DbSet<WorkHour> WorkHours { get; set; }
public DbSet<Behavior> Behaviors { get; set; }
public DbSet<Disease> Diseases { get; set; }
public DbSet<Document> Documents { get; set; }
public DbSet<EducationStatus> EducationStatuses { get; set; }
public DbSet<Vaccine> Vaccines { get; set; }
public DbSet<Vehicle> Vehicles { get; set; }
public DbSet<Psychologist> Psychologists { get; set; }
public DbSet<Lawyer> Lawyers { get; set; }
public DbSet<Partner> Partners { get; set; }
#endregion
#region Intranet
public DbSet<Event> Events { get; set; }
public DbSet<EventCategory> EventCategories { get; set; }
public DbSet<EventType> EventTypes { get; set; }
public DbSet<EventPhoto> EventPhotos { get; set; }
public DbSet<EventComment> EventComments { get; set; }
public DbSet<Meal> Meals { get; set; }
public DbSet<Reservation> Reservations { get; set; }
public DbSet<ShuttleRoute> ShuttleRoutes { get; set; }
public DbSet<Announcement> Announcements { get; set; }
public DbSet<Visitor> Visitors { get; set; }
public DbSet<SocialPost> SocialPosts { get; set; }
public DbSet<SocialLocation> SocialLocations { get; set; }
public DbSet<SocialMedia> SocialMedias { get; set; }
public DbSet<SocialPollOption> SocialPollOptions { get; set; }
public DbSet<SocialComment> SocialComments { get; set; }
public DbSet<SocialLike> SocialLikes { get; set; }
#endregion
#region Participant from the modules
public DbSet<MeetingMethod> MeetingMethods { get; set; }
public DbSet<MeetingResult> MeetingResults { get; set; }
public DbSet<Source> Sources { get; set; }
public DbSet<Interesting> InterestAreas { get; set; }
public DbSet<SalesRejectionReason> SalesRejectionReasons { get; set; }
public DbSet<NoteType> NoteTypes { get; set; }
#endregion #endregion
#region Coordinator from the modules #region Coordinator from the modules
public DbSet<Program> Programs { get; set; }
public DbSet<Schedule> Schedules { get; set; }
public DbSet<ScheduleLesson> ScheduleLessons { get; set; }
public DbSet<RegistrationType> RegistrationTypes { get; set; }
public DbSet<RegistrationMethod> RegistrationMethods { get; set; }
public DbSet<ClassType> ClassTypes { get; set; }
public DbSet<Class> Classes { get; set; }
public DbSet<Level> Levels { get; set; }
public DbSet<ClassCancellationReason> ClassCancellationReasons { get; set; }
public DbSet<LessonPeriod> LessonPeriods { get; set; }
public DbSet<Classroom> ClassSessions { get; set; } public DbSet<Classroom> ClassSessions { get; set; }
public DbSet<ClassroomParticipant> Participants { get; set; } public DbSet<ClassroomParticipant> Participants { get; set; }
public DbSet<ClassroomAttandance> AttendanceRecords { get; set; } public DbSet<ClassroomAttandance> AttendanceRecords { get; set; }
@ -141,24 +168,6 @@ public class PlatformDbContext :
#endregion #endregion
#region Administrator from the modules
//Identity
public DbSet<IdentityUser> Users { get; set; }
public DbSet<IdentityRole> Roles { get; set; }
public DbSet<IdentityClaimType> ClaimTypes { get; set; }
public DbSet<OrganizationUnit> OrganizationUnits { get; set; }
public DbSet<IdentitySecurityLog> SecurityLogs { get; set; }
public DbSet<IdentityLinkUser> LinkUsers { get; set; }
public DbSet<IdentityUserDelegation> UserDelegations { get; set; }
public DbSet<IdentitySession> Sessions { get; set; }
// Tenant Management
public DbSet<Tenant> Tenants { get; set; }
public DbSet<TenantConnectionString> TenantConnectionStrings { get; set; }
#endregion
#region Hr #region Hr
public DbSet<Employee> Employees { get; set; } public DbSet<Employee> Employees { get; set; }
public DbSet<Department> Departments { get; set; } public DbSet<Department> Departments { get; set; }
@ -182,29 +191,27 @@ public class PlatformDbContext :
#endregion #endregion
#region Intranet
public DbSet<Event> Events { get; set; }
public DbSet<EventCategory> EventCategories { get; set; }
public DbSet<EventType> EventTypes { get; set; }
public DbSet<EventPhoto> EventPhotos { get; set; }
public DbSet<EventComment> EventComments { get; set; }
public DbSet<Meal> Meals { get; set; }
public DbSet<Reservation> Reservations { get; set; }
public DbSet<ShuttleRoute> ShuttleRoutes { get; set; }
public DbSet<Announcement> Announcements { get; set; }
public DbSet<Visitor> Visitors { get; set; }
public DbSet<SocialPost> SocialPosts { get; set; }
public DbSet<SocialLocation> SocialLocations { get; set; }
public DbSet<SocialMedia> SocialMedias { get; set; }
public DbSet<SocialPollOption> SocialPollOptions { get; set; }
public DbSet<SocialComment> SocialComments { get; set; }
public DbSet<SocialLike> SocialLikes { get; set; }
#endregion
#region Supply Chain #region Supply Chain
public DbSet<MaterialType> MaterialTypes { get; set; } public DbSet<MaterialType> MaterialTypes { get; set; }
public DbSet<MaterialGroup> MaterialGroups { get; set; } public DbSet<MaterialGroup> MaterialGroups { get; set; }
public DbSet<PaymentTerm> PaymentTerms { get; set; }
public DbSet<SupplyType> SupplyTypes { get; set; }
public DbSet<SupplyCardType> SupplyCardTypes { get; set; }
public DbSet<Supply> Supplies { get; set; }
public DbSet<CustomerType> CustomerTypes { get; set; }
public DbSet<CustomerSegment> CustomerSegments { get; set; }
public DbSet<Customer> Customers { get; set; }
public DbSet<PartnerBank> PartnerBanks { get; set; }
public DbSet<PartnerCertificate> PartnerCertificates { get; set; }
public DbSet<PartnerContact> PartnerContacts { get; set; }
#endregion
#region Accounting
public DbSet<Bank> Banks { get; set; }
public DbSet<BankAccount> BankAccounts { get; set; }
#endregion #endregion
public PlatformDbContext(DbContextOptions<PlatformDbContext> options) public PlatformDbContext(DbContextOptions<PlatformDbContext> options)
@ -2217,5 +2224,193 @@ public class PlatformDbContext :
.HasForeignKey(x => x.ParentGroupId) .HasForeignKey(x => x.ParentGroupId)
.OnDelete(DeleteBehavior.Restrict); .OnDelete(DeleteBehavior.Restrict);
}); });
builder.Entity<PaymentTerm>(b =>
{
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.PaymentTerm)), Prefix.DbSchema);
b.ConfigureByConvention();
b.Property(x => x.Name).IsRequired().HasMaxLength(100);
});
builder.Entity<SupplyType>(b =>
{
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.SupplyType)), Prefix.DbSchema);
b.ConfigureByConvention();
b.Property(x => x.Name).IsRequired().HasMaxLength(50);
b.Property(x => x.Description).HasMaxLength(500);
b.Property(x => x.IsActive).HasDefaultValue(true);
});
builder.Entity<SupplyCardType>(b =>
{
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.SupplyCardType)), Prefix.DbSchema);
b.ConfigureByConvention();
b.Property(x => x.Name).IsRequired().HasMaxLength(50);
b.Property(x => x.Description).HasMaxLength(500);
b.Property(x => x.IsActive).HasDefaultValue(true);
});
builder.Entity<Supply>(b =>
{
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Supply)), Prefix.DbSchema);
b.ConfigureByConvention();
b.Property(p => p.Code).IsRequired().HasMaxLength(64);
b.Property(p => p.Name).IsRequired().HasMaxLength(256);
b.Property(p => p.TaxNumber).IsRequired();
b.Property(p => p.TaxOffice).HasMaxLength(128);
b.Property(p => p.Country).IsRequired().HasMaxLength(64);
b.Property(p => p.City).IsRequired().HasMaxLength(64);
b.Property(p => p.District).HasMaxLength(64);
b.Property(p => p.Street).HasMaxLength(128);
b.Property(p => p.Address1).HasMaxLength(256);
b.Property(p => p.Address2).HasMaxLength(256);
b.Property(p => p.PostalCode).HasMaxLength(16);
b.Property(p => p.Phone).HasMaxLength(32);
b.Property(p => p.Mobile).HasMaxLength(32);
b.Property(p => p.Fax).HasMaxLength(32);
b.Property(p => p.Email).HasMaxLength(128);
b.Property(p => p.Website).HasMaxLength(128);
b.Property(p => p.CreditLimit).HasPrecision(18, 2);
b.Property(p => p.Status).IsRequired();
b.Property(x => x.CardNumber).HasMaxLength(64);
b.Property(x => x.CurrentBalance).HasDefaultValue(0);
b.Property(x => x.DiscountRate).HasDefaultValue(0);
b.Property(a => a.PerformanceMetricsJson).HasColumnType("text");
b.HasOne(x => x.SupplierType)
.WithMany(x => x.Supplies)
.HasForeignKey(x => x.SupplierTypeId)
.OnDelete(DeleteBehavior.Restrict);
b.HasOne(x => x.SupplyCardType)
.WithMany(x => x.Supplies)
.HasForeignKey(x => x.SupplyCardTypeId)
.OnDelete(DeleteBehavior.Restrict);
});
builder.Entity<CustomerType>(b =>
{
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.CustomerType)), Prefix.DbSchema);
b.ConfigureByConvention();
b.Property(x => x.Name).IsRequired().HasMaxLength(50);
b.Property(x => x.Description).HasMaxLength(500);
b.Property(x => x.IsActive).HasDefaultValue(true);
});
builder.Entity<CustomerSegment>(b =>
{
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.CustomerSegment)), Prefix.DbSchema);
b.ConfigureByConvention();
b.Property(x => x.Name).IsRequired().HasMaxLength(50);
b.Property(x => x.Description).HasMaxLength(500);
b.Property(x => x.IsActive).HasDefaultValue(true);
});
builder.Ignore<Partner>();
builder.Entity<Customer>(b =>
{
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Customer)), Prefix.DbSchema);
b.ConfigureByConvention();
b.Property(p => p.Code).IsRequired().HasMaxLength(64);
b.Property(p => p.Name).IsRequired().HasMaxLength(256);
b.Property(p => p.TaxNumber).IsRequired();
b.Property(p => p.TaxOffice).HasMaxLength(128);
b.Property(p => p.Country).IsRequired().HasMaxLength(64);
b.Property(p => p.City).IsRequired().HasMaxLength(64);
b.Property(p => p.District).HasMaxLength(64);
b.Property(p => p.Street).HasMaxLength(128);
b.Property(p => p.Address1).HasMaxLength(256);
b.Property(p => p.Address2).HasMaxLength(256);
b.Property(p => p.PostalCode).HasMaxLength(16);
b.Property(p => p.Phone).HasMaxLength(32);
b.Property(p => p.Mobile).HasMaxLength(32);
b.Property(p => p.Fax).HasMaxLength(32);
b.Property(p => p.Email).HasMaxLength(128);
b.Property(p => p.Website).HasMaxLength(128);
b.Property(p => p.CreditLimit).HasPrecision(18, 2);
b.Property(p => p.Status).IsRequired();
b.Property(x => x.TeamCode).HasMaxLength(95);
b.Property(x => x.TotalRevenue).HasDefaultValue(0);
b.Property(x => x.AverageOrderValue).HasDefaultValue(0);
b.Property(x => x.LifetimeValue).HasDefaultValue(0);
b.HasOne(x => x.CustomerType)
.WithMany(x => x.Customers)
.HasForeignKey(x => x.CustomerTypeId)
.OnDelete(DeleteBehavior.Restrict);
b.HasOne(x => x.CustomerSegment)
.WithMany(x => x.Customers)
.HasForeignKey(x => x.CustomerSegmentId)
.OnDelete(DeleteBehavior.Restrict);
});
builder.Entity<PartnerBank>(b =>
{
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.PartnerBank)), Prefix.DbSchema);
b.ConfigureByConvention();
b.Property(pb => pb.BankName).IsRequired().HasMaxLength(128);
b.Property(pb => pb.AccountNumber).IsRequired().HasMaxLength(50);
b.Property(pb => pb.Iban).IsRequired().HasMaxLength(34);
b.Property(pb => pb.SwiftCode).HasMaxLength(11);
b.Property(pb => pb.AccountOwner).IsRequired().HasMaxLength(128);
b.Property(pb => pb.BranchName).HasMaxLength(128);
b.Property(pb => pb.AccountType).HasMaxLength(64);
b.Property(pb => pb.Balance).HasPrecision(18, 2);
b.Property(pb => pb.OverdraftLimit).HasPrecision(18, 2);
b.Property(pb => pb.DailyTransferLimit).HasPrecision(18, 2);
b.Property(pb => pb.IsDefault).HasDefaultValue(false);
b.Property(pb => pb.IsActive).HasDefaultValue(true);
b.HasOne(pb => pb.Partner)
.WithMany(x => x.Banks)
.HasForeignKey(pb => pb.PartnerId)
.OnDelete(DeleteBehavior.Restrict);
});
builder.Entity<PartnerCertificate>(b =>
{
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.PartnerCertificate)), Prefix.DbSchema);
b.ConfigureByConvention();
b.Property(x => x.Certificate).IsRequired().HasMaxLength(50);
b.Property(x => x.Issuer).HasMaxLength(500);
b.HasOne(x => x.Partner)
.WithMany(x => x.Certificates)
.HasForeignKey(x => x.PartnerId)
.OnDelete(DeleteBehavior.Restrict);
});
builder.Entity<PartnerContact>(b =>
{
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.PartnerContact)), Prefix.DbSchema);
b.ConfigureByConvention();
b.Property(x => x.FullName).IsRequired().HasMaxLength(128);
b.Property(x => x.Title).HasMaxLength(64);
b.Property(x => x.Department).HasMaxLength(64);
b.Property(x => x.Email).HasMaxLength(128);
b.Property(x => x.Phone).HasMaxLength(32);
b.Property(x => x.Mobile).HasMaxLength(32);
b.Property(x => x.IsPrimary).HasDefaultValue(false);
b.Property(x => x.IsActive).HasDefaultValue(true);
b.HasOne(x => x.Partner)
.WithMany(x => x.Contacts)
.HasForeignKey(x => x.PartnerId)
.OnDelete(DeleteBehavior.Restrict);
});
} }
} }

View file

@ -1708,6 +1708,50 @@ namespace Kurs.Platform.Migrations
table.PrimaryKey("PK_T_Crd_QuestionTag", x => x.Id); table.PrimaryKey("PK_T_Crd_QuestionTag", x => x.Id);
}); });
migrationBuilder.CreateTable(
name: "T_Crm_CustomerSegment",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Name = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
Description = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
IsActive = table.Column<bool>(type: "bit", nullable: false, defaultValue: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_Crm_CustomerSegment", x => x.Id);
});
migrationBuilder.CreateTable(
name: "T_Crm_CustomerType",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Name = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
Description = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
IsActive = table.Column<bool>(type: "bit", nullable: false, defaultValue: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_Crm_CustomerType", x => x.Id);
});
migrationBuilder.CreateTable( migrationBuilder.CreateTable(
name: "T_Hr_Badge", name: "T_Hr_Badge",
columns: table => new columns: table => new
@ -2355,6 +2399,70 @@ namespace Kurs.Platform.Migrations
table.PrimaryKey("PK_T_Scp_MaterialType", x => x.Id); table.PrimaryKey("PK_T_Scp_MaterialType", x => x.Id);
}); });
migrationBuilder.CreateTable(
name: "T_Scp_PaymentTerm",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Name = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_Scp_PaymentTerm", x => x.Id);
});
migrationBuilder.CreateTable(
name: "T_Scp_SupplyCardType",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Name = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
Description = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
IsActive = table.Column<bool>(type: "bit", nullable: false, defaultValue: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_Scp_SupplyCardType", x => x.Id);
});
migrationBuilder.CreateTable(
name: "T_Scp_SupplyType",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Name = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
Description = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
IsActive = table.Column<bool>(type: "bit", nullable: false, defaultValue: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_Scp_SupplyType", x => x.Id);
});
migrationBuilder.CreateTable( migrationBuilder.CreateTable(
name: "AbpAuditLogActions", name: "AbpAuditLogActions",
columns: table => new columns: table => new
@ -3509,6 +3617,139 @@ namespace Kurs.Platform.Migrations
onDelete: ReferentialAction.Cascade); onDelete: ReferentialAction.Cascade);
}); });
migrationBuilder.CreateTable(
name: "Partners",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Code = table.Column<string>(type: "nvarchar(max)", nullable: true),
Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
SectorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TaxNumber = table.Column<long>(type: "bigint", nullable: false),
TaxOffice = table.Column<string>(type: "nvarchar(max)", nullable: true),
Country = table.Column<string>(type: "nvarchar(max)", nullable: true),
City = table.Column<string>(type: "nvarchar(max)", nullable: true),
District = table.Column<string>(type: "nvarchar(max)", nullable: true),
Street = table.Column<string>(type: "nvarchar(max)", nullable: true),
Address1 = table.Column<string>(type: "nvarchar(max)", nullable: true),
Address2 = table.Column<string>(type: "nvarchar(max)", nullable: true),
PostalCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
Phone = table.Column<string>(type: "nvarchar(max)", nullable: true),
Mobile = table.Column<string>(type: "nvarchar(max)", nullable: true),
Fax = table.Column<string>(type: "nvarchar(max)", nullable: true),
Email = table.Column<string>(type: "nvarchar(max)", nullable: true),
Website = table.Column<string>(type: "nvarchar(max)", nullable: true),
CurrencyId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
PaymentTermId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CreditLimit = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
LastOrderDate = table.Column<DateTime>(type: "datetime2", nullable: false),
Status = table.Column<int>(type: "int", nullable: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Partners", x => x.Id);
table.ForeignKey(
name: "FK_Partners_P_Sas_Currency_CurrencyId",
column: x => x.CurrencyId,
principalTable: "P_Sas_Currency",
principalColumn: "Id");
table.ForeignKey(
name: "FK_Partners_T_Sas_Sector_SectorId",
column: x => x.SectorId,
principalTable: "T_Sas_Sector",
principalColumn: "Id");
table.ForeignKey(
name: "FK_Partners_T_Scp_PaymentTerm_PaymentTermId",
column: x => x.PaymentTermId,
principalTable: "T_Scp_PaymentTerm",
principalColumn: "Id");
});
migrationBuilder.CreateTable(
name: "T_Scp_Supply",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PartyType = table.Column<int>(type: "int", nullable: false),
SupplierTypeId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CardNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
SupplyCardTypeId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ValidFrom = table.Column<DateTime>(type: "datetime2", nullable: false),
ValidTo = table.Column<DateTime>(type: "datetime2", nullable: false),
CurrentBalance = table.Column<decimal>(type: "decimal(18,2)", nullable: false, defaultValue: 0m),
DiscountRate = table.Column<decimal>(type: "decimal(18,2)", nullable: false, defaultValue: 0m),
PerformanceMetricsJson = table.Column<string>(type: "text", nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Code = table.Column<string>(type: "nvarchar(max)", nullable: true),
Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
SectorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TaxNumber = table.Column<long>(type: "bigint", nullable: false),
TaxOffice = table.Column<string>(type: "nvarchar(max)", nullable: true),
Country = table.Column<string>(type: "nvarchar(max)", nullable: true),
City = table.Column<string>(type: "nvarchar(max)", nullable: true),
District = table.Column<string>(type: "nvarchar(max)", nullable: true),
Street = table.Column<string>(type: "nvarchar(max)", nullable: true),
Address1 = table.Column<string>(type: "nvarchar(max)", nullable: true),
Address2 = table.Column<string>(type: "nvarchar(max)", nullable: true),
PostalCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
Phone = table.Column<string>(type: "nvarchar(max)", nullable: true),
Mobile = table.Column<string>(type: "nvarchar(max)", nullable: true),
Fax = table.Column<string>(type: "nvarchar(max)", nullable: true),
Email = table.Column<string>(type: "nvarchar(max)", nullable: true),
Website = table.Column<string>(type: "nvarchar(max)", nullable: true),
CurrencyId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
PaymentTermId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CreditLimit = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
LastOrderDate = table.Column<DateTime>(type: "datetime2", nullable: false),
Status = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_Scp_Supply", x => x.Id);
table.ForeignKey(
name: "FK_T_Scp_Supply_P_Sas_Currency_CurrencyId",
column: x => x.CurrencyId,
principalTable: "P_Sas_Currency",
principalColumn: "Id");
table.ForeignKey(
name: "FK_T_Scp_Supply_T_Sas_Sector_SectorId",
column: x => x.SectorId,
principalTable: "T_Sas_Sector",
principalColumn: "Id");
table.ForeignKey(
name: "FK_T_Scp_Supply_T_Scp_PaymentTerm_PaymentTermId",
column: x => x.PaymentTermId,
principalTable: "T_Scp_PaymentTerm",
principalColumn: "Id");
table.ForeignKey(
name: "FK_T_Scp_Supply_T_Scp_SupplyCardType_SupplyCardTypeId",
column: x => x.SupplyCardTypeId,
principalTable: "T_Scp_SupplyCardType",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_Scp_Supply_T_Scp_SupplyType_SupplierTypeId",
column: x => x.SupplierTypeId,
principalTable: "T_Scp_SupplyType",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable( migrationBuilder.CreateTable(
name: "AbpEntityPropertyChanges", name: "AbpEntityPropertyChanges",
columns: table => new columns: table => new
@ -3904,6 +4145,211 @@ namespace Kurs.Platform.Migrations
principalColumn: "Id"); principalColumn: "Id");
}); });
migrationBuilder.CreateTable(
name: "T_Adm_PartnerBank",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
PartnerId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
BankName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
AccountNumber = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
Iban = table.Column<string>(type: "nvarchar(34)", maxLength: 34, nullable: false),
SwiftCode = table.Column<string>(type: "nvarchar(11)", maxLength: 11, nullable: true),
AccountOwner = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
BranchName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
AccountType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
CurrencyId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Balance = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false),
OverdraftLimit = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false),
DailyTransferLimit = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false),
IsDefault = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
IsActive = table.Column<bool>(type: "bit", nullable: false, defaultValue: true),
CustomerId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
SupplyId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_Adm_PartnerBank", x => x.Id);
table.ForeignKey(
name: "FK_T_Adm_PartnerBank_P_Sas_Currency_CurrencyId",
column: x => x.CurrencyId,
principalTable: "P_Sas_Currency",
principalColumn: "Id");
table.ForeignKey(
name: "FK_T_Adm_PartnerBank_Partners_PartnerId",
column: x => x.PartnerId,
principalTable: "Partners",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_Adm_PartnerBank_T_Scp_Supply_SupplyId",
column: x => x.SupplyId,
principalTable: "T_Scp_Supply",
principalColumn: "Id");
});
migrationBuilder.CreateTable(
name: "T_Adm_PartnerCertificate",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
PartnerId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Certificate = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
Issuer = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
IssueDate = table.Column<DateTime>(type: "datetime2", nullable: false),
ExpiryDate = table.Column<DateTime>(type: "datetime2", nullable: false),
CustomerId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
SupplyId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_Adm_PartnerCertificate", x => x.Id);
table.ForeignKey(
name: "FK_T_Adm_PartnerCertificate_Partners_PartnerId",
column: x => x.PartnerId,
principalTable: "Partners",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_Adm_PartnerCertificate_T_Scp_Supply_SupplyId",
column: x => x.SupplyId,
principalTable: "T_Scp_Supply",
principalColumn: "Id");
});
migrationBuilder.CreateTable(
name: "T_Adm_PartnerContact",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
PartnerId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
FullName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
Title = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
Department = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
Email = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
Phone = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: true),
Mobile = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: true),
IsPrimary = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
IsActive = table.Column<bool>(type: "bit", nullable: false, defaultValue: true),
CustomerId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
SupplyId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_Adm_PartnerContact", x => x.Id);
table.ForeignKey(
name: "FK_T_Adm_PartnerContact_Partners_PartnerId",
column: x => x.PartnerId,
principalTable: "Partners",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_Adm_PartnerContact_T_Scp_Supply_SupplyId",
column: x => x.SupplyId,
principalTable: "T_Scp_Supply",
principalColumn: "Id");
});
migrationBuilder.CreateTable(
name: "T_Crm_Customer",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PartyType = table.Column<int>(type: "int", nullable: false),
CustomerTypeId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CustomerSegmentId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
AssignedEmployeeId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TeamCode = table.Column<string>(type: "nvarchar(95)", maxLength: 95, nullable: true),
TotalRevenue = table.Column<decimal>(type: "decimal(18,2)", nullable: false, defaultValue: 0m),
AverageOrderValue = table.Column<decimal>(type: "decimal(18,2)", nullable: false, defaultValue: 0m),
LifetimeValue = table.Column<decimal>(type: "decimal(18,2)", nullable: false, defaultValue: 0m),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Code = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Name = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
SectorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TaxNumber = table.Column<long>(type: "bigint", nullable: false),
TaxOffice = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
Country = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
City = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
District = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
Street = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
Address1 = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
Address2 = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
PostalCode = table.Column<string>(type: "nvarchar(16)", maxLength: 16, nullable: true),
Phone = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: true),
Mobile = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: true),
Fax = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: true),
Email = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
Website = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
CurrencyId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
PaymentTermId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CreditLimit = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false),
LastOrderDate = table.Column<DateTime>(type: "datetime2", nullable: false),
Status = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_Crm_Customer", x => x.Id);
table.ForeignKey(
name: "FK_T_Crm_Customer_P_Sas_Currency_CurrencyId",
column: x => x.CurrencyId,
principalTable: "P_Sas_Currency",
principalColumn: "Id");
table.ForeignKey(
name: "FK_T_Crm_Customer_T_Crm_CustomerSegment_CustomerSegmentId",
column: x => x.CustomerSegmentId,
principalTable: "T_Crm_CustomerSegment",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_Crm_Customer_T_Crm_CustomerType_CustomerTypeId",
column: x => x.CustomerTypeId,
principalTable: "T_Crm_CustomerType",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_Crm_Customer_T_Sas_Sector_SectorId",
column: x => x.SectorId,
principalTable: "T_Sas_Sector",
principalColumn: "Id");
table.ForeignKey(
name: "FK_T_Crm_Customer_T_Scp_PaymentTerm_PaymentTermId",
column: x => x.PaymentTermId,
principalTable: "T_Scp_PaymentTerm",
principalColumn: "Id");
});
migrationBuilder.CreateTable( migrationBuilder.CreateTable(
name: "T_Hr_CostCenter", name: "T_Hr_CostCenter",
columns: table => new columns: table => new
@ -5165,6 +5611,21 @@ namespace Kurs.Platform.Migrations
column: "Key", column: "Key",
unique: true); unique: true);
migrationBuilder.CreateIndex(
name: "IX_Partners_CurrencyId",
table: "Partners",
column: "CurrencyId");
migrationBuilder.CreateIndex(
name: "IX_Partners_PaymentTermId",
table: "Partners",
column: "PaymentTermId");
migrationBuilder.CreateIndex(
name: "IX_Partners_SectorId",
table: "Partners",
column: "SectorId");
migrationBuilder.CreateIndex( migrationBuilder.CreateIndex(
name: "IX_T_Acc_BankAccount_BankId", name: "IX_T_Acc_BankAccount_BankId",
table: "T_Acc_BankAccount", table: "T_Acc_BankAccount",
@ -5200,6 +5661,56 @@ namespace Kurs.Platform.Migrations
table: "T_Adm_OrderItem", table: "T_Adm_OrderItem",
column: "OrderId"); column: "OrderId");
migrationBuilder.CreateIndex(
name: "IX_T_Adm_PartnerBank_CurrencyId",
table: "T_Adm_PartnerBank",
column: "CurrencyId");
migrationBuilder.CreateIndex(
name: "IX_T_Adm_PartnerBank_CustomerId",
table: "T_Adm_PartnerBank",
column: "CustomerId");
migrationBuilder.CreateIndex(
name: "IX_T_Adm_PartnerBank_PartnerId",
table: "T_Adm_PartnerBank",
column: "PartnerId");
migrationBuilder.CreateIndex(
name: "IX_T_Adm_PartnerBank_SupplyId",
table: "T_Adm_PartnerBank",
column: "SupplyId");
migrationBuilder.CreateIndex(
name: "IX_T_Adm_PartnerCertificate_CustomerId",
table: "T_Adm_PartnerCertificate",
column: "CustomerId");
migrationBuilder.CreateIndex(
name: "IX_T_Adm_PartnerCertificate_PartnerId",
table: "T_Adm_PartnerCertificate",
column: "PartnerId");
migrationBuilder.CreateIndex(
name: "IX_T_Adm_PartnerCertificate_SupplyId",
table: "T_Adm_PartnerCertificate",
column: "SupplyId");
migrationBuilder.CreateIndex(
name: "IX_T_Adm_PartnerContact_CustomerId",
table: "T_Adm_PartnerContact",
column: "CustomerId");
migrationBuilder.CreateIndex(
name: "IX_T_Adm_PartnerContact_PartnerId",
table: "T_Adm_PartnerContact",
column: "PartnerId");
migrationBuilder.CreateIndex(
name: "IX_T_Adm_PartnerContact_SupplyId",
table: "T_Adm_PartnerContact",
column: "SupplyId");
migrationBuilder.CreateIndex( migrationBuilder.CreateIndex(
name: "IX_T_Adm_Skill_SkillTypeId", name: "IX_T_Adm_Skill_SkillTypeId",
table: "T_Adm_Skill", table: "T_Adm_Skill",
@ -5282,6 +5793,36 @@ namespace Kurs.Platform.Migrations
table: "T_Crd_QuestionOption", table: "T_Crd_QuestionOption",
column: "QuestionId"); column: "QuestionId");
migrationBuilder.CreateIndex(
name: "IX_T_Crm_Customer_AssignedEmployeeId",
table: "T_Crm_Customer",
column: "AssignedEmployeeId");
migrationBuilder.CreateIndex(
name: "IX_T_Crm_Customer_CurrencyId",
table: "T_Crm_Customer",
column: "CurrencyId");
migrationBuilder.CreateIndex(
name: "IX_T_Crm_Customer_CustomerSegmentId",
table: "T_Crm_Customer",
column: "CustomerSegmentId");
migrationBuilder.CreateIndex(
name: "IX_T_Crm_Customer_CustomerTypeId",
table: "T_Crm_Customer",
column: "CustomerTypeId");
migrationBuilder.CreateIndex(
name: "IX_T_Crm_Customer_PaymentTermId",
table: "T_Crm_Customer",
column: "PaymentTermId");
migrationBuilder.CreateIndex(
name: "IX_T_Crm_Customer_SectorId",
table: "T_Crm_Customer",
column: "SectorId");
migrationBuilder.CreateIndex( migrationBuilder.CreateIndex(
name: "IX_T_Hr_CostCenter_DepartmentId", name: "IX_T_Hr_CostCenter_DepartmentId",
table: "T_Hr_CostCenter", table: "T_Hr_CostCenter",
@ -5539,6 +6080,60 @@ namespace Kurs.Platform.Migrations
table: "T_Scp_MaterialGroup", table: "T_Scp_MaterialGroup",
column: "ParentGroupId"); column: "ParentGroupId");
migrationBuilder.CreateIndex(
name: "IX_T_Scp_Supply_CurrencyId",
table: "T_Scp_Supply",
column: "CurrencyId");
migrationBuilder.CreateIndex(
name: "IX_T_Scp_Supply_PaymentTermId",
table: "T_Scp_Supply",
column: "PaymentTermId");
migrationBuilder.CreateIndex(
name: "IX_T_Scp_Supply_SectorId",
table: "T_Scp_Supply",
column: "SectorId");
migrationBuilder.CreateIndex(
name: "IX_T_Scp_Supply_SupplierTypeId",
table: "T_Scp_Supply",
column: "SupplierTypeId");
migrationBuilder.CreateIndex(
name: "IX_T_Scp_Supply_SupplyCardTypeId",
table: "T_Scp_Supply",
column: "SupplyCardTypeId");
migrationBuilder.AddForeignKey(
name: "FK_T_Adm_PartnerBank_T_Crm_Customer_CustomerId",
table: "T_Adm_PartnerBank",
column: "CustomerId",
principalTable: "T_Crm_Customer",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_T_Adm_PartnerCertificate_T_Crm_Customer_CustomerId",
table: "T_Adm_PartnerCertificate",
column: "CustomerId",
principalTable: "T_Crm_Customer",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_T_Adm_PartnerContact_T_Crm_Customer_CustomerId",
table: "T_Adm_PartnerContact",
column: "CustomerId",
principalTable: "T_Crm_Customer",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_T_Crm_Customer_T_Hr_Employee_AssignedEmployeeId",
table: "T_Crm_Customer",
column: "AssignedEmployeeId",
principalTable: "T_Hr_Employee",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey( migrationBuilder.AddForeignKey(
name: "FK_T_Hr_CostCenter_T_Hr_Department_DepartmentId", name: "FK_T_Hr_CostCenter_T_Hr_Department_DepartmentId",
table: "T_Hr_CostCenter", table: "T_Hr_CostCenter",
@ -5570,16 +6165,16 @@ namespace Kurs.Platform.Migrations
table: "T_Acc_BankAccount"); table: "T_Acc_BankAccount");
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_T_Hr_CostCenter_T_Hr_Department_DepartmentId", name: "FK_T_Hr_CostCenter_T_Hr_Employee_ResponsibleEmployeeId",
table: "T_Hr_CostCenter"); table: "T_Hr_CostCenter");
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_T_Hr_Employee_T_Hr_Department_DepartmentId", name: "FK_T_Hr_Department_T_Hr_Employee_ManagerId",
table: "T_Hr_Employee"); table: "T_Hr_Department");
migrationBuilder.DropForeignKey( migrationBuilder.DropForeignKey(
name: "FK_T_Hr_JobPosition_T_Hr_Department_DepartmentId", name: "FK_T_Hr_CostCenter_T_Hr_Department_DepartmentId",
table: "T_Hr_JobPosition"); table: "T_Hr_CostCenter");
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "AbpAuditLogActions"); name: "AbpAuditLogActions");
@ -5701,9 +6296,6 @@ namespace Kurs.Platform.Migrations
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "P_Sas_ContactTitle"); name: "P_Sas_ContactTitle");
migrationBuilder.DropTable(
name: "P_Sas_Currency");
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "P_Sas_DataSource"); name: "P_Sas_DataSource");
@ -5761,6 +6353,15 @@ namespace Kurs.Platform.Migrations
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "T_Adm_OrderItem"); name: "T_Adm_OrderItem");
migrationBuilder.DropTable(
name: "T_Adm_PartnerBank");
migrationBuilder.DropTable(
name: "T_Adm_PartnerCertificate");
migrationBuilder.DropTable(
name: "T_Adm_PartnerContact");
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "T_Adm_PaymentMethod"); name: "T_Adm_PaymentMethod");
@ -5920,9 +6521,6 @@ namespace Kurs.Platform.Migrations
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "T_Sas_ReportParameter"); name: "T_Sas_ReportParameter");
migrationBuilder.DropTable(
name: "T_Sas_Sector");
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "T_Scp_MaterialGroup"); name: "T_Scp_MaterialGroup");
@ -5980,6 +6578,15 @@ namespace Kurs.Platform.Migrations
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "T_Adm_Order"); name: "T_Adm_Order");
migrationBuilder.DropTable(
name: "Partners");
migrationBuilder.DropTable(
name: "T_Crm_Customer");
migrationBuilder.DropTable(
name: "T_Scp_Supply");
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "T_Adm_SkillType"); name: "T_Adm_SkillType");
@ -6040,6 +6647,27 @@ namespace Kurs.Platform.Migrations
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "P_Sas_ListForm"); name: "P_Sas_ListForm");
migrationBuilder.DropTable(
name: "T_Crm_CustomerSegment");
migrationBuilder.DropTable(
name: "T_Crm_CustomerType");
migrationBuilder.DropTable(
name: "P_Sas_Currency");
migrationBuilder.DropTable(
name: "T_Sas_Sector");
migrationBuilder.DropTable(
name: "T_Scp_PaymentTerm");
migrationBuilder.DropTable(
name: "T_Scp_SupplyCardType");
migrationBuilder.DropTable(
name: "T_Scp_SupplyType");
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "T_Crd_QuestionPool"); name: "T_Crd_QuestionPool");
@ -6064,12 +6692,6 @@ namespace Kurs.Platform.Migrations
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "T_Acc_Bank"); name: "T_Acc_Bank");
migrationBuilder.DropTable(
name: "T_Hr_Department");
migrationBuilder.DropTable(
name: "T_Hr_CostCenter");
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "T_Hr_Employee"); name: "T_Hr_Employee");
@ -6084,6 +6706,12 @@ namespace Kurs.Platform.Migrations
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "T_Hr_JobPosition"); name: "T_Hr_JobPosition");
migrationBuilder.DropTable(
name: "T_Hr_Department");
migrationBuilder.DropTable(
name: "T_Hr_CostCenter");
} }
} }
} }

View file

@ -7,7 +7,7 @@ export const mockBusinessParties: BusinessParty[] = [
{ {
id: '1', id: '1',
code: 'SUP001', code: 'SUP001',
supplierType: SupplierTypeEnum.Manufacturer, partyType: PartyType.Supplier,
name: 'ABC Malzeme Ltd.', name: 'ABC Malzeme Ltd.',
primaryContact: { primaryContact: {
id: '2', id: '2',
@ -92,9 +92,9 @@ export const mockBusinessParties: BusinessParty[] = [
lastModificationTime: new Date(), lastModificationTime: new Date(),
}, },
], ],
supplierType: SupplierTypeEnum.Manufacturer,
creationTime: new Date(), creationTime: new Date(),
lastModificationTime: new Date(), lastModificationTime: new Date(),
partyType: PartyType.Supplier,
}, },
{ {
id: '2', id: '2',
@ -404,8 +404,8 @@ export const mockBusinessParties: BusinessParty[] = [
}, },
taxNumber: '0987654321', taxNumber: '0987654321',
registrationNumber: 'REG-002', registrationNumber: 'REG-002',
creditLimit: 500000,
paymentTerms: PaymentTerms.Net60, paymentTerms: PaymentTerms.Net60,
creditLimit: 500000,
currency: 'TRY', currency: 'TRY',
status: BusinessPartyStatusEnum.Active, status: BusinessPartyStatusEnum.Active,
customerSegment: CustomerSegmentEnum.SMB, customerSegment: CustomerSegmentEnum.SMB,

View file

@ -1,5 +1,5 @@
import { EmployeeDto } from '@/proxy/intranet/models'
import { Address, BusinessParty, Contact, PaymentTerms, PriorityEnum } from './common' import { Address, BusinessParty, Contact, PaymentTerms, PriorityEnum } from './common'
import { EmployeeDto } from './hr'
import { MmDelivery, MmMaterial, MmUnit } from './mm' import { MmDelivery, MmMaterial, MmUnit } from './mm'
export interface CrmSalesOrder { export interface CrmSalesOrder {