Cascading Sistemi ve Seeder
This commit is contained in:
parent
ca18bbc6a8
commit
caf9927976
15 changed files with 1199 additions and 1026 deletions
|
|
@ -15,11 +15,12 @@ public class CreateUpdateTenantInput
|
|||
public string Founder { get; set; }
|
||||
public long VknTckn { get; set; }
|
||||
public string TaxOffice { get; set; }
|
||||
public string Address { get; set; }
|
||||
public string Address2 { get; set; }
|
||||
public string District { get; set; }
|
||||
public string Country { get; set; }
|
||||
public string City { get; set; }
|
||||
public string District { get; set; }
|
||||
public string Street { get; set; }
|
||||
public string Address { get; set; }
|
||||
public string Address2 { get; set; }
|
||||
public string PostalCode { get; set; }
|
||||
public long Phone { get; set; }
|
||||
public long Mobile { get; set; }
|
||||
|
|
|
|||
|
|
@ -12,11 +12,12 @@ public class CustomTenantDto
|
|||
public string Founder { get; set; }
|
||||
public long VknTckn { get; set; }
|
||||
public string TaxOffice { get; set; }
|
||||
public string Address { get; set; }
|
||||
public string Address2 { get; set; }
|
||||
public string District { get; set; }
|
||||
public string Country { get; set; }
|
||||
public string City { get; set; }
|
||||
public string District { get; set; }
|
||||
public string Street { get; set; }
|
||||
public string Address { get; set; }
|
||||
public string Address2 { get; set; }
|
||||
public string PostalCode { get; set; }
|
||||
public long Phone { get; set; }
|
||||
public long Mobile { get; set; }
|
||||
|
|
|
|||
|
|
@ -117,11 +117,12 @@ public class ListFormDynamicApiAppService : PlatformAppService, IListFormDynamic
|
|||
entity.SetFounder(input.Data.Founder);
|
||||
entity.SetVknTckn(input.Data.VknTckn);
|
||||
entity.SetTaxOffice(input.Data.TaxOffice);
|
||||
entity.SetAddress(input.Data.Address);
|
||||
entity.SetAddress2(input.Data.Address2);
|
||||
entity.SetDistrict(input.Data.District);
|
||||
entity.SetCountry(input.Data.Country);
|
||||
entity.SetCity(input.Data.City);
|
||||
entity.SetDistrict(input.Data.District);
|
||||
entity.SetStreet(input.Data.Street);
|
||||
entity.SetAddress(input.Data.Address);
|
||||
entity.SetAddress2(input.Data.Address2);
|
||||
entity.SetPostalCode(input.Data.PostalCode);
|
||||
entity.SetPhone(input.Data.Phone);
|
||||
entity.SetMobile(input.Data.Mobile);
|
||||
|
|
@ -150,11 +151,12 @@ public class ListFormDynamicApiAppService : PlatformAppService, IListFormDynamic
|
|||
entity.SetFounder(input.Data.Founder);
|
||||
entity.SetVknTckn(input.Data.VknTckn);
|
||||
entity.SetTaxOffice(input.Data.TaxOffice);
|
||||
entity.SetAddress(input.Data.Address);
|
||||
entity.SetAddress2(input.Data.Address2);
|
||||
entity.SetDistrict(input.Data.District);
|
||||
entity.SetCountry(input.Data.Country);
|
||||
entity.SetCity(input.Data.City);
|
||||
entity.SetDistrict(input.Data.District);
|
||||
entity.SetStreet(input.Data.Street);
|
||||
entity.SetAddress(input.Data.Address);
|
||||
entity.SetAddress2(input.Data.Address2);
|
||||
entity.SetPostalCode(input.Data.PostalCode);
|
||||
entity.SetPhone(input.Data.Phone);
|
||||
entity.SetMobile(input.Data.Mobile);
|
||||
|
|
|
|||
|
|
@ -79,11 +79,12 @@ public class PlatformTenantAppService : TenantAppService, IPlatformTenantAppServ
|
|||
dto.Founder = tenant.GetFounder();
|
||||
dto.VknTckn = tenant.GetVknTckn();
|
||||
dto.TaxOffice = tenant.GetTaxOffice();
|
||||
dto.Address = tenant.GetAddress();
|
||||
dto.Address2 = tenant.GetAddress2();
|
||||
dto.District = tenant.GetDistrict();
|
||||
dto.Country = tenant.GetCountry();
|
||||
dto.City = tenant.GetCity();
|
||||
dto.District = tenant.GetDistrict();
|
||||
dto.Street = tenant.GetStreet();
|
||||
dto.Address = tenant.GetAddress();
|
||||
dto.Address2 = tenant.GetAddress2();
|
||||
dto.PostalCode = tenant.GetPostalCode();
|
||||
dto.Phone = tenant.GetPhone();
|
||||
dto.Mobile = tenant.GetMobile();
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -31,11 +31,12 @@ public static class PlatformConsts
|
|||
public const string VknTckn = "VknTckn";
|
||||
public const string Founder = "Founder";
|
||||
public const string TaxOffice = "TaxOffice";
|
||||
public const string Address = "Address";
|
||||
public const string Address2 = "Address2";
|
||||
public const string Country = "Country";
|
||||
public const string City = "City";
|
||||
public const string District = "District";
|
||||
public const string Street = "Street";
|
||||
public const string Address = "Address";
|
||||
public const string Address2 = "Address2";
|
||||
public const string PostalCode = "PostalCode";
|
||||
public const string Phone = "Phone";
|
||||
public const string Mobile = "Mobile";
|
||||
|
|
|
|||
|
|
@ -10,11 +10,12 @@ public class Branch : FullAuditedEntity<Guid>
|
|||
public string Name { get; set; }
|
||||
public long VknTckn { get; set; }
|
||||
public string TaxOffice { get; set; }
|
||||
public string Address { get; set; }
|
||||
public string Address2 { get; set; }
|
||||
public string District { get; set; }
|
||||
public string Country { get; set; }
|
||||
public string City { get; set; }
|
||||
public string District { get; set; }
|
||||
public string Street { get; set; }
|
||||
public string Address { get; set; }
|
||||
public string Address2 { get; set; }
|
||||
public string PostalCode { get; set; }
|
||||
public long? Phone { get; set; }
|
||||
public long Mobile { get; set; }
|
||||
|
|
|
|||
|
|
@ -52,6 +52,40 @@ public static class AbpTenantExtensions
|
|||
return tenant.GetProperty<string>(PlatformConsts.Tenants.TaxOffice);
|
||||
}
|
||||
|
||||
public static void SetCountry(this Tenant tenant, string country)
|
||||
{
|
||||
tenant.SetProperty(PlatformConsts.Tenants.Country, country);
|
||||
}
|
||||
public static string GetCountry(this Tenant tenant)
|
||||
{
|
||||
return tenant.GetProperty<string>(PlatformConsts.Tenants.Country);
|
||||
}
|
||||
|
||||
public static void SetCity(this Tenant tenant, string city)
|
||||
{
|
||||
tenant.SetProperty(PlatformConsts.Tenants.City, city);
|
||||
}
|
||||
public static string GetCity(this Tenant tenant)
|
||||
{
|
||||
return tenant.GetProperty<string>(PlatformConsts.Tenants.City);
|
||||
}
|
||||
public static void SetDistrict(this Tenant tenant, string district)
|
||||
{
|
||||
tenant.SetProperty(PlatformConsts.Tenants.District, district);
|
||||
}
|
||||
public static string GetDistrict(this Tenant tenant)
|
||||
{
|
||||
return tenant.GetProperty<string>(PlatformConsts.Tenants.District);
|
||||
}
|
||||
public static void SetStreet(this Tenant tenant, string street)
|
||||
{
|
||||
tenant.SetProperty(PlatformConsts.Tenants.Street, street);
|
||||
}
|
||||
public static string GetStreet(this Tenant tenant)
|
||||
{
|
||||
return tenant.GetProperty<string>(PlatformConsts.Tenants.Street);
|
||||
}
|
||||
|
||||
public static void SetAddress(this Tenant tenant, string address)
|
||||
{
|
||||
tenant.SetProperty(PlatformConsts.Tenants.Address, address);
|
||||
|
|
@ -69,35 +103,7 @@ public static class AbpTenantExtensions
|
|||
{
|
||||
return tenant.GetProperty<string>(PlatformConsts.Tenants.Address2);
|
||||
}
|
||||
|
||||
public static void SetDistrict(this Tenant tenant, string district)
|
||||
{
|
||||
tenant.SetProperty(PlatformConsts.Tenants.District, district);
|
||||
}
|
||||
public static string GetDistrict(this Tenant tenant)
|
||||
{
|
||||
return tenant.GetProperty<string>(PlatformConsts.Tenants.District);
|
||||
}
|
||||
|
||||
public static void SetCity(this Tenant tenant, string city)
|
||||
{
|
||||
tenant.SetProperty(PlatformConsts.Tenants.City, city);
|
||||
}
|
||||
public static string GetCity(this Tenant tenant)
|
||||
{
|
||||
return tenant.GetProperty<string>(PlatformConsts.Tenants.City);
|
||||
}
|
||||
|
||||
public static void SetCountry(this Tenant tenant, string country)
|
||||
{
|
||||
tenant.SetProperty(PlatformConsts.Tenants.Country, country);
|
||||
}
|
||||
public static string GetCountry(this Tenant tenant)
|
||||
{
|
||||
return tenant.GetProperty<string>(PlatformConsts.Tenants.Country);
|
||||
}
|
||||
|
||||
public static void SetPostalCode(this Tenant tenant, string postalCode)
|
||||
public static void SetPostalCode(this Tenant tenant, string postalCode)
|
||||
{
|
||||
tenant.SetProperty(PlatformConsts.Tenants.PostalCode, postalCode);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ using Volo.Abp.Domain.Entities.Events;
|
|||
using Volo.Abp.Domain.Repositories;
|
||||
using Volo.Abp.EventBus;
|
||||
using Volo.Abp.TenantManagement;
|
||||
using static Kurs.Settings.SettingsConsts;
|
||||
|
||||
namespace Kurs.Platform.Tenants;
|
||||
|
||||
|
|
|
|||
|
|
@ -91,24 +91,6 @@ public static class PlatformEfCoreEntityExtensionMappings
|
|||
}
|
||||
);
|
||||
|
||||
ObjectExtensionManager.Instance
|
||||
.MapEfCoreProperty<Tenant, string>(
|
||||
PlatformConsts.Tenants.Address,
|
||||
(entityBuilder, propertyBuilder) =>
|
||||
{
|
||||
propertyBuilder.HasMaxLength(256).HasDefaultValue(null);
|
||||
}
|
||||
);
|
||||
|
||||
ObjectExtensionManager.Instance
|
||||
.MapEfCoreProperty<Tenant, string>(
|
||||
PlatformConsts.Tenants.Address2,
|
||||
(entityBuilder, propertyBuilder) =>
|
||||
{
|
||||
propertyBuilder.HasMaxLength(256).HasDefaultValue(null);
|
||||
}
|
||||
);
|
||||
|
||||
ObjectExtensionManager.Instance
|
||||
.MapEfCoreProperty<Tenant, string>(
|
||||
PlatformConsts.Tenants.Country,
|
||||
|
|
@ -136,6 +118,33 @@ public static class PlatformEfCoreEntityExtensionMappings
|
|||
}
|
||||
);
|
||||
|
||||
ObjectExtensionManager.Instance
|
||||
.MapEfCoreProperty<Tenant, string>(
|
||||
PlatformConsts.Tenants.Street,
|
||||
(entityBuilder, propertyBuilder) =>
|
||||
{
|
||||
propertyBuilder.HasMaxLength(128).HasDefaultValue(null);
|
||||
}
|
||||
);
|
||||
|
||||
ObjectExtensionManager.Instance
|
||||
.MapEfCoreProperty<Tenant, string>(
|
||||
PlatformConsts.Tenants.Address,
|
||||
(entityBuilder, propertyBuilder) =>
|
||||
{
|
||||
propertyBuilder.HasMaxLength(256).HasDefaultValue(null);
|
||||
}
|
||||
);
|
||||
|
||||
ObjectExtensionManager.Instance
|
||||
.MapEfCoreProperty<Tenant, string>(
|
||||
PlatformConsts.Tenants.Address2,
|
||||
(entityBuilder, propertyBuilder) =>
|
||||
{
|
||||
propertyBuilder.HasMaxLength(256).HasDefaultValue(null);
|
||||
}
|
||||
);
|
||||
|
||||
ObjectExtensionManager.Instance
|
||||
.MapEfCoreProperty<Tenant, string>(
|
||||
PlatformConsts.Tenants.PostalCode,
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ using Volo.Abp.EntityFrameworkCore;
|
|||
namespace Kurs.Platform.Migrations
|
||||
{
|
||||
[DbContext(typeof(PlatformDbContext))]
|
||||
[Migration("20250819080748_Districs")]
|
||||
partial class Districs
|
||||
[Migration("20250819182323_Districts")]
|
||||
partial class Districts
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
|
|
@ -1276,6 +1276,9 @@ namespace Kurs.Platform.Migrations
|
|||
b.Property<string>("PostalCode")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Street")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("TaxOffice")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
|
|
@ -2182,11 +2185,9 @@ namespace Kurs.Platform.Migrations
|
|||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CountryCode", "CityCode");
|
||||
|
||||
b.HasIndex("CityCode", "Name", "Township", "Street", "ZipCode")
|
||||
b.HasIndex("CountryCode", "CityCode", "Name", "Township", "Street", "ZipCode")
|
||||
.IsUnique()
|
||||
.HasFilter("[Township] IS NOT NULL AND [Street] IS NOT NULL AND [ZipCode] IS NOT NULL");
|
||||
.HasFilter("[CountryCode] IS NOT NULL AND [Township] IS NOT NULL AND [Street] IS NOT NULL AND [ZipCode] IS NOT NULL");
|
||||
|
||||
b.ToTable("PDistrict", (string)null);
|
||||
});
|
||||
|
|
@ -6056,6 +6057,10 @@ namespace Kurs.Platform.Migrations
|
|||
.HasMaxLength(10)
|
||||
.HasColumnType("nvarchar(10)");
|
||||
|
||||
b.Property<string>("Street")
|
||||
.HasMaxLength(128)
|
||||
.HasColumnType("nvarchar(128)");
|
||||
|
||||
b.Property<string>("TaxOffice")
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("nvarchar(64)");
|
||||
|
|
@ -6,7 +6,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
|||
namespace Kurs.Platform.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Districs : Migration
|
||||
public partial class Districts : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
|
|
@ -82,6 +82,19 @@ namespace Kurs.Platform.Migrations
|
|||
maxLength: 20,
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Street",
|
||||
table: "PBranch",
|
||||
type: "nvarchar(max)",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Street",
|
||||
table: "AbpTenants",
|
||||
type: "nvarchar(128)",
|
||||
maxLength: 128,
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddUniqueConstraint(
|
||||
name: "AK_PCity_CountryCode_Code",
|
||||
table: "PCity",
|
||||
|
|
@ -124,16 +137,11 @@ namespace Kurs.Platform.Migrations
|
|||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PDistrict_CityCode_Name_Township_Street_ZipCode",
|
||||
name: "IX_PDistrict_CountryCode_CityCode_Name_Township_Street_ZipCode",
|
||||
table: "PDistrict",
|
||||
columns: new[] { "CityCode", "Name", "Township", "Street", "ZipCode" },
|
||||
columns: new[] { "CountryCode", "CityCode", "Name", "Township", "Street", "ZipCode" },
|
||||
unique: true,
|
||||
filter: "[Township] IS NOT NULL AND [Street] IS NOT NULL AND [ZipCode] IS NOT NULL");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PDistrict_CountryCode_CityCode",
|
||||
table: "PDistrict",
|
||||
columns: new[] { "CountryCode", "CityCode" });
|
||||
filter: "[CountryCode] IS NOT NULL AND [Township] IS NOT NULL AND [Street] IS NOT NULL AND [ZipCode] IS NOT NULL");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
|
@ -154,6 +162,14 @@ namespace Kurs.Platform.Migrations
|
|||
name: "PlateCode",
|
||||
table: "PCity");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Street",
|
||||
table: "PBranch");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Street",
|
||||
table: "AbpTenants");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Phone",
|
||||
table: "PDemo",
|
||||
|
|
@ -1273,6 +1273,9 @@ namespace Kurs.Platform.Migrations
|
|||
b.Property<string>("PostalCode")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Street")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("TaxOffice")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
|
|
@ -2179,11 +2182,9 @@ namespace Kurs.Platform.Migrations
|
|||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CountryCode", "CityCode");
|
||||
|
||||
b.HasIndex("CityCode", "Name", "Township", "Street", "ZipCode")
|
||||
b.HasIndex("CountryCode", "CityCode", "Name", "Township", "Street", "ZipCode")
|
||||
.IsUnique()
|
||||
.HasFilter("[Township] IS NOT NULL AND [Street] IS NOT NULL AND [ZipCode] IS NOT NULL");
|
||||
.HasFilter("[CountryCode] IS NOT NULL AND [Township] IS NOT NULL AND [Street] IS NOT NULL AND [ZipCode] IS NOT NULL");
|
||||
|
||||
b.ToTable("PDistrict", (string)null);
|
||||
});
|
||||
|
|
@ -6053,6 +6054,10 @@ namespace Kurs.Platform.Migrations
|
|||
.HasMaxLength(10)
|
||||
.HasColumnType("nvarchar(10)");
|
||||
|
||||
b.Property<string>("Street")
|
||||
.HasMaxLength(128)
|
||||
.HasColumnType("nvarchar(128)");
|
||||
|
||||
b.Property<string>("TaxOffice")
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("nvarchar(64)");
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ define(['./workbox-54d0af47'], (function (workbox) { 'use strict';
|
|||
"revision": "3ca0b8505b4bec776b69afdba2768812"
|
||||
}, {
|
||||
"url": "index.html",
|
||||
"revision": "0.8rvvf2rf6hg"
|
||||
"revision": "0.vah6gtb83uo"
|
||||
}], {});
|
||||
workbox.cleanupOutdatedCaches();
|
||||
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@ import './index.css'
|
|||
import { UiEvalService } from './services/UiEvalService'
|
||||
import 'devextreme-react/text-area'
|
||||
import 'devextreme-react/html-editor'
|
||||
import config from 'devextreme/core/config'
|
||||
import { licenseKey } from './devextreme-license'
|
||||
// import config from 'devextreme/core/config'
|
||||
// import { licenseKey } from './devextreme-license'
|
||||
|
||||
// Lisansı uygulama başlamadan önce kaydediyoruz
|
||||
config({ licenseKey })
|
||||
// // Lisansı uygulama başlamadan önce kaydediyoruz
|
||||
// config({ licenseKey })
|
||||
|
||||
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(<App />)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue