Entity ve listeler için Tenant ve Branch düzenlemesi
This commit is contained in:
parent
c2f8bbe083
commit
21e2724bf3
105 changed files with 15954 additions and 613928 deletions
|
|
@ -48,21 +48,4 @@ public class AboutDto : EntityDto<Guid>
|
|||
}
|
||||
set { SectionsJson = JsonSerializer.Serialize(value); }
|
||||
}
|
||||
|
||||
public class StatDto
|
||||
{
|
||||
public string Icon { get; set; }
|
||||
public string Value { get; set; } // number/string farkını normalize ettik
|
||||
public string LabelKey { get; set; }
|
||||
public bool? UseCounter { get; set; }
|
||||
public int? CounterEnd { get; set; }
|
||||
public string CounterSuffix { get; set; }
|
||||
public int? CounterDuration { get; set; }
|
||||
}
|
||||
|
||||
public class SectionDto
|
||||
{
|
||||
public string Key { get; set; }
|
||||
public string DescKey { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
namespace Kurs.Platform.Abouts;
|
||||
|
||||
public class SectionDto
|
||||
{
|
||||
public string Key { get; set; }
|
||||
public string DescKey { get; set; }
|
||||
}
|
||||
12
api/src/Kurs.Platform.Application.Contracts/About/StatDto.cs
Normal file
12
api/src/Kurs.Platform.Application.Contracts/About/StatDto.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
namespace Kurs.Platform.Abouts;
|
||||
|
||||
public class StatDto
|
||||
{
|
||||
public string Icon { get; set; }
|
||||
public string Value { get; set; } // number/string farkını normalize ettik
|
||||
public string LabelKey { get; set; }
|
||||
public bool? UseCounter { get; set; }
|
||||
public int? CounterEnd { get; set; }
|
||||
public string CounterSuffix { get; set; }
|
||||
public int? CounterDuration { get; set; }
|
||||
}
|
||||
|
|
@ -29,16 +29,29 @@
|
|||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<None Remove="Seeds\SeederData.json" />
|
||||
<Content Include="Seeds\SeederData.json">
|
||||
<None Remove="Seeds\TenantData.json" />
|
||||
<Content Include="Seeds\TenantData.json">
|
||||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Seeds\SeederData.Dev.json">
|
||||
<Content Include="Seeds\TenantData.Dev.json">
|
||||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Seeds\SeederData.Production.json">
|
||||
<Content Include="Seeds\TenantData.Production.json">
|
||||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<None Remove="Seeds\BranchData.json" />
|
||||
<Content Include="Seeds\BranchData.json">
|
||||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Seeds\BranchData.Dev.json">
|
||||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Seeds\BranchData.Production.json">
|
||||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
|
|
|
|||
777
api/src/Kurs.Platform.DbMigrator/Seeds/BranchData.json
Normal file
777
api/src/Kurs.Platform.DbMigrator/Seeds/BranchData.json
Normal file
|
|
@ -0,0 +1,777 @@
|
|||
{
|
||||
"RegistrationTypes": [
|
||||
{
|
||||
"Name": "GRUP",
|
||||
"Status": "Aktif"
|
||||
},
|
||||
{
|
||||
"Name": "ÖZEL",
|
||||
"Status": "Aktif"
|
||||
}
|
||||
],
|
||||
"RegistrationMethods": [
|
||||
{
|
||||
"RegistrationTypeName": "GRUP",
|
||||
"Name": "Normal Paket",
|
||||
"Status": "Aktif"
|
||||
},
|
||||
{
|
||||
"RegistrationTypeName": "GRUP",
|
||||
"Name": "Erken Kayıt",
|
||||
"Status": "Aktif"
|
||||
},
|
||||
{
|
||||
"RegistrationTypeName": "ÖZEL",
|
||||
"Name": "ÖZEL",
|
||||
"Status": "Aktif"
|
||||
}
|
||||
],
|
||||
"ClassTypes": [
|
||||
{
|
||||
"RegistrationTypeName": "GRUP",
|
||||
"Name": "3-6 Kişilik",
|
||||
"MinStudentCount": 3,
|
||||
"MaxStudentCount": 6,
|
||||
"Status": "Aktif"
|
||||
},
|
||||
{
|
||||
"RegistrationTypeName": "GRUP",
|
||||
"Name": "5-8 Kişilik",
|
||||
"MinStudentCount": 5,
|
||||
"MaxStudentCount": 8,
|
||||
"Status": "Aktif"
|
||||
},
|
||||
{
|
||||
"RegistrationTypeName": "ÖZEL",
|
||||
"Name": "ÖZEL",
|
||||
"MinStudentCount": 1,
|
||||
"MaxStudentCount": 1,
|
||||
"Status": "Aktif"
|
||||
}
|
||||
],
|
||||
"Classes": [
|
||||
{
|
||||
"ClassTypeName": "3-6 Kişilik",
|
||||
"Name": "201",
|
||||
"Status": "Aktif"
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "3-6 Kişilik",
|
||||
"Name": "202",
|
||||
"Status": "Aktif"
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "5-8 Kişilik",
|
||||
"Name": "BODRUM",
|
||||
"Status": "Aktif"
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "5-8 Kişilik",
|
||||
"Name": "FLORIDA",
|
||||
"Status": "Aktif"
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "ÖZEL",
|
||||
"Name": "ÖZEL",
|
||||
"Status": "Aktif"
|
||||
}
|
||||
],
|
||||
"Levels": [
|
||||
{
|
||||
"ClassTypeName": "3-6 Kişilik",
|
||||
"Name": "Seviye",
|
||||
"LevelType": "A1",
|
||||
"LessonCount": 80,
|
||||
"Status": "Aktif",
|
||||
"LessonDuration": 2,
|
||||
"MonthlyPaymentRate": 20.0
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "3-6 Kişilik",
|
||||
"Name": "Seviye",
|
||||
"LevelType": "A2",
|
||||
"LessonCount": 90,
|
||||
"Status": "Aktif",
|
||||
"LessonDuration": 3,
|
||||
"MonthlyPaymentRate": 30.0
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "3-6 Kişilik",
|
||||
"Name": "Seviye",
|
||||
"LevelType": "B1",
|
||||
"LessonCount": 90,
|
||||
"Status": "Aktif",
|
||||
"LessonDuration": null,
|
||||
"MonthlyPaymentRate": null
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "3-6 Kişilik",
|
||||
"Name": "Seviye",
|
||||
"LevelType": "B2",
|
||||
"LessonCount": 80,
|
||||
"Status": "Aktif",
|
||||
"LessonDuration": null,
|
||||
"MonthlyPaymentRate": null
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "3-6 Kişilik",
|
||||
"Name": "Seviye",
|
||||
"LevelType": "C1",
|
||||
"LessonCount": 80,
|
||||
"Status": "Aktif",
|
||||
"LessonDuration": null,
|
||||
"MonthlyPaymentRate": null
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "3-6 Kişilik",
|
||||
"Name": "Seviye",
|
||||
"LevelType": "C2",
|
||||
"LessonCount": 80,
|
||||
"Status": "Aktif",
|
||||
"LessonDuration": null,
|
||||
"MonthlyPaymentRate": null
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "3-6 Kişilik",
|
||||
"Name": "Sınav Eğitimi",
|
||||
"LevelType": "BULATS",
|
||||
"LessonCount": 50,
|
||||
"Status": "Aktif",
|
||||
"LessonDuration": null,
|
||||
"MonthlyPaymentRate": null
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "3-6 Kişilik",
|
||||
"Name": "Sınav Eğitimi",
|
||||
"LevelType": "GMAT",
|
||||
"LessonCount": 50,
|
||||
"Status": "Aktif",
|
||||
"LessonDuration": null,
|
||||
"MonthlyPaymentRate": null
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "3-6 Kişilik",
|
||||
"Name": "Sınav Eğitimi",
|
||||
"LevelType": "YDS",
|
||||
"LessonCount": 50,
|
||||
"Status": "Aktif",
|
||||
"LessonDuration": null,
|
||||
"MonthlyPaymentRate": null
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "3-6 Kişilik",
|
||||
"Name": "Sınav Eğitimi",
|
||||
"LevelType": "ÜDS",
|
||||
"LessonCount": 50,
|
||||
"Status": "Aktif",
|
||||
"LessonDuration": null,
|
||||
"MonthlyPaymentRate": null
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "5-8 Kişilik",
|
||||
"Name": "Seviye",
|
||||
"LevelType": "A1",
|
||||
"LessonCount": 80,
|
||||
"Status": "Aktif",
|
||||
"LessonDuration": 3,
|
||||
"MonthlyPaymentRate": 30.0
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "5-8 Kişilik",
|
||||
"Name": "Seviye",
|
||||
"LevelType": "A2",
|
||||
"LessonCount": 80,
|
||||
"Status": "Aktif",
|
||||
"LessonDuration": null,
|
||||
"MonthlyPaymentRate": null
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "5-8 Kişilik",
|
||||
"Name": "Seviye",
|
||||
"LevelType": "B1",
|
||||
"LessonCount": 80,
|
||||
"Status": "Aktif",
|
||||
"LessonDuration": null,
|
||||
"MonthlyPaymentRate": null
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "5-8 Kişilik",
|
||||
"Name": "Seviye",
|
||||
"LevelType": "B2",
|
||||
"LessonCount": 80,
|
||||
"Status": "Aktif",
|
||||
"LessonDuration": null,
|
||||
"MonthlyPaymentRate": null
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "5-8 Kişilik",
|
||||
"Name": "Seviye",
|
||||
"LevelType": "C1",
|
||||
"LessonCount": 80,
|
||||
"Status": "Aktif",
|
||||
"LessonDuration": null,
|
||||
"MonthlyPaymentRate": null
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "5-8 Kişilik",
|
||||
"Name": "Seviye",
|
||||
"LevelType": "C2",
|
||||
"LessonCount": 80,
|
||||
"Status": "Aktif",
|
||||
"LessonDuration": null,
|
||||
"MonthlyPaymentRate": null
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "5-8 Kişilik",
|
||||
"Name": "Sınav Eğitimi",
|
||||
"LevelType": "IELTS",
|
||||
"LessonCount": 50,
|
||||
"Status": "Aktif",
|
||||
"LessonDuration": null,
|
||||
"MonthlyPaymentRate": null
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "5-8 Kişilik",
|
||||
"Name": "Sınav Eğitimi",
|
||||
"LevelType": "TOEFL",
|
||||
"LessonCount": 50,
|
||||
"Status": "Aktif",
|
||||
"LessonDuration": null,
|
||||
"MonthlyPaymentRate": null
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "5-8 Kişilik",
|
||||
"Name": "Sınav Eğitimi",
|
||||
"LevelType": "BULATS",
|
||||
"LessonCount": 50,
|
||||
"Status": "Aktif",
|
||||
"LessonDuration": null,
|
||||
"MonthlyPaymentRate": null
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "5-8 Kişilik",
|
||||
"Name": "Sınav Eğitimi",
|
||||
"LevelType": "GMAT",
|
||||
"LessonCount": 50,
|
||||
"Status": "Aktif",
|
||||
"LessonDuration": null,
|
||||
"MonthlyPaymentRate": null
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "5-8 Kişilik",
|
||||
"Name": "Sınav Eğitimi",
|
||||
"LevelType": "YDS",
|
||||
"LessonCount": 50,
|
||||
"Status": "Aktif",
|
||||
"LessonDuration": null,
|
||||
"MonthlyPaymentRate": null
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "5-8 Kişilik",
|
||||
"Name": "Sınav Eğitimi",
|
||||
"LevelType": "PROFICIENCY",
|
||||
"LessonCount": 50,
|
||||
"Status": "Aktif",
|
||||
"LessonDuration": null,
|
||||
"MonthlyPaymentRate": null
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "5-8 Kişilik",
|
||||
"Name": "Sınav Eğitimi",
|
||||
"LevelType": "SAT",
|
||||
"LessonCount": 50,
|
||||
"Status": "Aktif",
|
||||
"LessonDuration": null,
|
||||
"MonthlyPaymentRate": null
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "5-8 Kişilik",
|
||||
"Name": "Sınav Eğitimi",
|
||||
"LevelType": "TOEIC",
|
||||
"LessonCount": 50,
|
||||
"Status": "Aktif",
|
||||
"LessonDuration": null,
|
||||
"MonthlyPaymentRate": null
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "5-8 Kişilik",
|
||||
"Name": "Sınav Eğitimi",
|
||||
"LevelType": "ÜDS",
|
||||
"LessonCount": 50,
|
||||
"Status": "Aktif",
|
||||
"LessonDuration": null,
|
||||
"MonthlyPaymentRate": null
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "5-8 Kişilik",
|
||||
"Name": "Sınav Eğitimi",
|
||||
"LevelType": "SAT2",
|
||||
"LessonCount": 50,
|
||||
"Status": "Aktif",
|
||||
"LessonDuration": null,
|
||||
"MonthlyPaymentRate": null
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "ÖZEL",
|
||||
"Name": "Seviye",
|
||||
"LevelType": "A1",
|
||||
"LessonCount": 60,
|
||||
"Status": "Aktif",
|
||||
"LessonDuration": null,
|
||||
"MonthlyPaymentRate": null
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "ÖZEL",
|
||||
"Name": "Seviye",
|
||||
"LevelType": "A2",
|
||||
"LessonCount": 70,
|
||||
"Status": "Aktif",
|
||||
"LessonDuration": null,
|
||||
"MonthlyPaymentRate": null
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "ÖZEL",
|
||||
"Name": "Seviye",
|
||||
"LevelType": "B1",
|
||||
"LessonCount": 80,
|
||||
"Status": "Aktif",
|
||||
"LessonDuration": null,
|
||||
"MonthlyPaymentRate": null
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "ÖZEL",
|
||||
"Name": "Seviye",
|
||||
"LevelType": "B2",
|
||||
"LessonCount": 80,
|
||||
"Status": "Aktif",
|
||||
"LessonDuration": null,
|
||||
"MonthlyPaymentRate": null
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "ÖZEL",
|
||||
"Name": "Seviye",
|
||||
"LevelType": "C1",
|
||||
"LessonCount": 90,
|
||||
"Status": "Aktif",
|
||||
"LessonDuration": null,
|
||||
"MonthlyPaymentRate": null
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "ÖZEL",
|
||||
"Name": "Seviye",
|
||||
"LevelType": "C2",
|
||||
"LessonCount": 90,
|
||||
"Status": "Aktif",
|
||||
"LessonDuration": null,
|
||||
"MonthlyPaymentRate": null
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "ÖZEL",
|
||||
"Name": "Sınav Eğitimi",
|
||||
"LevelType": "BULATS",
|
||||
"LessonCount": 80,
|
||||
"Status": "Aktif",
|
||||
"LessonDuration": null,
|
||||
"MonthlyPaymentRate": null
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "ÖZEL",
|
||||
"Name": "Sınav Eğitimi",
|
||||
"LevelType": "GMAT",
|
||||
"LessonCount": 80,
|
||||
"Status": "Aktif",
|
||||
"LessonDuration": null,
|
||||
"MonthlyPaymentRate": null
|
||||
},
|
||||
{
|
||||
"ClassTypeName": "ÖZEL",
|
||||
"Name": "Sınav Eğitimi",
|
||||
"LevelType": "ÜDS",
|
||||
"LessonCount": 80,
|
||||
"Status": "Aktif",
|
||||
"LessonDuration": null,
|
||||
"MonthlyPaymentRate": null
|
||||
}
|
||||
],
|
||||
"Schedules": [
|
||||
{
|
||||
"Name": "HİA",
|
||||
"Status": "Aktif",
|
||||
"StartTime": "19:30",
|
||||
"EndTime": "22:05",
|
||||
"LessonMinute": 45,
|
||||
"LessonBreakMinute": 10,
|
||||
"LessonCount": 3,
|
||||
"LunchTime": null,
|
||||
"LunchMinute": 0,
|
||||
"IncludeLunch": false,
|
||||
"Monday": true,
|
||||
"Tuesday": true,
|
||||
"Wednesday": true,
|
||||
"Thursday": true,
|
||||
"Friday": false,
|
||||
"Saturday": false,
|
||||
"Sunday": false
|
||||
},
|
||||
{
|
||||
"Name": "HİÖ",
|
||||
"Status": "Aktif",
|
||||
"StartTime": "16:00",
|
||||
"EndTime": "18:20",
|
||||
"LessonMinute": 40,
|
||||
"LessonBreakMinute": 10,
|
||||
"LessonCount": 3,
|
||||
"LunchTime": null,
|
||||
"LunchMinute": 0,
|
||||
"IncludeLunch": false,
|
||||
"Monday": true,
|
||||
"Tuesday": true,
|
||||
"Wednesday": true,
|
||||
"Thursday": true,
|
||||
"Friday": true,
|
||||
"Saturday": false,
|
||||
"Sunday": false
|
||||
},
|
||||
{
|
||||
"Name": "HİS-2",
|
||||
"Status": "Aktif",
|
||||
"StartTime": "10:00",
|
||||
"EndTime": "13:10",
|
||||
"LessonMinute": 40,
|
||||
"LessonBreakMinute": 10,
|
||||
"LessonCount": 4,
|
||||
"LunchTime": null,
|
||||
"LunchMinute": 0,
|
||||
"IncludeLunch": false,
|
||||
"Monday": true,
|
||||
"Tuesday": true,
|
||||
"Wednesday": true,
|
||||
"Thursday": true,
|
||||
"Friday": false,
|
||||
"Saturday": false,
|
||||
"Sunday": false
|
||||
},
|
||||
{
|
||||
"Name": "HSA",
|
||||
"Status": "Aktif",
|
||||
"StartTime": "17:00",
|
||||
"EndTime": "20:10",
|
||||
"LessonMinute": 40,
|
||||
"LessonBreakMinute": 10,
|
||||
"LessonCount": 4,
|
||||
"LunchTime": null,
|
||||
"LunchMinute": 0,
|
||||
"IncludeLunch": false,
|
||||
"Monday": false,
|
||||
"Tuesday": false,
|
||||
"Wednesday": false,
|
||||
"Thursday": false,
|
||||
"Friday": false,
|
||||
"Saturday": true,
|
||||
"Sunday": true
|
||||
},
|
||||
{
|
||||
"Name": "HSS-CP",
|
||||
"Status": "Aktif",
|
||||
"StartTime": "09:00",
|
||||
"EndTime": "12:10",
|
||||
"LessonMinute": 40,
|
||||
"LessonBreakMinute": 10,
|
||||
"LessonCount": 4,
|
||||
"LunchTime": null,
|
||||
"LunchMinute": 0,
|
||||
"IncludeLunch": false,
|
||||
"Monday": false,
|
||||
"Tuesday": false,
|
||||
"Wednesday": false,
|
||||
"Thursday": false,
|
||||
"Friday": false,
|
||||
"Saturday": true,
|
||||
"Sunday": true
|
||||
},
|
||||
{
|
||||
"Name": "HSÖ",
|
||||
"Status": "Aktif",
|
||||
"StartTime": "13:00",
|
||||
"EndTime": "16:10",
|
||||
"LessonMinute": 40,
|
||||
"LessonBreakMinute": 10,
|
||||
"LessonCount": 4,
|
||||
"LunchTime": null,
|
||||
"LunchMinute": 0,
|
||||
"IncludeLunch": false,
|
||||
"Monday": false,
|
||||
"Tuesday": false,
|
||||
"Wednesday": false,
|
||||
"Thursday": false,
|
||||
"Friday": false,
|
||||
"Saturday": true,
|
||||
"Sunday": true
|
||||
},
|
||||
{
|
||||
"Name": "HİÖ-SP",
|
||||
"Status": "Aktif",
|
||||
"StartTime": "13:00",
|
||||
"EndTime": "16:10",
|
||||
"LessonMinute": 40,
|
||||
"LessonBreakMinute": 10,
|
||||
"LessonCount": 4,
|
||||
"LunchTime": null,
|
||||
"LunchMinute": 0,
|
||||
"IncludeLunch": false,
|
||||
"Monday": false,
|
||||
"Tuesday": false,
|
||||
"Wednesday": true,
|
||||
"Thursday": false,
|
||||
"Friday": true,
|
||||
"Saturday": false,
|
||||
"Sunday": false
|
||||
},
|
||||
{
|
||||
"Name": "HİÖ-PÇC",
|
||||
"Status": "Aktif",
|
||||
"StartTime": "14:30",
|
||||
"EndTime": "17:25",
|
||||
"LessonMinute": 40,
|
||||
"LessonBreakMinute": 5,
|
||||
"LessonCount": 4,
|
||||
"LunchTime": null,
|
||||
"LunchMinute": 0,
|
||||
"IncludeLunch": false,
|
||||
"Monday": true,
|
||||
"Tuesday": true,
|
||||
"Wednesday": true,
|
||||
"Thursday": false,
|
||||
"Friday": true,
|
||||
"Saturday": false,
|
||||
"Sunday": false
|
||||
},
|
||||
{
|
||||
"Name": "HiÖ-ÇC",
|
||||
"Status": "Aktif",
|
||||
"StartTime": "15:00",
|
||||
"EndTime": "16:30",
|
||||
"LessonMinute": 40,
|
||||
"LessonBreakMinute": 10,
|
||||
"LessonCount": 2,
|
||||
"LunchTime": null,
|
||||
"LunchMinute": 0,
|
||||
"IncludeLunch": false,
|
||||
"Monday": false,
|
||||
"Tuesday": true,
|
||||
"Wednesday": true,
|
||||
"Thursday": false,
|
||||
"Friday": true,
|
||||
"Saturday": false,
|
||||
"Sunday": false
|
||||
},
|
||||
{
|
||||
"Name": "HİA-PC",
|
||||
"Status": "Aktif",
|
||||
"StartTime": "16:00",
|
||||
"EndTime": "19:10",
|
||||
"LessonMinute": 40,
|
||||
"LessonBreakMinute": 10,
|
||||
"LessonCount": 4,
|
||||
"LunchTime": null,
|
||||
"LunchMinute": 0,
|
||||
"IncludeLunch": false,
|
||||
"Monday": true,
|
||||
"Tuesday": false,
|
||||
"Wednesday": false,
|
||||
"Thursday": false,
|
||||
"Friday": true,
|
||||
"Saturday": false,
|
||||
"Sunday": false
|
||||
},
|
||||
{
|
||||
"Name": "HİA-PS",
|
||||
"Status": "Aktif",
|
||||
"StartTime": "18:00",
|
||||
"EndTime": "21:10",
|
||||
"LessonMinute": 40,
|
||||
"LessonBreakMinute": 10,
|
||||
"LessonCount": 4,
|
||||
"LunchTime": null,
|
||||
"LunchMinute": 0,
|
||||
"IncludeLunch": false,
|
||||
"Monday": true,
|
||||
"Tuesday": true,
|
||||
"Wednesday": false,
|
||||
"Thursday": false,
|
||||
"Friday": false,
|
||||
"Saturday": false,
|
||||
"Sunday": false
|
||||
}
|
||||
],
|
||||
"LessonPeriods": [
|
||||
{
|
||||
"Name": "1. DİLİM",
|
||||
"Day": "Pazartesi",
|
||||
"Lesson1": "Ana",
|
||||
"Lesson2": "Ana",
|
||||
"Lesson3": "Ek",
|
||||
"Lesson4": "Ek"
|
||||
},
|
||||
{
|
||||
"Name": "1. DİLİM",
|
||||
"Day": "Salı",
|
||||
"Lesson1": "Ana",
|
||||
"Lesson2": "Ana",
|
||||
"Lesson3": "Ek",
|
||||
"Lesson4": "Ek"
|
||||
},
|
||||
{
|
||||
"Name": "1. DİLİM",
|
||||
"Day": "Çarşamba",
|
||||
"Lesson1": "Ana",
|
||||
"Lesson2": "Ana",
|
||||
"Lesson3": "Ek",
|
||||
"Lesson4": "Ek"
|
||||
},
|
||||
{
|
||||
"Name": "1. DİLİM",
|
||||
"Day": "Perşembe",
|
||||
"Lesson1": "Ana",
|
||||
"Lesson2": "Ana",
|
||||
"Lesson3": "Ek",
|
||||
"Lesson4": "Ek"
|
||||
},
|
||||
{
|
||||
"Name": "1. DİLİM",
|
||||
"Day": "Cuma",
|
||||
"Lesson1": "Ana",
|
||||
"Lesson2": "Ana",
|
||||
"Lesson3": "Ek",
|
||||
"Lesson4": "Ek"
|
||||
},
|
||||
{
|
||||
"Name": "1. DİLİM",
|
||||
"Day": "Cumartesi",
|
||||
"Lesson1": "Ana",
|
||||
"Lesson2": "Ana",
|
||||
"Lesson3": "Ek",
|
||||
"Lesson4": "Ek"
|
||||
},
|
||||
{
|
||||
"Name": "1. DİLİM",
|
||||
"Day": "Pazar",
|
||||
"Lesson1": "Ana",
|
||||
"Lesson2": "Ana",
|
||||
"Lesson3": "Ek",
|
||||
"Lesson4": "Ek"
|
||||
},
|
||||
{
|
||||
"Name": "2. DİLİM",
|
||||
"Day": "Pazartesi",
|
||||
"Lesson1": "Ek",
|
||||
"Lesson2": "Ek",
|
||||
"Lesson3": "Ana",
|
||||
"Lesson4": "Ana"
|
||||
},
|
||||
{
|
||||
"Name": "2. DİLİM",
|
||||
"Day": "Salı",
|
||||
"Lesson1": "Ek",
|
||||
"Lesson2": "Ek",
|
||||
"Lesson3": "Ana",
|
||||
"Lesson4": "Ana"
|
||||
},
|
||||
{
|
||||
"Name": "2. DİLİM",
|
||||
"Day": "Çarşamba",
|
||||
"Lesson1": "Ek",
|
||||
"Lesson2": "Ek",
|
||||
"Lesson3": "Ana",
|
||||
"Lesson4": "Ana"
|
||||
},
|
||||
{
|
||||
"Name": "2. DİLİM",
|
||||
"Day": "Perşembe",
|
||||
"Lesson1": "Ek",
|
||||
"Lesson2": "Ek",
|
||||
"Lesson3": "Ana",
|
||||
"Lesson4": "Ana"
|
||||
},
|
||||
{
|
||||
"Name": "2. DİLİM",
|
||||
"Day": "Cuma",
|
||||
"Lesson1": "Ek",
|
||||
"Lesson2": "Ek",
|
||||
"Lesson3": "Ana",
|
||||
"Lesson4": "Ana"
|
||||
},
|
||||
{
|
||||
"Name": "2. DİLİM",
|
||||
"Day": "Cumartesi",
|
||||
"Lesson1": "Ek",
|
||||
"Lesson2": "Ek",
|
||||
"Lesson3": "Ana",
|
||||
"Lesson4": "Ana"
|
||||
},
|
||||
{
|
||||
"Name": "2. DİLİM",
|
||||
"Day": "Pazar",
|
||||
"Lesson1": "Ek",
|
||||
"Lesson2": "Ek",
|
||||
"Lesson3": "Ana",
|
||||
"Lesson4": "Ana"
|
||||
},
|
||||
{
|
||||
"Name": "TÜMÜ",
|
||||
"Day": "Pazartesi",
|
||||
"Lesson1": "Ana",
|
||||
"Lesson2": "Ana",
|
||||
"Lesson3": "Ana",
|
||||
"Lesson4": "Ana"
|
||||
},
|
||||
{
|
||||
"Name": "TÜMÜ",
|
||||
"Day": "Salı",
|
||||
"Lesson1": "Ana",
|
||||
"Lesson2": "Ana",
|
||||
"Lesson3": "Ana",
|
||||
"Lesson4": "Ana"
|
||||
},
|
||||
{
|
||||
"Name": "TÜMÜ",
|
||||
"Day": "Çarşamba",
|
||||
"Lesson1": "Ana",
|
||||
"Lesson2": "Ana",
|
||||
"Lesson3": "Ana",
|
||||
"Lesson4": "Ana"
|
||||
},
|
||||
{
|
||||
"Name": "TÜMÜ",
|
||||
"Day": "Perşembe",
|
||||
"Lesson1": "Ana",
|
||||
"Lesson2": "Ana",
|
||||
"Lesson3": "Ana",
|
||||
"Lesson4": "Ana"
|
||||
},
|
||||
{
|
||||
"Name": "TÜMÜ",
|
||||
"Day": "Cuma",
|
||||
"Lesson1": "Ana",
|
||||
"Lesson2": "Ana",
|
||||
"Lesson3": "Ana",
|
||||
"Lesson4": "Ana"
|
||||
},
|
||||
{
|
||||
"Name": "TÜMÜ",
|
||||
"Day": "Cumartesi",
|
||||
"Lesson1": "Ana",
|
||||
"Lesson2": "Ana",
|
||||
"Lesson3": "Ana",
|
||||
"Lesson4": "Ana"
|
||||
},
|
||||
{
|
||||
"Name": "TÜMÜ",
|
||||
"Day": "Pazar",
|
||||
"Lesson1": "Ana",
|
||||
"Lesson2": "Ana",
|
||||
"Lesson3": "Ana",
|
||||
"Lesson4": "Ana"
|
||||
}
|
||||
]
|
||||
}
|
||||
86
api/src/Kurs.Platform.DbMigrator/Seeds/BranchSeederDto.cs
Normal file
86
api/src/Kurs.Platform.DbMigrator/Seeds/BranchSeederDto.cs
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Kurs.Platform.Seeds;
|
||||
|
||||
public class BranchSeederDto
|
||||
{
|
||||
public List<RegistrationTypeSeedDto> RegistrationTypes { get; set; }
|
||||
public List<RegistrationMethodSeedDto> RegistrationMethods { get; set; }
|
||||
public List<ClassTypeSeedDto> ClassTypes { get; set; }
|
||||
public List<ClassSeedDto> Classes { get; set; }
|
||||
public List<LevelSeedDto> Levels { get; set; }
|
||||
public List<LessonPeriodSeedDto> LessonPeriods { get; set; }
|
||||
public List<ScheduleSeedDto> Schedules { get; set; }
|
||||
}
|
||||
|
||||
public class RegistrationTypeSeedDto
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Status { get; set; }
|
||||
}
|
||||
|
||||
public class RegistrationMethodSeedDto
|
||||
{
|
||||
public string RegistrationTypeName { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Status { get; set; }
|
||||
}
|
||||
|
||||
public class ClassTypeSeedDto
|
||||
{
|
||||
public string RegistrationTypeName { get; set; }
|
||||
public string Name { get; set; }
|
||||
public int? MinStudentCount { get; set; }
|
||||
public int? MaxStudentCount { get; set; }
|
||||
public string Status { get; set; }
|
||||
}
|
||||
|
||||
public class ClassSeedDto
|
||||
{
|
||||
public string ClassTypeName { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Status { get; set; }
|
||||
}
|
||||
|
||||
public class LevelSeedDto
|
||||
{
|
||||
public string ClassTypeName { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string LevelType { get; set; }
|
||||
public int LessonCount { get; set; }
|
||||
public string Status { get; set; }
|
||||
public int? LessonDuration { get; set; }
|
||||
public decimal? MonthlyPaymentRate { get; set; }
|
||||
}
|
||||
|
||||
public class LessonPeriodSeedDto
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Day { get; set; }
|
||||
|
||||
public string Lesson1 { get; set; }
|
||||
public string Lesson2 { get; set; }
|
||||
public string Lesson3 { get; set; }
|
||||
public string Lesson4 { get; set; }
|
||||
}
|
||||
|
||||
public class ScheduleSeedDto
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Status { get; set; }
|
||||
public string StartTime { get; set; }
|
||||
public string EndTime { get; set; }
|
||||
public int LessonMinute { get; set; }
|
||||
public int LessonBreakMinute { get; set; }
|
||||
public int LessonCount { get; set; }
|
||||
public string LunchTime { get; set; }
|
||||
public int? LunchMinute { get; set; }
|
||||
public bool? IncludeLunch { get; set; }
|
||||
public bool? Monday { get; set; }
|
||||
public bool? Tuesday { get; set; }
|
||||
public bool? Wednesday { get; set; }
|
||||
public bool? Thursday { get; set; }
|
||||
public bool? Friday { get; set; }
|
||||
public bool? Saturday { get; set; }
|
||||
public bool? Sunday { get; set; }
|
||||
}
|
||||
|
|
@ -0,0 +1,231 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Text.Json;
|
||||
using System.Threading.Tasks;
|
||||
using Kurs.Platform.Entities;
|
||||
using Kurs.Platform.Seeds;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Volo.Abp.Data;
|
||||
using Volo.Abp.DependencyInjection;
|
||||
using Volo.Abp.Domain.Repositories;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Kurs.Languages.Entities;
|
||||
using Kurs.Settings.Entities;
|
||||
|
||||
namespace Kurs.Platform.Data.Seeds;
|
||||
|
||||
public class PlatformBranchDataSeeder : ITransientDependency
|
||||
{
|
||||
private readonly IRepository<Language, Guid> _languages;
|
||||
private readonly IRepository<LanguageKey, Guid> _languageKey;
|
||||
private readonly IRepository<LanguageText, Guid> _languagesText;
|
||||
private readonly IRepository<DataSource, Guid> _dataSources;
|
||||
private readonly IRepository<SettingDefinition, Guid> _settings;
|
||||
private readonly IRepository<RegistrationType, Guid> _registrationTypeRepository;
|
||||
private readonly IRepository<RegistrationMethod, Guid> _registrationMethodRepository;
|
||||
private readonly IRepository<ClassType, Guid> _classTypeRepository;
|
||||
private readonly IRepository<Class, Guid> _classRepository;
|
||||
private readonly IRepository<Level, Guid> _levelRepository;
|
||||
private readonly IRepository<LessonPeriod, Guid> _lessonPeriodRepository;
|
||||
private readonly IRepository<Schedule, Guid> _scheduleRepository;
|
||||
|
||||
public PlatformBranchDataSeeder(
|
||||
IRepository<Language, Guid> languages,
|
||||
IRepository<LanguageKey, Guid> languageKey,
|
||||
IRepository<LanguageText, Guid> languagesText,
|
||||
IRepository<DataSource, Guid> dataSource,
|
||||
IRepository<SettingDefinition, Guid> settings,
|
||||
IRepository<Schedule, Guid> scheduleRepository,
|
||||
IRepository<LessonPeriod, Guid> lessonPeriodRepository,
|
||||
IRepository<RegistrationType, Guid> registrationTypeRepository,
|
||||
IRepository<RegistrationMethod, Guid> registrationMethodRepository,
|
||||
IRepository<ClassType, Guid> classTypeRepository,
|
||||
IRepository<Class, Guid> classRepository,
|
||||
IRepository<Level, Guid> levelRepository
|
||||
)
|
||||
{
|
||||
_languages = languages;
|
||||
_languageKey = languageKey;
|
||||
_languagesText = languagesText;
|
||||
_dataSources = dataSource;
|
||||
_settings = settings;
|
||||
_registrationTypeRepository = registrationTypeRepository;
|
||||
_registrationMethodRepository = registrationMethodRepository;
|
||||
_classTypeRepository = classTypeRepository;
|
||||
_classRepository = classRepository;
|
||||
_levelRepository = levelRepository;
|
||||
_lessonPeriodRepository = lessonPeriodRepository;
|
||||
_scheduleRepository = scheduleRepository;
|
||||
}
|
||||
|
||||
private static IConfigurationRoot BuildConfiguration()
|
||||
{
|
||||
var builder = new ConfigurationBuilder()
|
||||
.SetBasePath(Directory.GetCurrentDirectory())
|
||||
.AddJsonFile("appsettings.json")
|
||||
.AddJsonFile($"appsettings.{Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") ?? ""}.json", true);
|
||||
|
||||
return builder.Build();
|
||||
}
|
||||
|
||||
public async Task SeedAsync(DataSeedContext context)
|
||||
{
|
||||
var settings = await _settings.GetListAsync();
|
||||
var dataSources = await _dataSources.GetListAsync();
|
||||
var languages = await _languages.GetListAsync();
|
||||
var keys = await _languageKey.GetListAsync();
|
||||
var texts = await _languagesText.GetListAsync();
|
||||
|
||||
var configuration = new ConfigurationBuilder()
|
||||
.SetBasePath(Directory.GetCurrentDirectory())
|
||||
.AddJsonFile(Path.Combine("Seeds", "BranchData.json"))
|
||||
.AddJsonFile(Path.Combine("Seeds", $"BranchData.{Environment.GetEnvironmentVariable("DOTNET_ENVIRONMENT") ?? ""}.json"), true)
|
||||
.Build();
|
||||
var items = configuration.Get<BranchSeederDto>();
|
||||
|
||||
var options = new JsonSerializerOptions { PropertyNameCaseInsensitive = true };
|
||||
|
||||
foreach (var item in items.RegistrationTypes)
|
||||
{
|
||||
var exists = await _registrationTypeRepository.AnyAsync(x => x.Name == item.Name);
|
||||
|
||||
if (!exists)
|
||||
{
|
||||
await _registrationTypeRepository.InsertAsync(new RegistrationType
|
||||
{
|
||||
Name = item.Name,
|
||||
Status = item.Status
|
||||
}, autoSave: true);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var item in items.RegistrationMethods)
|
||||
{
|
||||
var exists = await _registrationMethodRepository.AnyAsync(x => x.Name == item.Name);
|
||||
|
||||
if (!exists)
|
||||
{
|
||||
var registrationType = await _registrationTypeRepository.FirstOrDefaultAsync(x => x.Name == item.RegistrationTypeName);
|
||||
if (registrationType != null)
|
||||
{
|
||||
await _registrationMethodRepository.InsertAsync(new RegistrationMethod
|
||||
{
|
||||
RegistrationTypeId = registrationType.Id,
|
||||
Name = item.Name,
|
||||
Status = item.Status
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var item in items.ClassTypes)
|
||||
{
|
||||
var exists = await _classTypeRepository.AnyAsync(x => x.Name == item.Name);
|
||||
|
||||
if (!exists)
|
||||
{
|
||||
var registrationType = await _registrationTypeRepository.FirstOrDefaultAsync(x => x.Name == item.RegistrationTypeName);
|
||||
if (registrationType != null)
|
||||
{
|
||||
await _classTypeRepository.InsertAsync(new ClassType
|
||||
{
|
||||
RegistrationTypeId = registrationType.Id,
|
||||
Name = item.Name,
|
||||
MinStudentCount = item.MinStudentCount,
|
||||
MaxStudentCount = item.MaxStudentCount,
|
||||
Status = item.Status
|
||||
}, autoSave: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var item in items.Classes)
|
||||
{
|
||||
var exists = await _classRepository.AnyAsync(x => x.Name == item.Name);
|
||||
|
||||
if (!exists)
|
||||
{
|
||||
var classType = await _classTypeRepository.FirstOrDefaultAsync(x => x.Name == item.ClassTypeName);
|
||||
if (classType != null)
|
||||
{
|
||||
await _classRepository.InsertAsync(new()
|
||||
{
|
||||
ClassTypeId = classType.Id,
|
||||
Name = item.Name,
|
||||
Status = item.Status,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var item in items.Levels)
|
||||
{
|
||||
var exists = await _levelRepository.AnyAsync(x => x.Name == item.Name);
|
||||
|
||||
if (!exists)
|
||||
{
|
||||
var classType = await _classTypeRepository.FirstOrDefaultAsync(x => x.Name == item.ClassTypeName);
|
||||
if (classType != null)
|
||||
{
|
||||
await _levelRepository.InsertAsync(new Level
|
||||
{
|
||||
ClassTypeId = classType.Id,
|
||||
Name = item.Name,
|
||||
LevelType = item.LevelType,
|
||||
LessonCount = item.LessonCount,
|
||||
Status = item.Status,
|
||||
LessonDuration = item.LessonDuration,
|
||||
MonthlyPaymentRate = item.MonthlyPaymentRate
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var item in items.LessonPeriods)
|
||||
{
|
||||
var exists = await _lessonPeriodRepository.AnyAsync(x => x.Name == item.Name);
|
||||
|
||||
if (!exists)
|
||||
{
|
||||
await _lessonPeriodRepository.InsertAsync(new()
|
||||
{
|
||||
Name = item.Name,
|
||||
Day = item.Day,
|
||||
Lesson1 = item.Lesson1,
|
||||
Lesson2 = item.Lesson2,
|
||||
Lesson3 = item.Lesson3,
|
||||
Lesson4 = item.Lesson4,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var item in items.Schedules)
|
||||
{
|
||||
var exists = await _scheduleRepository.AnyAsync(x => x.Name == item.Name);
|
||||
|
||||
if (!exists)
|
||||
{
|
||||
await _scheduleRepository.InsertAsync(new()
|
||||
{
|
||||
Name = item.Name,
|
||||
Status = item.Status,
|
||||
StartTime = item.StartTime,
|
||||
EndTime = item.EndTime,
|
||||
LessonMinute = item.LessonMinute,
|
||||
LessonBreakMinute = item.LessonBreakMinute,
|
||||
LessonCount = item.LessonCount,
|
||||
LunchTime = item.LunchTime,
|
||||
LunchMinute = item.LunchMinute,
|
||||
IncludeLunch = item.IncludeLunch,
|
||||
Monday = item.Monday,
|
||||
Tuesday = item.Tuesday,
|
||||
Wednesday = item.Wednesday,
|
||||
Thursday = item.Thursday,
|
||||
Friday = item.Friday,
|
||||
Saturday = item.Saturday,
|
||||
Sunday = item.Sunday,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -25,74 +25,70 @@ using static Kurs.Settings.SettingsConsts;
|
|||
|
||||
namespace Kurs.Platform.Data.Seeds;
|
||||
|
||||
public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
||||
public class PlatformTenantDataSeeder : IDataSeedContributor, ITransientDependency
|
||||
{
|
||||
private readonly IRepository<AiBot, Guid> _aiBotRepository;
|
||||
private readonly IRepository<GlobalSearch, int> _globalSearch;
|
||||
private readonly IRepository<SettingDefinition, Guid> _settings;
|
||||
private readonly IRepository<Language, Guid> _languages;
|
||||
private readonly IRepository<LanguageKey, Guid> _languageKey;
|
||||
private readonly IRepository<LanguageText, Guid> _languagesText;
|
||||
private readonly IRepository<DataSource, Guid> _dataSources;
|
||||
private readonly IRepository<SettingDefinition, Guid> _settings;
|
||||
private readonly IRepository<GlobalSearch, int> _globalSearch;
|
||||
private readonly IRepository<BackgroundWorker, Guid> _backgroundWorkerRepository;
|
||||
private readonly IRepository<NotificationRule, Guid> _notificationRuleRepository;
|
||||
private readonly IRepository<Route, Guid> _routeRepository;
|
||||
private readonly IRepository<Menu, Guid> _menuRepository;
|
||||
private readonly IRepository<PermissionGroupDefinitionRecord, Guid> _permissionGroupRepository;
|
||||
private readonly IRepository<PermissionDefinitionRecord, Guid> _permissionRepository;
|
||||
private readonly IRepository<Sector, Guid> _sectorRepository;
|
||||
private readonly IRepository<UomCategory, Guid> _uomCategoryRepository;
|
||||
private readonly IRepository<Uom, Guid> _uomRepository;
|
||||
private readonly IRepository<DataSource, Guid> _dataSources;
|
||||
private readonly IRepository<NotificationRule, Guid> _notificationRuleRepository;
|
||||
private readonly IRepository<BackgroundWorker, Guid> _backgroundWorkerRepository;
|
||||
private readonly IRepository<ForumCategory, Guid> _forumCategoryRepository;
|
||||
|
||||
private readonly IRepository<ContactTag, Guid> _contactTagRepository;
|
||||
private readonly IRepository<ContactTitle, Guid> _contactTitleRepository;
|
||||
private readonly IRepository<Currency, Guid> _currencyRepository;
|
||||
private readonly IRepository<CountryGroup, Guid> _countryGroupRepository;
|
||||
private readonly IRepository<Country, Guid> _countryRepository;
|
||||
private readonly IRepository<City, Guid> _cityRepository;
|
||||
private readonly IRepository<District, Guid> _districtRepository;
|
||||
private readonly IRepository<SkillType, Guid> _skillTypeRepository;
|
||||
private readonly IRepository<Skill, Guid> _skillRepository;
|
||||
private readonly IRepository<SkillLevel, Guid> _skillLevelRepository;
|
||||
private readonly IRepository<ContactTag, Guid> _contactTagRepository;
|
||||
private readonly IRepository<ContactTitle, Guid> _contactTitleRepository;
|
||||
private readonly IRepository<BlogCategory, Guid> _blogCategoryRepository;
|
||||
private readonly IRepository<BlogPost, Guid> _blogPostsRepository;
|
||||
private readonly IRepository<ForumCategory, Guid> _forumCategoryRepository;
|
||||
private readonly IRepository<AiBot, Guid> _aiBotRepository;
|
||||
private readonly IRepository<Route, Guid> _routeRepository;
|
||||
|
||||
private readonly IRepository<CustomEndpoint, Guid> _customEndpointRepository;
|
||||
private readonly IRepository<CustomComponent, Guid> _customComponentRepository;
|
||||
private readonly IRepository<ReportCategory, Guid> _reportCategoriesRepository;
|
||||
private readonly IRepository<About, Guid> _aboutRepository;
|
||||
private readonly IRepository<Product, Guid> _productRepository;
|
||||
private readonly IRepository<PaymentMethod, Guid> _paymentMethodRepository;
|
||||
private readonly IRepository<InstallmentOption, Guid> _installmentOptionRepository;
|
||||
private readonly IRepository<CustomComponent, Guid> _customComponentRepository;
|
||||
private readonly IRepository<ReportCategory, Guid> _reportCategoriesRepository;
|
||||
private readonly IRepository<Service, Guid> _servicesRepository;
|
||||
private readonly IRepository<About, Guid> _aboutRepository;
|
||||
private readonly IRepository<BlogCategory, Guid> _blogCategoryRepository;
|
||||
private readonly IRepository<BlogPost, Guid> _blogPostsRepository;
|
||||
private readonly IRepository<Contact, Guid> _contactRepository;
|
||||
private readonly IRepository<Classroom, Guid> _classroomRepository;
|
||||
|
||||
private readonly IRepository<PermissionGroupDefinitionRecord, Guid> _permissionGroupRepository;
|
||||
private readonly IRepository<PermissionDefinitionRecord, Guid> _permissionRepository;
|
||||
private readonly IRepository<Sector, Guid> _sectorRepository;
|
||||
private readonly IRepository<SkillType, Guid> _skillTypeRepository;
|
||||
private readonly IRepository<Skill, Guid> _skillRepository;
|
||||
private readonly IRepository<SkillLevel, Guid> _skillLevelRepository;
|
||||
private readonly IRepository<UomCategory, Guid> _uomCategoryRepository;
|
||||
private readonly IRepository<Uom, Guid> _uomRepository;
|
||||
private readonly IRepository<Behavior, Guid> _behaviorRepository;
|
||||
private readonly IRepository<Disease, Guid> _diseaseRepository;
|
||||
private readonly IRepository<Document, Guid> _documentRepository;
|
||||
private readonly IRepository<EducationStatus, Guid> _educationStatusRepository;
|
||||
private readonly IRepository<Vaccine, Guid> _vaccineRepository;
|
||||
private readonly IRepository<WorkHour, Guid> _workHourRepository;
|
||||
private readonly IRepository<Schedule, Guid> _scheduleRepository;
|
||||
private readonly IRepository<SalesRejectionReason, Guid> _salesRejectionReasonRepository;
|
||||
private readonly IRepository<NoteType, Guid> _noteTypeRepository;
|
||||
private readonly IRepository<LessonPeriod, Guid> _lessonPeriodRepository;
|
||||
private readonly IRepository<MeetingMethod, Guid> _meetingMethodRepository;
|
||||
private readonly IRepository<MeetingResult, Guid> _meetingResultRepository;
|
||||
private readonly IRepository<ClassCancellationReason, Guid> _classCancellationReasonRepository;
|
||||
private readonly IRepository<EventType, Guid> _eventTypeRepository;
|
||||
private readonly IRepository<EventCategory, Guid> _eventCategoryRepository;
|
||||
private readonly IRepository<Event, Guid> _eventRepository;
|
||||
private readonly IRepository<Source, Guid> _sourceRepository;
|
||||
private readonly IRepository<Interesting, Guid> _interestingRepository;
|
||||
private readonly IRepository<MeetingMethod, Guid> _meetingMethodRepository;
|
||||
private readonly IRepository<MeetingResult, Guid> _meetingResultRepository;
|
||||
private readonly IRepository<Program, Guid> _programRepository;
|
||||
private readonly IRepository<RegistrationType, Guid> _registrationTypeRepository;
|
||||
private readonly IRepository<RegistrationMethod, Guid> _registrationMethodRepository;
|
||||
private readonly IRepository<ClassType, Guid> _classTypeRepository;
|
||||
private readonly IRepository<Class, Guid> _classRepository;
|
||||
private readonly IRepository<Level, Guid> _levelRepository;
|
||||
private readonly IRepository<Interesting, Guid> _interestingRepository;
|
||||
private readonly IRepository<SalesRejectionReason, Guid> _salesRejectionReasonRepository;
|
||||
private readonly IRepository<Source, Guid> _sourceRepository;
|
||||
private readonly IRepository<Vaccine, Guid> _vaccineRepository;
|
||||
private readonly IRepository<NoteType, Guid> _noteTypeRepository;
|
||||
private readonly IRepository<ClassCancellationReason, Guid> _classCancellationReasonRepository;
|
||||
private readonly IRepository<WorkHour, Guid> _workHourRepository;
|
||||
|
||||
public PlatformDataSeeder(
|
||||
private readonly IRepository<Classroom, Guid> _classroomRepository;
|
||||
|
||||
public PlatformTenantDataSeeder(
|
||||
IRepository<AiBot, Guid> aiBotRepository,
|
||||
IRepository<Language, Guid> languages,
|
||||
IRepository<LanguageKey, Guid> languageKey,
|
||||
|
|
@ -132,17 +128,14 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
IRepository<BlogPost, Guid> blogPostsRepository,
|
||||
IRepository<Contact, Guid> contactRepository,
|
||||
IRepository<Classroom, Guid> classroomRepository,
|
||||
|
||||
IRepository<Behavior, Guid> behaviorRepository,
|
||||
IRepository<Disease, Guid> diseaseRepository,
|
||||
IRepository<Document, Guid> documentRepository,
|
||||
IRepository<EducationStatus, Guid> educationStatusRepository,
|
||||
IRepository<Vaccine, Guid> vaccineRepository,
|
||||
IRepository<WorkHour, Guid> workHourRepository,
|
||||
IRepository<Schedule, Guid> scheduleRepository,
|
||||
IRepository<SalesRejectionReason, Guid> salesRejectionReasonRepository,
|
||||
IRepository<NoteType, Guid> noteTypeRepository,
|
||||
IRepository<LessonPeriod, Guid> lessonPeriodRepository,
|
||||
IRepository<MeetingMethod, Guid> meetingMethodRepository,
|
||||
IRepository<MeetingResult, Guid> meetingResultRepository,
|
||||
IRepository<ClassCancellationReason, Guid> classCancellationReasonRepository,
|
||||
|
|
@ -151,12 +144,7 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
IRepository<Event, Guid> eventRepository,
|
||||
IRepository<Source, Guid> sourceRepository,
|
||||
IRepository<Interesting, Guid> interestingRepository,
|
||||
IRepository<Program, Guid> programRepository,
|
||||
IRepository<RegistrationType, Guid> registrationTypeRepository,
|
||||
IRepository<RegistrationMethod, Guid> registrationMethodRepository,
|
||||
IRepository<ClassType, Guid> classTypeRepository,
|
||||
IRepository<Class, Guid> classRepository,
|
||||
IRepository<Level, Guid> levelRepository
|
||||
IRepository<Program, Guid> programRepository
|
||||
)
|
||||
{
|
||||
_languages = languages;
|
||||
|
|
@ -198,17 +186,14 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
_aboutRepository = aboutRepository;
|
||||
_contactRepository = contactRepository;
|
||||
_classroomRepository = classroomRepository;
|
||||
|
||||
_behaviorRepository = behaviorRepository;
|
||||
_diseaseRepository = diseaseRepository;
|
||||
_documentRepository = documentRepository;
|
||||
_educationStatusRepository = educationStatusRepository;
|
||||
_vaccineRepository = vaccineRepository;
|
||||
_workHourRepository = workHourRepository;
|
||||
_scheduleRepository = scheduleRepository;
|
||||
_salesRejectionReasonRepository = salesRejectionReasonRepository;
|
||||
_noteTypeRepository = noteTypeRepository;
|
||||
_lessonPeriodRepository = lessonPeriodRepository;
|
||||
_meetingMethodRepository = meetingMethodRepository;
|
||||
_meetingResultRepository = meetingResultRepository;
|
||||
_classCancellationReasonRepository = classCancellationReasonRepository;
|
||||
|
|
@ -218,11 +203,6 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
_sourceRepository = sourceRepository;
|
||||
_interestingRepository = interestingRepository;
|
||||
_programRepository = programRepository;
|
||||
_registrationTypeRepository = registrationTypeRepository;
|
||||
_registrationMethodRepository = registrationMethodRepository;
|
||||
_classTypeRepository = classTypeRepository;
|
||||
_classRepository = classRepository;
|
||||
_levelRepository = levelRepository;
|
||||
}
|
||||
|
||||
private static IConfigurationRoot BuildConfiguration()
|
||||
|
|
@ -482,10 +462,10 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
|
||||
var configuration = new ConfigurationBuilder()
|
||||
.SetBasePath(Directory.GetCurrentDirectory())
|
||||
.AddJsonFile(Path.Combine("Seeds", "SeederData.json"))
|
||||
.AddJsonFile(Path.Combine("Seeds", $"SeederData.{Environment.GetEnvironmentVariable("DOTNET_ENVIRONMENT") ?? ""}.json"), true)
|
||||
.AddJsonFile(Path.Combine("Seeds", "TenantData.json"))
|
||||
.AddJsonFile(Path.Combine("Seeds", $"TenantData.{Environment.GetEnvironmentVariable("DOTNET_ENVIRONMENT") ?? ""}.json"), true)
|
||||
.Build();
|
||||
var items = configuration.Get<SeederDto>();
|
||||
var items = configuration.Get<TenantSeederDto>();
|
||||
|
||||
var options = new JsonSerializerOptions { PropertyNameCaseInsensitive = true };
|
||||
|
||||
|
|
@ -575,7 +555,7 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new Exception($"Hata veren Kod:' ResourceName='{item.ResourceName}', Key='{item.Key}'.");
|
||||
throw new Exception($"Hata veren Kod:' ResourceName='{item.ResourceName}', Key='{item.Key}' Message='{ex.Message}'");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1185,35 +1165,6 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
}
|
||||
}
|
||||
|
||||
foreach (var item in items.Schedules)
|
||||
{
|
||||
var exists = await _scheduleRepository.AnyAsync(x => x.Name == item.Name);
|
||||
|
||||
if (!exists)
|
||||
{
|
||||
await _scheduleRepository.InsertAsync(new()
|
||||
{
|
||||
Name = item.Name,
|
||||
Status = item.Status,
|
||||
StartTime = item.StartTime,
|
||||
EndTime = item.EndTime,
|
||||
LessonMinute = item.LessonMinute,
|
||||
LessonBreakMinute = item.LessonBreakMinute,
|
||||
LessonCount = item.LessonCount,
|
||||
LunchTime = item.LunchTime,
|
||||
LunchMinute = item.LunchMinute,
|
||||
IncludeLunch = item.IncludeLunch,
|
||||
Monday = item.Monday,
|
||||
Tuesday = item.Tuesday,
|
||||
Wednesday = item.Wednesday,
|
||||
Thursday = item.Thursday,
|
||||
Friday = item.Friday,
|
||||
Saturday = item.Saturday,
|
||||
Sunday = item.Sunday,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var item in items.SalesRejectionReasons)
|
||||
{
|
||||
var exists = await _salesRejectionReasonRepository.AnyAsync(x => x.Name == item.Name);
|
||||
|
|
@ -1241,24 +1192,6 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
}
|
||||
}
|
||||
|
||||
foreach (var item in items.LessonPeriods)
|
||||
{
|
||||
var exists = await _lessonPeriodRepository.AnyAsync(x => x.Name == item.Name);
|
||||
|
||||
if (!exists)
|
||||
{
|
||||
await _lessonPeriodRepository.InsertAsync(new()
|
||||
{
|
||||
Name = item.Name,
|
||||
Day = item.Day,
|
||||
Lesson1 = item.Lesson1,
|
||||
Lesson2 = item.Lesson2,
|
||||
Lesson3 = item.Lesson3,
|
||||
Lesson4 = item.Lesson4,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var item in items.MeetingMethods)
|
||||
{
|
||||
var exists = await _meetingMethodRepository.AnyAsync(x => x.Name == item.Name);
|
||||
|
|
@ -1362,101 +1295,5 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var item in items.RegistrationTypes)
|
||||
{
|
||||
var exists = await _registrationTypeRepository.AnyAsync(x => x.Name == item.Name);
|
||||
|
||||
if (!exists)
|
||||
{
|
||||
await _registrationTypeRepository.InsertAsync(new RegistrationType
|
||||
{
|
||||
Name = item.Name,
|
||||
Status = item.Status
|
||||
}, autoSave: true);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var item in items.RegistrationMethods)
|
||||
{
|
||||
var exists = await _registrationMethodRepository.AnyAsync(x => x.Name == item.Name);
|
||||
|
||||
if (!exists)
|
||||
{
|
||||
var registrationType = await _registrationTypeRepository.FirstOrDefaultAsync(x => x.Name == item.RegistrationTypeName);
|
||||
if (registrationType != null)
|
||||
{
|
||||
await _registrationMethodRepository.InsertAsync(new RegistrationMethod
|
||||
{
|
||||
RegistrationTypeId = registrationType.Id,
|
||||
Name = item.Name,
|
||||
Status = item.Status
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var item in items.ClassTypes)
|
||||
{
|
||||
var exists = await _classTypeRepository.AnyAsync(x => x.Name == item.Name);
|
||||
|
||||
if (!exists)
|
||||
{
|
||||
var registrationType = await _registrationTypeRepository.FirstOrDefaultAsync(x => x.Name == item.RegistrationTypeName);
|
||||
if (registrationType != null)
|
||||
{
|
||||
await _classTypeRepository.InsertAsync(new ClassType
|
||||
{
|
||||
RegistrationTypeId = registrationType.Id,
|
||||
Name = item.Name,
|
||||
MinStudentCount = item.MinStudentCount,
|
||||
MaxStudentCount = item.MaxStudentCount,
|
||||
Status = item.Status
|
||||
}, autoSave: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var item in items.Classes)
|
||||
{
|
||||
var exists = await _classRepository.AnyAsync(x => x.Name == item.Name);
|
||||
|
||||
if (!exists)
|
||||
{
|
||||
var classType = await _classTypeRepository.FirstOrDefaultAsync(x => x.Name == item.ClassTypeName);
|
||||
if (classType != null)
|
||||
{
|
||||
await _classRepository.InsertAsync(new()
|
||||
{
|
||||
ClassTypeId = classType.Id,
|
||||
Name = item.Name,
|
||||
Status = item.Status,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var item in items.Levels)
|
||||
{
|
||||
var exists = await _levelRepository.AnyAsync(x => x.Name == item.Name);
|
||||
|
||||
if (!exists)
|
||||
{
|
||||
var classType = await _classTypeRepository.FirstOrDefaultAsync(x => x.Name == item.ClassTypeName);
|
||||
if (classType != null)
|
||||
{
|
||||
await _levelRepository.InsertAsync(new Level
|
||||
{
|
||||
ClassTypeId = classType.Id,
|
||||
Name = item.Name,
|
||||
LevelType = item.LevelType,
|
||||
LessonCount = item.LessonCount,
|
||||
Status = item.Status,
|
||||
LessonDuration = item.LessonDuration,
|
||||
MonthlyPaymentRate = item.MonthlyPaymentRate
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
{
|
||||
}
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
{
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,26 +1,32 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kurs.Languages.Entities;
|
||||
using Kurs.Platform.Abouts;
|
||||
using Kurs.Platform.Contacts;
|
||||
using Kurs.Platform.Entities;
|
||||
using Kurs.Settings.Entities;
|
||||
using static Kurs.Platform.Abouts.AboutDto;
|
||||
|
||||
namespace Kurs.Platform.Seeds;
|
||||
|
||||
public class SeederDto
|
||||
public class TenantSeederDto
|
||||
{
|
||||
public List<AiBotSeedDto> AiBots { get; set; }
|
||||
public List<GlobalSearchSeedDto> GlobalSearch { get; set; }
|
||||
public List<Language> Languages { get; set; }
|
||||
public List<LanguageTextsSeedDto> LanguageTexts { get; set; }
|
||||
public List<DataSource> DataSources { get; set; }
|
||||
public List<SettingDefinition> Settings { get; set; }
|
||||
public List<GlobalSearchSeedDto> GlobalSearch { get; set; }
|
||||
public List<BackgroundWorkerSeedDto> BackgroundWorkers { get; set; }
|
||||
public List<NotificationRuleSeedDto> NotificationRules { get; set; }
|
||||
public List<MenuSeedDto> Menus { get; set; }
|
||||
public List<RouteSeedDto> Routes { get; set; }
|
||||
public List<PermissionGroupDefinitionRecordSeedDto> PermissionGroupDefinitionRecords { get; set; }
|
||||
public List<PermissionDefinitionRecordSeedDto> PermissionDefinitionRecords { get; set; }
|
||||
public List<SectorSeedDto> Sectors { get; set; }
|
||||
public List<ForumCategorySeedDto> ForumCategories { get; set; }
|
||||
public List<CustomEndpointSeedDto> CustomEndpoints { get; set; }
|
||||
public List<CustomComponentSeedDto> CustomComponents { get; set; }
|
||||
public List<ReportCategorySeedDto> ReportCategories { get; set; }
|
||||
|
||||
public List<UomCategorySeedDto> UomCategories { get; set; }
|
||||
public List<UomSeedDto> Uoms { get; set; }
|
||||
public List<CurrencySeedDto> Currencies { get; set; }
|
||||
|
|
@ -29,32 +35,28 @@ public class SeederDto
|
|||
public List<SkillLevelSeedDto> SkillLevels { get; set; }
|
||||
public List<ContactTagSeedDto> ContactTags { get; set; }
|
||||
public List<ContactTitleSeedDto> ContactTitles { get; set; }
|
||||
public List<BlogCategorySeedDto> BlogCategories { get; set; }
|
||||
public List<BlogPostSeedDto> BlogPosts { get; set; }
|
||||
public List<ForumCategorySeedDto> ForumCategories { get; set; }
|
||||
public List<AiBotSeedDto> AiBots { get; set; }
|
||||
public List<RouteSeedDto> Routes { get; set; }
|
||||
public List<CustomEndpointSeedDto> CustomEndpoints { get; set; }
|
||||
|
||||
public List<AboutSeedDto> Abouts { get; set; }
|
||||
public List<ServiceSeedDto> Services { get; set; }
|
||||
public List<ProductSeedDto> Products { get; set; }
|
||||
public List<PaymentMethodSeedDto> PaymentMethods { get; set; }
|
||||
public List<InstallmentOptionSeedDto> InstallmentOptions { get; set; }
|
||||
public List<CustomComponentSeedDto> CustomComponents { get; set; }
|
||||
public List<ReportCategorySeedDto> ReportCategories { get; set; }
|
||||
public List<ServiceSeedDto> Services { get; set; }
|
||||
public List<AboutSeedDto> Abouts { get; set; }
|
||||
public List<BlogCategorySeedDto> BlogCategories { get; set; }
|
||||
public List<BlogPostSeedDto> BlogPosts { get; set; }
|
||||
public List<ContactSeedDto> Contacts { get; set; }
|
||||
|
||||
public List<ClassroomSeedDto> Classrooms { get; set; }
|
||||
|
||||
//Tanımlamalar
|
||||
public List<SectorSeedDto> Sectors { get; set; }
|
||||
public List<BehaviorSeedDto> Behaviors { get; set; }
|
||||
public List<DocumentSeedDto> Documents { get; set; }
|
||||
public List<DiseaseSeedDto> Diseases { get; set; }
|
||||
public List<EducationStatusSeedDto> EducationStatuses { get; set; }
|
||||
public List<VaccineSeedDto> Vaccines { get; set; }
|
||||
public List<WorkHourSeedDto> WorkHours { get; set; }
|
||||
public List<ScheduleSeedDto> Schedules { get; set; }
|
||||
public List<SalesRejectionReasonSeedDto> SalesRejectionReasons { get; set; }
|
||||
public List<NoteTypeSeedDto> NoteTypes { get; set; }
|
||||
public List<LessonPeriodSeedDto> LessonPeriods { get; set; }
|
||||
public List<InformationSeedDto> Informations { get; set; }
|
||||
public List<MeetingMethodSeedDto> MeetingMethods { get; set; }
|
||||
public List<MeetingResultSeedDto> MeetingResults { get; set; }
|
||||
public List<ClassCancellationReasonSeedDto> ClassCancellationReasons { get; set; }
|
||||
|
|
@ -63,13 +65,6 @@ public class SeederDto
|
|||
public List<SourceSeedDto> Sources { get; set; }
|
||||
public List<InterestingSeedDto> Interesting { get; set; }
|
||||
public List<ProgramSeedDto> Programs { get; set; }
|
||||
public List<RegistrationTypeSeedDto> RegistrationTypes { get; set; }
|
||||
public List<RegistrationMethodSeedDto> RegistrationMethods { get; set; }
|
||||
public List<ClassTypeSeedDto> ClassTypes { get; set; }
|
||||
public List<ClassSeedDto> Classes { get; set; }
|
||||
public List<LevelSeedDto> Levels { get; set; }
|
||||
|
||||
public List<ClassroomSeedDto> Classrooms { get; set; }
|
||||
}
|
||||
|
||||
public class LanguageTextsSeedDto
|
||||
|
|
@ -388,27 +383,6 @@ public class WorkHourSeedDto
|
|||
public bool? Sunday { get; set; }
|
||||
}
|
||||
|
||||
public class ScheduleSeedDto
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Status { get; set; }
|
||||
public string StartTime { get; set; }
|
||||
public string EndTime { get; set; }
|
||||
public int LessonMinute { get; set; }
|
||||
public int LessonBreakMinute { get; set; }
|
||||
public int LessonCount { get; set; }
|
||||
public string LunchTime { get; set; }
|
||||
public int? LunchMinute { get; set; }
|
||||
public bool? IncludeLunch { get; set; }
|
||||
public bool? Monday { get; set; }
|
||||
public bool? Tuesday { get; set; }
|
||||
public bool? Wednesday { get; set; }
|
||||
public bool? Thursday { get; set; }
|
||||
public bool? Friday { get; set; }
|
||||
public bool? Saturday { get; set; }
|
||||
public bool? Sunday { get; set; }
|
||||
}
|
||||
|
||||
public class SalesRejectionReasonSeedDto
|
||||
{
|
||||
public string Name { get; set; }
|
||||
|
|
@ -420,22 +394,6 @@ public class NoteTypeSeedDto
|
|||
public string Name { get; set; }
|
||||
}
|
||||
|
||||
public class LessonPeriodSeedDto
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Day { get; set; }
|
||||
|
||||
public string Lesson1 { get; set; }
|
||||
public string Lesson2 { get; set; }
|
||||
public string Lesson3 { get; set; }
|
||||
public string Lesson4 { get; set; }
|
||||
}
|
||||
|
||||
public class InformationSeedDto
|
||||
{
|
||||
public string Name { get; set; }
|
||||
}
|
||||
|
||||
public class MeetingMethodSeedDto
|
||||
{
|
||||
public string Name { get; set; }
|
||||
|
|
@ -493,43 +451,3 @@ public class ProgramSeedDto
|
|||
public string Name { get; set; }
|
||||
public string Status { get; set; }
|
||||
}
|
||||
|
||||
public class RegistrationTypeSeedDto
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Status { get; set; }
|
||||
}
|
||||
|
||||
public class RegistrationMethodSeedDto
|
||||
{
|
||||
public string RegistrationTypeName { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Status { get; set; }
|
||||
}
|
||||
|
||||
public class ClassTypeSeedDto
|
||||
{
|
||||
public string RegistrationTypeName { get; set; }
|
||||
public string Name { get; set; }
|
||||
public int? MinStudentCount { get; set; }
|
||||
public int? MaxStudentCount { get; set; }
|
||||
public string Status { get; set; }
|
||||
}
|
||||
|
||||
public class ClassSeedDto
|
||||
{
|
||||
public string ClassTypeName { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Status { get; set; }
|
||||
}
|
||||
|
||||
public class LevelSeedDto
|
||||
{
|
||||
public string ClassTypeName { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string LevelType { get; set; }
|
||||
public int LessonCount { get; set; }
|
||||
public string Status { get; set; }
|
||||
public int? LessonDuration { get; set; }
|
||||
public decimal? MonthlyPaymentRate { get; set; }
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
Binary file not shown.
|
|
@ -1,80 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import json
|
||||
import argparse
|
||||
from pathlib import Path
|
||||
import pandas as pd
|
||||
|
||||
# Excel'deki kolon adları bu adaylara göre eşleştirilecektir.
|
||||
CANDIDATES = {
|
||||
"CountryCode": ["CountryCode", "Ad", "Adi", "İsim", "Isim"],
|
||||
"CityCode": ["CityCode", "City", "SehirKodu", "ŞehirKodu", "Il", "İl", "IlKodu", "İlKodu", "Plaka"],
|
||||
"Name": ["Name", "Ad", "Adi", "İsim", "Isim"],
|
||||
"Township": ["Township", "Ilce", "İlçe", "District", "Semt"],
|
||||
"Street": ["Street", "Sokak", "Cadde", "Adres", "Mahalle"],
|
||||
"ZipCode": ["ZipCode", "PostaKodu", "PK", "Zip", "PostCode", "PostalCode"]
|
||||
}
|
||||
|
||||
REQUIRED_KEYS = ["CountryCode", "CityCode", "Name", "Township", "Street", "ZipCode"]
|
||||
|
||||
def build_column_map(columns):
|
||||
lower_map = {c.casefold(): c for c in columns if c is not None}
|
||||
col_map = {}
|
||||
missing = []
|
||||
|
||||
for target_key in REQUIRED_KEYS:
|
||||
found = None
|
||||
for cand in CANDIDATES.get(target_key, [target_key]):
|
||||
if cand.casefold() in lower_map:
|
||||
found = lower_map[cand.casefold()]
|
||||
break
|
||||
if found is None:
|
||||
missing.append(target_key)
|
||||
else:
|
||||
col_map[target_key] = found
|
||||
|
||||
if missing:
|
||||
raise ValueError(
|
||||
"Aşağıdaki alanlar için uygun Excel sütunu bulunamadı: "
|
||||
+ ", ".join(missing)
|
||||
+ f"\nBulunan sütunlar: {', '.join(columns)}"
|
||||
)
|
||||
|
||||
return col_map
|
||||
|
||||
def main():
|
||||
ap = argparse.ArgumentParser(description="XLSX dosyasını belirtilen şemada JSON'a dönüştürür.")
|
||||
ap.add_argument("-i", "--input", required=True, help="Girdi XLSX dosyası")
|
||||
ap.add_argument("-o", "--output", default="output.json", help="Çıktı JSON dosyası (varsayılan: output.json)")
|
||||
ap.add_argument("-s", "--sheet", default=0, help="Sayfa adı veya index (varsayılan: 0)")
|
||||
args = ap.parse_args()
|
||||
|
||||
in_path = Path(args.input)
|
||||
out_path = Path(args.output)
|
||||
|
||||
if not in_path.exists():
|
||||
raise FileNotFoundError(f"Girdi dosyası bulunamadı: {in_path}")
|
||||
|
||||
# Excel dosyasını oku (pandas engine otomatik seçer)
|
||||
df = pd.read_excel(in_path, sheet_name=args.sheet, dtype=str)
|
||||
|
||||
# Kolonları eşleştir
|
||||
col_map = build_column_map(df.columns)
|
||||
|
||||
# Sadece gereken kolonları al ve yeniden isimlendir
|
||||
result_df = df[list(col_map.values())].rename(columns={v: k for k, v in col_map.items()})
|
||||
|
||||
# NaN'leri boş string'e çevir
|
||||
result_df = result_df.fillna("")
|
||||
|
||||
# JSON'a dönüştür
|
||||
data = result_df.to_dict(orient="records")
|
||||
|
||||
with open(out_path, "w", encoding="utf-8") as jf:
|
||||
json.dump(data, jf, ensure_ascii=False, indent=4)
|
||||
|
||||
print(f"Tamam: {in_path} -> {out_path} ({len(data)} kayıt)")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
@ -7,9 +7,9 @@ using Volo.Abp.Domain.Entities;
|
|||
|
||||
public class BranchUsers : Entity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid UserId { get; set; }
|
||||
public Guid BranchId { get; set; }
|
||||
public Guid? TenantId { get; set; }
|
||||
public Guid BranchId { get; set; }
|
||||
public Guid UserId { get; set; }
|
||||
|
||||
Guid? IMultiTenant.TenantId => TenantId;
|
||||
|
||||
|
|
@ -2,11 +2,15 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Text.Json.Serialization;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Kurs.Platform.Entities;
|
||||
|
||||
public class Classroom : FullAuditedEntity<Guid>
|
||||
public class Classroom : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
public Guid? BranchId { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string Subject { get; set; }
|
||||
|
|
@ -1,11 +1,15 @@
|
|||
using System;
|
||||
using System.Text.Json.Serialization;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Kurs.Platform.Entities;
|
||||
|
||||
public class ClassroomAttandance : FullAuditedEntity<Guid>
|
||||
public class ClassroomAttandance : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
public Guid? BranchId { get; set; }
|
||||
|
||||
public Guid SessionId { get; set; }
|
||||
public Guid? StudentId { get; set; }
|
||||
public string StudentName { get; set; }
|
||||
|
|
@ -1,11 +1,15 @@
|
|||
using System;
|
||||
using System.Text.Json.Serialization;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Kurs.Platform.Entities;
|
||||
|
||||
public class ClassroomChat : FullAuditedEntity<Guid>
|
||||
public class ClassroomChat : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
public Guid? BranchId { get; set; }
|
||||
|
||||
public Guid SessionId { get; set; }
|
||||
public Guid? SenderId { get; set; }
|
||||
public string SenderName { get; set; }
|
||||
|
|
@ -1,11 +1,15 @@
|
|||
using System;
|
||||
using System.Text.Json.Serialization;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Kurs.Platform.Entities;
|
||||
|
||||
public class ClassroomParticipant : FullAuditedEntity<Guid>
|
||||
public class ClassroomParticipant : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
public Guid? BranchId { get; set; }
|
||||
|
||||
public Guid SessionId { get; set; }
|
||||
public Guid? UserId { get; set; }
|
||||
public string UserName { get; set; }
|
||||
|
|
@ -6,6 +6,8 @@ namespace Kurs.Platform.Forum;
|
|||
|
||||
public class ForumCategory : FullAuditedEntity<Guid>
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
public string Slug { get; set; }
|
||||
public string Description { get; set; }
|
||||
|
|
@ -22,5 +24,4 @@ public class ForumCategory : FullAuditedEntity<Guid>
|
|||
|
||||
public ICollection<ForumTopic> Topics { get; set; } = [];
|
||||
|
||||
public Guid? TenantId { get; set; }
|
||||
}
|
||||
|
|
@ -7,6 +7,7 @@ namespace Kurs.Platform.Entities;
|
|||
public class Branch : FullAuditedEntity<Guid>
|
||||
{
|
||||
public Guid TenantId { get; set; }
|
||||
|
||||
public string Code { get; set; }
|
||||
public string Name { get; set; }
|
||||
public long VknTckn { get; set; }
|
||||
|
|
@ -7,6 +7,7 @@ namespace Kurs.Platform.Entities;
|
|||
public class ApiEndpoint : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public virtual Guid? TenantId { get; protected set; }
|
||||
|
||||
public string EntityName { get; set; } = string.Empty;
|
||||
public string Method { get; set; } = string.Empty;
|
||||
public string Path { get; set; } = string.Empty;
|
||||
|
|
@ -7,6 +7,7 @@ namespace Kurs.Platform.Entities;
|
|||
public class ApiMigration : AuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public virtual Guid? TenantId { get; protected set; }
|
||||
|
||||
public Guid EntityId { get; set; }
|
||||
public string EntityName { get; set; } = string.Empty;
|
||||
public string FileName { get; set; } = string.Empty;
|
||||
|
|
@ -7,6 +7,7 @@ namespace Kurs.Platform.Entities;
|
|||
public class CustomComponent : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public virtual Guid? TenantId { get; protected set; }
|
||||
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Code { get; set; } = string.Empty;
|
||||
public string? Props { get; set; }
|
||||
|
|
@ -8,6 +8,7 @@ namespace Kurs.Platform.Entities;
|
|||
public class CustomEntity : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public virtual Guid? TenantId { get; protected set; }
|
||||
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string DisplayName { get; set; } = string.Empty;
|
||||
public string TableName { get; set; } = string.Empty;
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Volo.Abp.Domain.Entities;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
|
|
@ -7,6 +7,7 @@ namespace Kurs.Platform.Entities;
|
|||
public class BlogPost : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public string Title { get; set; }
|
||||
public string Slug { get; set; }
|
||||
public string ContentTr { get; set; }
|
||||
|
|
@ -7,6 +7,7 @@ namespace Kurs.Platform.Entities;
|
|||
public class Demo : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public string OrganizationName { get; set; }
|
||||
public string FullName { get; set; }
|
||||
public string Email { get; set; }
|
||||
|
|
@ -8,6 +8,7 @@ namespace Kurs.Platform.Entities;
|
|||
public class Order : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public string OrganizationName { get; set; }
|
||||
public string Founder { get; set; }
|
||||
public long VknTckn { get; set; }
|
||||
|
|
@ -7,6 +7,7 @@ namespace Kurs.Platform.Entities;
|
|||
public class Service : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public string? Icon { get; set; }
|
||||
public string Title { get; set; }
|
||||
public string? Description { get; set; }
|
||||
|
|
@ -1,15 +1,19 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Kurs.Platform.Entities
|
||||
{
|
||||
public class ReportCategory : FullAuditedEntity<Guid>
|
||||
public class ReportCategory : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string Icon { get; set; }
|
||||
|
||||
public ICollection<ReportTemplate> ReportTemplates { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +1,13 @@
|
|||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Kurs.Platform.Entities
|
||||
{
|
||||
public class ReportGenerated : FullAuditedEntity<Guid>
|
||||
public class ReportGenerated : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public Guid? TemplateId { get; set; }
|
||||
public string TemplateName { get; set; }
|
||||
public string GeneratedContent { get; set; }
|
||||
|
|
@ -1,11 +1,13 @@
|
|||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Kurs.Platform.Entities
|
||||
{
|
||||
public class ReportParameter : FullAuditedEntity<Guid>
|
||||
public class ReportParameter : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public Guid ReportTemplateId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Placeholder { get; set; }
|
||||
|
|
@ -1,12 +1,14 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Kurs.Platform.Entities
|
||||
{
|
||||
public class ReportTemplate : FullAuditedEntity<Guid>
|
||||
public class ReportTemplate : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string HtmlContent { get; set; }
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue