Quotation Entity
This commit is contained in:
parent
55aaad3d31
commit
d1157953a8
20 changed files with 1950 additions and 30 deletions
|
|
@ -9313,6 +9313,24 @@
|
|||
"tr": "Ödeme Koşulları",
|
||||
"en": "Payment Terms"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.SupplyChain.DeliveryTerm",
|
||||
"tr": "Teslimat Koşulları",
|
||||
"en": "Delivery Terms"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.SupplyChain.QuotationStatus",
|
||||
"tr": "Teklif Durumları",
|
||||
"en": "Quotation Status"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.SupplyChain.Quotation",
|
||||
"tr": "Teklifler",
|
||||
"en": "Quotations"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.SupplyChain.MaterialType",
|
||||
|
|
|
|||
|
|
@ -53,7 +53,8 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson,
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
|
|
@ -193,7 +194,8 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson,
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
|
|
@ -362,7 +364,8 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
{
|
||||
var listForm = await _listFormRepository.InsertAsync(new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson,
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
|
|
@ -678,7 +681,8 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson,
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
|
|
@ -800,7 +804,8 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson,
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
|
|
@ -924,7 +929,8 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson,
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
|
|
@ -1048,7 +1054,8 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson,
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
|
|
@ -1701,7 +1708,8 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson,
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
|
|
@ -2011,7 +2019,8 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson,
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
|
|
@ -2149,7 +2158,8 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson,
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
|
|
@ -2443,7 +2453,8 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson,
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
|
|
@ -2612,7 +2623,8 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson,
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
|
|
@ -2789,7 +2801,8 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson,
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
|
|
@ -2913,7 +2926,8 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson,
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
|
|
@ -3181,7 +3195,8 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson,
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
|
|
@ -3388,5 +3403,251 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
}
|
||||
})
|
||||
);
|
||||
|
||||
#region Quotation Status
|
||||
listFormName = AppCodes.SupplyChain.QuotationStatus;
|
||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
||||
{
|
||||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = listFormName,
|
||||
Name = listFormName,
|
||||
Title = listFormName,
|
||||
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||
IsTenant = true,
|
||||
IsBranch = false,
|
||||
IsOrganizationUnit = false,
|
||||
Description = listFormName,
|
||||
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.QuotationStatus)),
|
||||
KeyFieldName = "Id",
|
||||
KeyFieldDbSourceType = DbType.Guid,
|
||||
DefaultFilter = DefaultFilterJson,
|
||||
SortMode = GridOptions.SortModeSingle,
|
||||
FilterRowJson = DefaultFilterRowJson,
|
||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||
SearchPanelJson = DefaultSearchPanelJson,
|
||||
GroupPanelJson = DefaultGroupPanelJson,
|
||||
SelectionJson = DefaultSelectionSingleJson,
|
||||
ColumnOptionJson = DefaultColumnOptionJson,
|
||||
PermissionJson = DefaultPermissionJson(listFormName),
|
||||
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.QuotationStatus)),
|
||||
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
|
||||
PagerOptionJson = DefaultPagerOptionJson,
|
||||
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false),
|
||||
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
|
||||
{
|
||||
new() {
|
||||
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[
|
||||
new EditingFormItemDto { Order = 1, DataField="Name", ColSpan = 1, IsRequired =true, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 2, DataField="Description", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea },
|
||||
new EditingFormItemDto { Order = 3, DataField="IsActive", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox },
|
||||
]}
|
||||
}),
|
||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||
}),
|
||||
}
|
||||
);
|
||||
|
||||
#region Quotation Status Fields
|
||||
await _listFormFieldRepository.InsertManyAsync([
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "Id",
|
||||
Width = 100,
|
||||
ListOrderNo = 1,
|
||||
Visible = false,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
SortIndex = 0,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Name",
|
||||
Width = 300,
|
||||
ListOrderNo = 2,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Description",
|
||||
Width = 500,
|
||||
ListOrderNo = 3,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Boolean,
|
||||
FieldName = "IsActive",
|
||||
Width = 100,
|
||||
ListOrderNo = 4,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
]);
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Delivery Terms
|
||||
listFormName = AppCodes.SupplyChain.DeliveryTerm;
|
||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
||||
{
|
||||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = listFormName,
|
||||
Name = listFormName,
|
||||
Title = listFormName,
|
||||
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||
IsTenant = true,
|
||||
IsBranch = false,
|
||||
IsOrganizationUnit = false,
|
||||
Description = listFormName,
|
||||
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.DeliveryTerm)),
|
||||
KeyFieldName = "Id",
|
||||
KeyFieldDbSourceType = DbType.Guid,
|
||||
DefaultFilter = DefaultFilterJson,
|
||||
SortMode = GridOptions.SortModeSingle,
|
||||
FilterRowJson = DefaultFilterRowJson,
|
||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||
SearchPanelJson = DefaultSearchPanelJson,
|
||||
GroupPanelJson = DefaultGroupPanelJson,
|
||||
SelectionJson = DefaultSelectionSingleJson,
|
||||
ColumnOptionJson = DefaultColumnOptionJson,
|
||||
PermissionJson = DefaultPermissionJson(listFormName),
|
||||
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.DeliveryTerm)),
|
||||
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
|
||||
PagerOptionJson = DefaultPagerOptionJson,
|
||||
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false),
|
||||
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
|
||||
{
|
||||
new() {
|
||||
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[
|
||||
new EditingFormItemDto { Order = 1, DataField="Name", ColSpan = 1, IsRequired =true, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 2, DataField="Description", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea },
|
||||
new EditingFormItemDto { Order = 3, DataField="IsActive", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox },
|
||||
]}
|
||||
}),
|
||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||
}),
|
||||
}
|
||||
);
|
||||
|
||||
#region Delivery Term Fields
|
||||
await _listFormFieldRepository.InsertManyAsync([
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "Id",
|
||||
Width = 100,
|
||||
ListOrderNo = 1,
|
||||
Visible = false,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
SortIndex = 0,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Name",
|
||||
Width = 300,
|
||||
ListOrderNo = 2,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Description",
|
||||
Width = 500,
|
||||
ListOrderNo = 3,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Boolean,
|
||||
FieldName = "IsActive",
|
||||
Width = 100,
|
||||
ListOrderNo = 4,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
]);
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2298,11 +2298,21 @@
|
|||
"RequiredPermissionName": "App.SupplyChain.PaymentTerm",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.SupplyChain.Definitions",
|
||||
"Code": "App.SupplyChain.DeliveryTerm",
|
||||
"DisplayName": "App.SupplyChain.DeliveryTerm",
|
||||
"Order": 5,
|
||||
"Url": "/admin/list/App.SupplyChain.DeliveryTerm",
|
||||
"Icon": "FcShipped",
|
||||
"RequiredPermissionName": "App.SupplyChain.DeliveryTerm",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.SupplyChain.Definitions",
|
||||
"Code": "App.SupplyChain.SupplyType",
|
||||
"DisplayName": "App.SupplyChain.SupplyType",
|
||||
"Order": 5,
|
||||
"Order": 6,
|
||||
"Url": "/admin/list/App.SupplyChain.SupplyType",
|
||||
"Icon": "FcTreeStructure",
|
||||
"RequiredPermissionName": "App.SupplyChain.SupplyType",
|
||||
|
|
@ -2312,7 +2322,7 @@
|
|||
"ParentCode": "App.SupplyChain.Definitions",
|
||||
"Code": "App.SupplyChain.SupplyCardType",
|
||||
"DisplayName": "App.SupplyChain.SupplyCardType",
|
||||
"Order": 6,
|
||||
"Order": 7,
|
||||
"Url": "/admin/list/App.SupplyChain.SupplyCardType",
|
||||
"Icon": "FcComboChart",
|
||||
"RequiredPermissionName": "App.SupplyChain.SupplyCardType",
|
||||
|
|
@ -2322,7 +2332,7 @@
|
|||
"ParentCode": "App.SupplyChain.Definitions",
|
||||
"Code": "App.SupplyChain.Supply",
|
||||
"DisplayName": "App.SupplyChain.Supply",
|
||||
"Order": 7,
|
||||
"Order": 8,
|
||||
"Url": "/admin/list/App.SupplyChain.Supply",
|
||||
"Icon": "FcBusiness",
|
||||
"RequiredPermissionName": "App.SupplyChain.Supply",
|
||||
|
|
@ -2332,7 +2342,7 @@
|
|||
"ParentCode": "App.SupplyChain.Definitions",
|
||||
"Code": "App.SupplyChain.Approval",
|
||||
"DisplayName": "App.SupplyChain.Approval",
|
||||
"Order": 8,
|
||||
"Order": 9,
|
||||
"Url": "/admin/list/App.SupplyChain.Approval",
|
||||
"Icon": "FcApproval",
|
||||
"RequiredPermissionName": "App.SupplyChain.Approval",
|
||||
|
|
@ -2342,12 +2352,22 @@
|
|||
"ParentCode": "App.SupplyChain.Definitions",
|
||||
"Code": "App.SupplyChain.RequestType",
|
||||
"DisplayName": "App.SupplyChain.RequestType",
|
||||
"Order": 9,
|
||||
"Order": 10,
|
||||
"Url": "/admin/list/App.SupplyChain.RequestType",
|
||||
"Icon": "FcWorkflow",
|
||||
"RequiredPermissionName": "App.SupplyChain.RequestType",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.SupplyChain.Definitions",
|
||||
"Code": "App.SupplyChain.QuotationStatus",
|
||||
"DisplayName": "App.SupplyChain.QuotationStatus",
|
||||
"Order": 11,
|
||||
"Url": "/admin/list/App.SupplyChain.QuotationStatus",
|
||||
"Icon": "FcStatistics",
|
||||
"RequiredPermissionName": "App.SupplyChain.QuotationStatus",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.SupplyChain",
|
||||
"Code": "App.SupplyChain.Request",
|
||||
|
|
|
|||
|
|
@ -5494,6 +5494,70 @@
|
|||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.DeliveryTerm",
|
||||
"ParentName": null,
|
||||
"DisplayName": "App.SupplyChain.DeliveryTerm",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.DeliveryTerm.Create",
|
||||
"ParentName": "App.SupplyChain.DeliveryTerm",
|
||||
"DisplayName": "Create",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.DeliveryTerm.Update",
|
||||
"ParentName": "App.SupplyChain.DeliveryTerm",
|
||||
"DisplayName": "Update",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.DeliveryTerm.Delete",
|
||||
"ParentName": "App.SupplyChain.DeliveryTerm",
|
||||
"DisplayName": "Delete",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.DeliveryTerm.Export",
|
||||
"ParentName": "App.SupplyChain.DeliveryTerm",
|
||||
"DisplayName": "Export",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.DeliveryTerm.Import",
|
||||
"ParentName": "App.SupplyChain.DeliveryTerm",
|
||||
"DisplayName": "Import",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.DeliveryTerm.Note",
|
||||
"ParentName": "App.SupplyChain.DeliveryTerm",
|
||||
"DisplayName": "Note",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.SupplyType",
|
||||
|
|
@ -5935,6 +5999,135 @@
|
|||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.QuotationStatus",
|
||||
"ParentName": null,
|
||||
"DisplayName": "App.SupplyChain.QuotationStatus",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.QuotationStatus.Create",
|
||||
"ParentName": "App.SupplyChain.QuotationStatus",
|
||||
"DisplayName": "Create",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.QuotationStatus.Update",
|
||||
"ParentName": "App.SupplyChain.QuotationStatus",
|
||||
"DisplayName": "Update",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.QuotationStatus.Delete",
|
||||
"ParentName": "App.SupplyChain.QuotationStatus",
|
||||
"DisplayName": "Delete",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.QuotationStatus.Export",
|
||||
"ParentName": "App.SupplyChain.QuotationStatus",
|
||||
"DisplayName": "Export",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.QuotationStatus.Import",
|
||||
"ParentName": "App.SupplyChain.QuotationStatus",
|
||||
"DisplayName": "Import",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.QuotationStatus.Note",
|
||||
"ParentName": "App.SupplyChain.QuotationStatus",
|
||||
"DisplayName": "Note",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.Quotation",
|
||||
"ParentName": null,
|
||||
"DisplayName": "App.SupplyChain.Quotation",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.Quotation.Create",
|
||||
"ParentName": "App.SupplyChain.Quotation",
|
||||
"DisplayName": "Create",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.Quotation.Update",
|
||||
"ParentName": "App.SupplyChain.Quotation",
|
||||
"DisplayName": "Update",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.Quotation.Delete",
|
||||
"ParentName": "App.SupplyChain.Quotation",
|
||||
"DisplayName": "Delete",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.Quotation.Export",
|
||||
"ParentName": "App.SupplyChain.Quotation",
|
||||
"DisplayName": "Export",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.Quotation.Import",
|
||||
"ParentName": "App.SupplyChain.Quotation",
|
||||
"DisplayName": "Import",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.Quotation.Note",
|
||||
"ParentName": "App.SupplyChain.Quotation",
|
||||
"DisplayName": "Note",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
|
||||
{
|
||||
"GroupName": "App.SupplyChain",
|
||||
"Name": "App.SupplyChain.Material",
|
||||
|
|
|
|||
|
|
@ -199,5 +199,9 @@ public enum TableNameEnum
|
|||
ProjectTeam,
|
||||
ProjectPhase,
|
||||
ProjectTask,
|
||||
ProjectTaskDaily
|
||||
ProjectTaskDaily,
|
||||
Quotation,
|
||||
QuotationItem,
|
||||
QuotationStatus,
|
||||
DeliveryTerm
|
||||
}
|
||||
|
|
|
|||
|
|
@ -163,12 +163,13 @@ public static class TableNameResolver
|
|||
{ nameof(TableNameEnum.SocialComment), (TablePrefix.TenantByName, MenuPrefix.Intranet) },
|
||||
{ nameof(TableNameEnum.SocialLike), (TablePrefix.TenantByName, MenuPrefix.Intranet) },
|
||||
|
||||
// 🔹 Supply Chain
|
||||
// 🔹 SUPPLY CHAIN
|
||||
{ nameof(TableNameEnum.MaterialType), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
|
||||
{ nameof(TableNameEnum.MaterialGroup), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
|
||||
{ nameof(TableNameEnum.Material), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
|
||||
{ nameof(TableNameEnum.MaterialSpecification), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
|
||||
{ nameof(TableNameEnum.PaymentTerm), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
|
||||
{ nameof(TableNameEnum.DeliveryTerm), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
|
||||
{ nameof(TableNameEnum.SupplyType), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
|
||||
{ nameof(TableNameEnum.SupplyCardType), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
|
||||
{ nameof(TableNameEnum.Approval), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
|
||||
|
|
@ -176,6 +177,9 @@ public static class TableNameResolver
|
|||
{ nameof(TableNameEnum.RequestType), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
|
||||
{ nameof(TableNameEnum.Request), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
|
||||
{ nameof(TableNameEnum.RequestItem), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
|
||||
{ nameof(TableNameEnum.Quotation), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
|
||||
{ nameof(TableNameEnum.QuotationItem), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
|
||||
{ nameof(TableNameEnum.QuotationStatus), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
|
||||
|
||||
// CRM
|
||||
{ nameof(TableNameEnum.CustomerSegment), (TablePrefix.TenantByName, MenuPrefix.Crm) },
|
||||
|
|
|
|||
|
|
@ -516,6 +516,7 @@ public static class SeedConsts
|
|||
public const string Material = Default + ".Material";
|
||||
public const string Supply = Default + ".Supply";
|
||||
public const string PaymentTerm = Default + ".PaymentTerm";
|
||||
public const string DeliveryTerm = Default + ".DeliveryTerm";
|
||||
public const string SupplyType = Default + ".SupplyType";
|
||||
public const string SupplyCardType = Default + ".SupplyCardType";
|
||||
public const string PartnerBank = Default + ".PartnerBank";
|
||||
|
|
@ -526,6 +527,9 @@ public static class SeedConsts
|
|||
public const string RequestType = Default + ".RequestType";
|
||||
public const string Request = Default + ".Request";
|
||||
public const string RequestItem = Default + ".RequestItem";
|
||||
public const string QuotationStatus = Default + ".QuotationStatus";
|
||||
public const string Quotation = Default + ".Quotation";
|
||||
public const string QuotationItem = Default + ".QuotationItem";
|
||||
}
|
||||
|
||||
public static class Maintenance
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
|
|
@ -11,5 +13,7 @@ public class PaymentMethod : FullAuditedEntity<Guid>, IMultiTenant
|
|||
public string Name { get; set; }
|
||||
public decimal Commission { get; set; }
|
||||
public string Logo { get; set; }
|
||||
|
||||
public ICollection<Quotation> Quotations { get; set; }
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Erp.Platform.Entities;
|
||||
|
||||
public class DeliveryTerm : 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<Quotation> Quotations { get; set; }
|
||||
}
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
|
|
@ -12,6 +13,8 @@ public class PaymentTerm : FullAuditedEntity<Guid>, IMultiTenant
|
|||
public string Description { get; set; }
|
||||
|
||||
public bool IsActive { get; set; }
|
||||
|
||||
public ICollection<Quotation> Quotations { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,52 @@
|
|||
// Domain/Entities/MmQuotation.cs
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Erp.Platform.Entities;
|
||||
|
||||
public class Quotation : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public string QuotationNumber { get; set; }
|
||||
public string RequestId { get; set; }
|
||||
public string RequestTitle { get; set; }
|
||||
public Guid RequestTypeId { get; set; }
|
||||
public RequestType RequestType { get; set; }
|
||||
|
||||
public Guid SupplierId { get; set; }
|
||||
public Partner Supplier { get; set; }
|
||||
|
||||
public DateTime QuotationDate { get; set; }
|
||||
public DateTime ValidUntil { get; set; }
|
||||
|
||||
public Guid StatusId { get; set; }
|
||||
public QuotationStatus Status { get; set; }
|
||||
|
||||
public decimal TotalAmount { get; set; }
|
||||
public string Currency { get; set; }
|
||||
|
||||
public Guid PaymentTermId { get; set; }
|
||||
public PaymentTerm PaymentTerm { get; set; }
|
||||
|
||||
public Guid DeliveryTermId { get; set; }
|
||||
public DeliveryTerm DeliveryTerm { get; set; }
|
||||
|
||||
public int? DeliveryTime { get; set; }
|
||||
|
||||
public int? EvaluationScore { get; set; } //Değerlendirme Puanı
|
||||
public string EvaluationComments { get; set; } //Değerlendirme Yorumları
|
||||
public string EvaluationNotes { get; set; } //Değerlendirme Notlar
|
||||
|
||||
public string Notes { get; set; } //Notlar
|
||||
|
||||
public string SubmittedBy { get; set; } //Teklif Veren
|
||||
public DateTime SubmittedAt { get; set; } //Teklif Tarihi
|
||||
|
||||
public string EvaluatedBy { get; set; } //Değerlendiren
|
||||
public DateTime? EvaluatedAt { get; set; } //Değerlendirme Tarihi
|
||||
|
||||
public ICollection<QuotationItem> Items { get; set; }
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
using System;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Erp.Platform.Entities;
|
||||
|
||||
public class QuotationItem : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public Guid QuotationId { get; set; }
|
||||
public Quotation Quotation { get; set; }
|
||||
|
||||
public Guid MaterialId { get; set; }
|
||||
public Material Material { get; set; }
|
||||
|
||||
public decimal Quantity { get; set; }
|
||||
public Guid UomId { get; set; }
|
||||
public Uom Uom { get; set; }
|
||||
|
||||
public decimal UnitPrice { get; set; }
|
||||
public decimal TotalPrice { get; set; }
|
||||
|
||||
public int? LeadTime { get; set; }
|
||||
|
||||
public string Description { get; set; }
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Erp.Platform.Entities;
|
||||
|
||||
public class QuotationStatus : 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<Quotation> Quotations { get; set; }
|
||||
}
|
||||
|
|
@ -200,6 +200,7 @@ public class PlatformDbContext :
|
|||
public DbSet<Material> Materials { get; set; }
|
||||
public DbSet<MaterialSpecification> MaterialSpecifications { get; set; }
|
||||
public DbSet<PaymentTerm> PaymentTerms { get; set; }
|
||||
public DbSet<DeliveryTerm> DeliveryTerms { get; set; }
|
||||
|
||||
public DbSet<Partner> Partners { get; set; }
|
||||
public DbSet<PartnerBank> PartnerBanks { get; set; }
|
||||
|
|
@ -216,6 +217,9 @@ public class PlatformDbContext :
|
|||
public DbSet<ApprovalStep> ApprovalSteps { get; set; }
|
||||
public DbSet<Request> PurchaseRequests { get; set; }
|
||||
public DbSet<RequestItem> PurchaseRequestItems { get; set; }
|
||||
public DbSet<QuotationStatus> QuotationStatuses { get; set; }
|
||||
public DbSet<Quotation> Quotations { get; set; }
|
||||
public DbSet<QuotationItem> QuotationItems { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Crm
|
||||
|
|
@ -267,7 +271,7 @@ public class PlatformDbContext :
|
|||
public DbSet<BomComponent> BomComponents { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Rd
|
||||
#region Project
|
||||
public DbSet<Entities.Type> Types { get; set; }
|
||||
public DbSet<Status> Statuses { get; set; }
|
||||
public DbSet<TaskType> TaskTypes { get; set; }
|
||||
|
|
@ -3426,5 +3430,97 @@ public class PlatformDbContext :
|
|||
.HasForeignKey(x => x.ProjectId)
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
});
|
||||
|
||||
builder.Entity<QuotationStatus>(b =>
|
||||
{
|
||||
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.QuotationStatus)), 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<DeliveryTerm>(b =>
|
||||
{
|
||||
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.DeliveryTerm)), 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<Quotation>(b =>
|
||||
{
|
||||
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Quotation)), Prefix.DbSchema);
|
||||
b.ConfigureByConvention();
|
||||
|
||||
b.Property(x => x.QuotationNumber).IsRequired().HasMaxLength(50);
|
||||
b.Property(x => x.RequestId).IsRequired().HasMaxLength(50);
|
||||
b.Property(x => x.RequestTitle).IsRequired().HasMaxLength(200);
|
||||
|
||||
b.Property(x => x.RequestTypeId).IsRequired();
|
||||
b.Property(x => x.SupplierId).IsRequired();
|
||||
|
||||
b.Property(x => x.QuotationDate).IsRequired();
|
||||
b.Property(x => x.ValidUntil).IsRequired();
|
||||
|
||||
b.Property(x => x.StatusId).IsRequired();
|
||||
|
||||
b.Property(x => x.TotalAmount).HasPrecision(18, 2).IsRequired();
|
||||
b.Property(x => x.Currency).IsRequired().HasMaxLength(10);
|
||||
|
||||
b.Property(x => x.PaymentTermId).IsRequired();
|
||||
b.Property(x => x.DeliveryTermId).IsRequired();
|
||||
|
||||
b.Property(x => x.DeliveryTime).HasDefaultValue(0);
|
||||
|
||||
b.Property(x => x.EvaluationScore).HasDefaultValue(0);
|
||||
b.Property(x => x.EvaluationComments).HasMaxLength(1000);
|
||||
b.Property(x => x.EvaluationNotes).HasMaxLength(1000);
|
||||
b.Property(x => x.SubmittedBy).IsRequired().HasMaxLength(100);
|
||||
b.Property(x => x.SubmittedAt).IsRequired();
|
||||
|
||||
b.Property(x => x.EvaluatedBy).HasMaxLength(100);
|
||||
b.Property(x => x.EvaluatedAt);
|
||||
|
||||
b.HasOne(x => x.Status)
|
||||
.WithMany(x => x.Quotations)
|
||||
.HasForeignKey(x => x.StatusId)
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
b.HasOne(x => x.DeliveryTerm)
|
||||
.WithMany(x => x.Quotations)
|
||||
.HasForeignKey(x => x.DeliveryTermId)
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
b.HasOne(x => x.PaymentTerm)
|
||||
.WithMany(x => x.Quotations)
|
||||
.HasForeignKey(x => x.PaymentTermId)
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
});
|
||||
|
||||
builder.Entity<QuotationItem>(b =>
|
||||
{
|
||||
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.QuotationItem)), Prefix.DbSchema);
|
||||
b.ConfigureByConvention();
|
||||
|
||||
b.Property(x => x.QuotationId).IsRequired();
|
||||
b.Property(x => x.MaterialId).IsRequired();
|
||||
b.Property(x => x.Description).HasMaxLength(500);
|
||||
|
||||
b.Property(x => x.Quantity).HasPrecision(18, 2).IsRequired();
|
||||
b.Property(x => x.UomId).IsRequired();
|
||||
|
||||
b.Property(x => x.UnitPrice).HasPrecision(18, 2).IsRequired();
|
||||
b.Property(x => x.TotalPrice).HasPrecision(18, 2).IsRequired();
|
||||
b.Property(x => x.LeadTime).HasDefaultValue(0);
|
||||
|
||||
b.HasOne(x => x.Quotation)
|
||||
.WithMany(x => x.Items)
|
||||
.HasForeignKey(x => x.QuotationId)
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
|||
namespace Erp.Platform.Migrations
|
||||
{
|
||||
[DbContext(typeof(PlatformDbContext))]
|
||||
[Migration("20251127214637_Initial")]
|
||||
[Migration("20251201070744_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
/// <inheritdoc />
|
||||
|
|
@ -4038,6 +4038,64 @@ namespace Erp.Platform.Migrations
|
|||
b.ToTable("Sas_H_DataSource", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.DeliveryTerm", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(true);
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Scp_T_DeliveryTerm", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Demo", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
@ -10849,6 +10907,285 @@ namespace Erp.Platform.Migrations
|
|||
b.ToTable("Crd_T_QuestionTag", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Quotation", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<string>("Currency")
|
||||
.IsRequired()
|
||||
.HasMaxLength(10)
|
||||
.HasColumnType("nvarchar(10)");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<Guid>("DeliveryTermId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int?>("DeliveryTime")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasDefaultValue(0);
|
||||
|
||||
b.Property<DateTime?>("EvaluatedAt")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("EvaluatedBy")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("EvaluationComments")
|
||||
.HasMaxLength(1000)
|
||||
.HasColumnType("nvarchar(1000)");
|
||||
|
||||
b.Property<string>("EvaluationNotes")
|
||||
.HasMaxLength(1000)
|
||||
.HasColumnType("nvarchar(1000)");
|
||||
|
||||
b.Property<int?>("EvaluationScore")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasDefaultValue(0);
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<string>("Notes")
|
||||
.HasMaxLength(1000)
|
||||
.HasColumnType("nvarchar(1000)");
|
||||
|
||||
b.Property<Guid?>("PaymentMethodId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("PaymentTermId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("QuotationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("QuotationNumber")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("RequestId")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("RequestTitle")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.Property<Guid>("RequestTypeId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("StatusId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("SubmittedAt")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("SubmittedBy")
|
||||
.IsRequired()
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<Guid>("SupplierId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.Property<decimal>("TotalAmount")
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<DateTime>("ValidUntil")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("DeliveryTermId");
|
||||
|
||||
b.HasIndex("PaymentMethodId");
|
||||
|
||||
b.HasIndex("PaymentTermId");
|
||||
|
||||
b.HasIndex("RequestTypeId");
|
||||
|
||||
b.HasIndex("StatusId");
|
||||
|
||||
b.HasIndex("SupplierId");
|
||||
|
||||
b.ToTable("Scp_T_Quotation", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.QuotationItem", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<int?>("LeadTime")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasDefaultValue(0);
|
||||
|
||||
b.Property<Guid>("MaterialId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<decimal>("Quantity")
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<Guid>("QuotationId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.Property<decimal>("TotalPrice")
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<decimal>("UnitPrice")
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<Guid>("UomId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("MaterialId");
|
||||
|
||||
b.HasIndex("QuotationId");
|
||||
|
||||
b.HasIndex("UomId");
|
||||
|
||||
b.ToTable("Scp_T_QuotationItem", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.QuotationStatus", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(true);
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Scp_T_QuotationStatus", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.RegistrationMethod", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
@ -17995,6 +18332,80 @@ namespace Erp.Platform.Migrations
|
|||
b.Navigation("Question");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Quotation", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.DeliveryTerm", "DeliveryTerm")
|
||||
.WithMany("Quotations")
|
||||
.HasForeignKey("DeliveryTermId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.PaymentMethod", null)
|
||||
.WithMany("Quotations")
|
||||
.HasForeignKey("PaymentMethodId");
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.PaymentTerm", "PaymentTerm")
|
||||
.WithMany("Quotations")
|
||||
.HasForeignKey("PaymentTermId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.RequestType", "RequestType")
|
||||
.WithMany()
|
||||
.HasForeignKey("RequestTypeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.QuotationStatus", "Status")
|
||||
.WithMany("Quotations")
|
||||
.HasForeignKey("StatusId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.Partner", "Supplier")
|
||||
.WithMany()
|
||||
.HasForeignKey("SupplierId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("DeliveryTerm");
|
||||
|
||||
b.Navigation("PaymentTerm");
|
||||
|
||||
b.Navigation("RequestType");
|
||||
|
||||
b.Navigation("Status");
|
||||
|
||||
b.Navigation("Supplier");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.QuotationItem", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.Material", "Material")
|
||||
.WithMany()
|
||||
.HasForeignKey("MaterialId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.Quotation", "Quotation")
|
||||
.WithMany("Items")
|
||||
.HasForeignKey("QuotationId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.Uom", "Uom")
|
||||
.WithMany()
|
||||
.HasForeignKey("UomId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Material");
|
||||
|
||||
b.Navigation("Quotation");
|
||||
|
||||
b.Navigation("Uom");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.RegistrationMethod", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.Branch", "Branch")
|
||||
|
|
@ -18683,6 +19094,11 @@ namespace Erp.Platform.Migrations
|
|||
b.Navigation("Partners");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.DeliveryTerm", b =>
|
||||
{
|
||||
b.Navigation("Quotations");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Department", b =>
|
||||
{
|
||||
b.Navigation("Performans360s");
|
||||
|
|
@ -18839,6 +19255,16 @@ namespace Erp.Platform.Migrations
|
|||
b.Navigation("Contacts");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.PaymentMethod", b =>
|
||||
{
|
||||
b.Navigation("Quotations");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.PaymentTerm", b =>
|
||||
{
|
||||
b.Navigation("Quotations");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Payroll", b =>
|
||||
{
|
||||
b.Navigation("Items");
|
||||
|
|
@ -18880,6 +19306,16 @@ namespace Erp.Platform.Migrations
|
|||
b.Navigation("Questions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Quotation", b =>
|
||||
{
|
||||
b.Navigation("Items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.QuotationStatus", b =>
|
||||
{
|
||||
b.Navigation("Quotations");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.RegistrationType", b =>
|
||||
{
|
||||
b.Navigation("ClassTypes");
|
||||
|
|
@ -2630,6 +2630,28 @@ namespace Erp.Platform.Migrations
|
|||
table.PrimaryKey("PK_Sas_T_Sector", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Scp_T_DeliveryTerm",
|
||||
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_Scp_T_DeliveryTerm", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Scp_T_MaterialGroup",
|
||||
columns: table => new
|
||||
|
|
@ -2705,6 +2727,28 @@ namespace Erp.Platform.Migrations
|
|||
table.PrimaryKey("PK_Scp_T_PaymentTerm", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Scp_T_QuotationStatus",
|
||||
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_Scp_T_QuotationStatus", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Scp_T_RequestType",
|
||||
columns: table => new
|
||||
|
|
@ -5038,6 +5082,127 @@ namespace Erp.Platform.Migrations
|
|||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Scp_T_Quotation",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
QuotationNumber = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
||||
RequestId = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
||||
RequestTitle = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
|
||||
RequestTypeId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
SupplierId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
QuotationDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
ValidUntil = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
StatusId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TotalAmount = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false),
|
||||
Currency = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: false),
|
||||
PaymentTermId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
DeliveryTermId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
DeliveryTime = table.Column<int>(type: "int", nullable: true, defaultValue: 0),
|
||||
EvaluationScore = table.Column<int>(type: "int", nullable: true, defaultValue: 0),
|
||||
EvaluationComments = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
|
||||
EvaluationNotes = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
|
||||
Notes = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
|
||||
SubmittedBy = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
|
||||
SubmittedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
EvaluatedBy = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
|
||||
EvaluatedAt = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
PaymentMethodId = 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_Scp_T_Quotation", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Scp_T_Quotation_Adm_T_Partner_SupplierId",
|
||||
column: x => x.SupplierId,
|
||||
principalTable: "Adm_T_Partner",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_Scp_T_Quotation_Adm_T_PaymentMethod_PaymentMethodId",
|
||||
column: x => x.PaymentMethodId,
|
||||
principalTable: "Adm_T_PaymentMethod",
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_Scp_T_Quotation_Scp_T_DeliveryTerm_DeliveryTermId",
|
||||
column: x => x.DeliveryTermId,
|
||||
principalTable: "Scp_T_DeliveryTerm",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_Scp_T_Quotation_Scp_T_PaymentTerm_PaymentTermId",
|
||||
column: x => x.PaymentTermId,
|
||||
principalTable: "Scp_T_PaymentTerm",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_Scp_T_Quotation_Scp_T_QuotationStatus_StatusId",
|
||||
column: x => x.StatusId,
|
||||
principalTable: "Scp_T_QuotationStatus",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_Scp_T_Quotation_Scp_T_RequestType_RequestTypeId",
|
||||
column: x => x.RequestTypeId,
|
||||
principalTable: "Scp_T_RequestType",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Scp_T_QuotationItem",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
QuotationId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
MaterialId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
Quantity = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false),
|
||||
UomId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
UnitPrice = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false),
|
||||
TotalPrice = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false),
|
||||
LeadTime = table.Column<int>(type: "int", nullable: true, defaultValue: 0),
|
||||
Description = table.Column<string>(type: "nvarchar(500)", maxLength: 500, 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_Scp_T_QuotationItem", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Scp_T_QuotationItem_Adm_T_Uom_UomId",
|
||||
column: x => x.UomId,
|
||||
principalTable: "Adm_T_Uom",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_Scp_T_QuotationItem_Scp_T_Material_MaterialId",
|
||||
column: x => x.MaterialId,
|
||||
principalTable: "Scp_T_Material",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_Scp_T_QuotationItem_Scp_T_Quotation_QuotationId",
|
||||
column: x => x.QuotationId,
|
||||
principalTable: "Scp_T_Quotation",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Crm_T_Activity",
|
||||
columns: table => new
|
||||
|
|
@ -8294,6 +8459,51 @@ namespace Erp.Platform.Migrations
|
|||
table: "Scp_T_MaterialSpecification",
|
||||
column: "UnitId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Scp_T_Quotation_DeliveryTermId",
|
||||
table: "Scp_T_Quotation",
|
||||
column: "DeliveryTermId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Scp_T_Quotation_PaymentMethodId",
|
||||
table: "Scp_T_Quotation",
|
||||
column: "PaymentMethodId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Scp_T_Quotation_PaymentTermId",
|
||||
table: "Scp_T_Quotation",
|
||||
column: "PaymentTermId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Scp_T_Quotation_RequestTypeId",
|
||||
table: "Scp_T_Quotation",
|
||||
column: "RequestTypeId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Scp_T_Quotation_StatusId",
|
||||
table: "Scp_T_Quotation",
|
||||
column: "StatusId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Scp_T_Quotation_SupplierId",
|
||||
table: "Scp_T_Quotation",
|
||||
column: "SupplierId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Scp_T_QuotationItem_MaterialId",
|
||||
table: "Scp_T_QuotationItem",
|
||||
column: "MaterialId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Scp_T_QuotationItem_QuotationId",
|
||||
table: "Scp_T_QuotationItem",
|
||||
column: "QuotationId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Scp_T_QuotationItem_UomId",
|
||||
table: "Scp_T_QuotationItem",
|
||||
column: "UomId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Scp_T_Request_DepartmentId",
|
||||
table: "Scp_T_Request",
|
||||
|
|
@ -8614,9 +8824,6 @@ namespace Erp.Platform.Migrations
|
|||
migrationBuilder.DropTable(
|
||||
name: "Adm_T_PartnerContact");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Adm_T_PaymentMethod");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Adm_T_Product");
|
||||
|
||||
|
|
@ -8893,6 +9100,9 @@ namespace Erp.Platform.Migrations
|
|||
migrationBuilder.DropTable(
|
||||
name: "Scp_T_MaterialSpecification");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Scp_T_QuotationItem");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Scp_T_RequestItem");
|
||||
|
||||
|
|
@ -9019,6 +9229,9 @@ namespace Erp.Platform.Migrations
|
|||
migrationBuilder.DropTable(
|
||||
name: "Adm_T_Uom");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Scp_T_Quotation");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Scp_T_Request");
|
||||
|
||||
|
|
@ -9094,6 +9307,15 @@ namespace Erp.Platform.Migrations
|
|||
migrationBuilder.DropTable(
|
||||
name: "Adm_T_UomCategory");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Adm_T_PaymentMethod");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Scp_T_DeliveryTerm");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Scp_T_QuotationStatus");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Scp_T_RequestType");
|
||||
|
||||
|
|
@ -4035,6 +4035,64 @@ namespace Erp.Platform.Migrations
|
|||
b.ToTable("Sas_H_DataSource", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.DeliveryTerm", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(true);
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Scp_T_DeliveryTerm", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Demo", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
@ -10846,6 +10904,285 @@ namespace Erp.Platform.Migrations
|
|||
b.ToTable("Crd_T_QuestionTag", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Quotation", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<string>("Currency")
|
||||
.IsRequired()
|
||||
.HasMaxLength(10)
|
||||
.HasColumnType("nvarchar(10)");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<Guid>("DeliveryTermId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int?>("DeliveryTime")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasDefaultValue(0);
|
||||
|
||||
b.Property<DateTime?>("EvaluatedAt")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("EvaluatedBy")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("EvaluationComments")
|
||||
.HasMaxLength(1000)
|
||||
.HasColumnType("nvarchar(1000)");
|
||||
|
||||
b.Property<string>("EvaluationNotes")
|
||||
.HasMaxLength(1000)
|
||||
.HasColumnType("nvarchar(1000)");
|
||||
|
||||
b.Property<int?>("EvaluationScore")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasDefaultValue(0);
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<string>("Notes")
|
||||
.HasMaxLength(1000)
|
||||
.HasColumnType("nvarchar(1000)");
|
||||
|
||||
b.Property<Guid?>("PaymentMethodId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("PaymentTermId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("QuotationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("QuotationNumber")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("RequestId")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("RequestTitle")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.Property<Guid>("RequestTypeId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("StatusId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("SubmittedAt")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("SubmittedBy")
|
||||
.IsRequired()
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<Guid>("SupplierId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.Property<decimal>("TotalAmount")
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<DateTime>("ValidUntil")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("DeliveryTermId");
|
||||
|
||||
b.HasIndex("PaymentMethodId");
|
||||
|
||||
b.HasIndex("PaymentTermId");
|
||||
|
||||
b.HasIndex("RequestTypeId");
|
||||
|
||||
b.HasIndex("StatusId");
|
||||
|
||||
b.HasIndex("SupplierId");
|
||||
|
||||
b.ToTable("Scp_T_Quotation", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.QuotationItem", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<int?>("LeadTime")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasDefaultValue(0);
|
||||
|
||||
b.Property<Guid>("MaterialId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<decimal>("Quantity")
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<Guid>("QuotationId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.Property<decimal>("TotalPrice")
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<decimal>("UnitPrice")
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<Guid>("UomId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("MaterialId");
|
||||
|
||||
b.HasIndex("QuotationId");
|
||||
|
||||
b.HasIndex("UomId");
|
||||
|
||||
b.ToTable("Scp_T_QuotationItem", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.QuotationStatus", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(true);
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Scp_T_QuotationStatus", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.RegistrationMethod", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
@ -17992,6 +18329,80 @@ namespace Erp.Platform.Migrations
|
|||
b.Navigation("Question");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Quotation", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.DeliveryTerm", "DeliveryTerm")
|
||||
.WithMany("Quotations")
|
||||
.HasForeignKey("DeliveryTermId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.PaymentMethod", null)
|
||||
.WithMany("Quotations")
|
||||
.HasForeignKey("PaymentMethodId");
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.PaymentTerm", "PaymentTerm")
|
||||
.WithMany("Quotations")
|
||||
.HasForeignKey("PaymentTermId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.RequestType", "RequestType")
|
||||
.WithMany()
|
||||
.HasForeignKey("RequestTypeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.QuotationStatus", "Status")
|
||||
.WithMany("Quotations")
|
||||
.HasForeignKey("StatusId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.Partner", "Supplier")
|
||||
.WithMany()
|
||||
.HasForeignKey("SupplierId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("DeliveryTerm");
|
||||
|
||||
b.Navigation("PaymentTerm");
|
||||
|
||||
b.Navigation("RequestType");
|
||||
|
||||
b.Navigation("Status");
|
||||
|
||||
b.Navigation("Supplier");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.QuotationItem", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.Material", "Material")
|
||||
.WithMany()
|
||||
.HasForeignKey("MaterialId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.Quotation", "Quotation")
|
||||
.WithMany("Items")
|
||||
.HasForeignKey("QuotationId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.Uom", "Uom")
|
||||
.WithMany()
|
||||
.HasForeignKey("UomId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Material");
|
||||
|
||||
b.Navigation("Quotation");
|
||||
|
||||
b.Navigation("Uom");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.RegistrationMethod", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.Branch", "Branch")
|
||||
|
|
@ -18680,6 +19091,11 @@ namespace Erp.Platform.Migrations
|
|||
b.Navigation("Partners");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.DeliveryTerm", b =>
|
||||
{
|
||||
b.Navigation("Quotations");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Department", b =>
|
||||
{
|
||||
b.Navigation("Performans360s");
|
||||
|
|
@ -18836,6 +19252,16 @@ namespace Erp.Platform.Migrations
|
|||
b.Navigation("Contacts");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.PaymentMethod", b =>
|
||||
{
|
||||
b.Navigation("Quotations");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.PaymentTerm", b =>
|
||||
{
|
||||
b.Navigation("Quotations");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Payroll", b =>
|
||||
{
|
||||
b.Navigation("Items");
|
||||
|
|
@ -18877,6 +19303,16 @@ namespace Erp.Platform.Migrations
|
|||
b.Navigation("Questions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Quotation", b =>
|
||||
{
|
||||
b.Navigation("Items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.QuotationStatus", b =>
|
||||
{
|
||||
b.Navigation("Quotations");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.RegistrationType", b =>
|
||||
{
|
||||
b.Navigation("ClassTypes");
|
||||
|
|
|
|||
|
|
@ -6301,5 +6301,59 @@
|
|||
],
|
||||
"ProjectTaskDailies" : [
|
||||
|
||||
],
|
||||
"DeliveryTerms": [
|
||||
{
|
||||
"name": "15 Gün",
|
||||
"description": "Teslimatın sipariş tarihinden itibaren 15 gün içinde yapılacağını ifade eder",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"name": "21 Gün",
|
||||
"description": "Teslimatın sipariş tarihinden itibaren 21 gün içinde yapılacağını ifade eder",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"name": "30 Gün",
|
||||
"description": "Teslimatın sipariş tarihinden itibaren 30 gün içinde yapılacağını ifade eder",
|
||||
"isActive": true
|
||||
}
|
||||
],
|
||||
"QuotationStatuses": [
|
||||
{
|
||||
"name": "Taslak",
|
||||
"description": "Teklifin taslak aşamasında olduğunu ifade eder",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"name": "Beklemede",
|
||||
"description": "Teklifin beklemede olduğunu ifade eder",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"name": "İnceleme Aşamasında",
|
||||
"description": "Teklifin inceleme aşamasında olduğunu ifade eder",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"name": "Gönderildi",
|
||||
"description": "Teklifin gönderildiğini ifade eder",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"name": "Onaylandı",
|
||||
"description": "Teklifin onaylandığını ifade eder",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"name": "Reddedildi",
|
||||
"description": "Teklifin reddedildiğini ifade eder",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"name": "Süresi Dolmuş",
|
||||
"description": "Teklifin süresinin dolduğunu ifade eder",
|
||||
"isActive": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -137,6 +137,8 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
private readonly IRepository<Project, Guid> _projectRepository;
|
||||
private readonly IRepository<ProjectPhase, Guid> _projectPhaseRepository;
|
||||
private readonly IRepository<ProjectTask, Guid> _projectTaskRepository;
|
||||
private readonly IRepository<DeliveryTerm, Guid> _deliveryTermRepository;
|
||||
private readonly IRepository<QuotationStatus, Guid> _quotationStatusRepository;
|
||||
|
||||
public TenantDataSeeder(
|
||||
IClock clock,
|
||||
|
|
@ -256,7 +258,9 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
IRepository<TaskType, Guid> projectTaskTypeRepository,
|
||||
IRepository<Project, Guid> projectRepository,
|
||||
IRepository<ProjectPhase, Guid> projectPhaseRepository,
|
||||
IRepository<ProjectTask, Guid> projectTaskRepository
|
||||
IRepository<ProjectTask, Guid> projectTaskRepository,
|
||||
IRepository<DeliveryTerm, Guid> deliveryTermRepository,
|
||||
IRepository<QuotationStatus, Guid> quotationStatusRepository
|
||||
)
|
||||
{
|
||||
_clock = clock;
|
||||
|
|
@ -378,6 +382,8 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
_projectRepository = projectRepository;
|
||||
_projectPhaseRepository = projectPhaseRepository;
|
||||
_projectTaskRepository = projectTaskRepository;
|
||||
_deliveryTermRepository = deliveryTermRepository;
|
||||
_quotationStatusRepository = quotationStatusRepository;
|
||||
}
|
||||
|
||||
private static IConfigurationRoot BuildConfiguration()
|
||||
|
|
@ -2650,6 +2656,34 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
IsActive = item.IsActive
|
||||
}, autoSave: true);
|
||||
}
|
||||
|
||||
foreach (var item in items.DeliveryTerms)
|
||||
{
|
||||
var exists = await _deliveryTermRepository.AnyAsync(x => x.Name == item.Name);
|
||||
if (exists)
|
||||
continue;
|
||||
|
||||
await _deliveryTermRepository.InsertAsync(new DeliveryTerm
|
||||
{
|
||||
Name = item.Name,
|
||||
Description = item.Description,
|
||||
IsActive = item.IsActive
|
||||
}, autoSave: true);
|
||||
}
|
||||
|
||||
foreach (var item in items.QuotationStatuses)
|
||||
{
|
||||
var exists = await _quotationStatusRepository.AnyAsync(x => x.Name == item.Name);
|
||||
if (exists)
|
||||
continue;
|
||||
|
||||
await _quotationStatusRepository.InsertAsync(new QuotationStatus
|
||||
{
|
||||
Name = item.Name,
|
||||
Description = item.Description,
|
||||
IsActive = item.IsActive
|
||||
}, autoSave: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -90,6 +90,8 @@ public class TenantSeederDto
|
|||
public List<SupplyCardTypeSeedDto> SupplyCardTypes { get; set; }
|
||||
public List<RequestTypeSeedDto> RequestTypes { get; set; }
|
||||
public List<ApprovalSeedDto> Approvals { get; set; }
|
||||
public List<DeliveryTermSeedDto> DeliveryTerms { get; set; }
|
||||
public List<QuotationStatusSeedDto> QuotationStatuses { get; set; }
|
||||
|
||||
//Crm
|
||||
public List<PartnerSeedDto> Partners { get; set; }
|
||||
|
|
@ -140,6 +142,20 @@ public class TenantSeederDto
|
|||
public List<ProjectTaskDailySeedDto> ProjectTaskDailies { get; set; }
|
||||
}
|
||||
|
||||
public class DeliveryTermSeedDto
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
}
|
||||
|
||||
public class QuotationStatusSeedDto
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
}
|
||||
|
||||
public class ProjectTaskDailySeedDto
|
||||
{
|
||||
public string EmployeeCode { get; set; }
|
||||
|
|
|
|||
Loading…
Reference in a new issue