Maintenance Workorder Type, Status
ListFormSeeder
This commit is contained in:
parent
abd7dd05fd
commit
8bb9d8ed87
23 changed files with 1948 additions and 100 deletions
|
|
@ -9486,6 +9486,18 @@
|
|||
"tr": "Arıza Bildirimleri",
|
||||
"en": "Fault Reports"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Maintenance.WorkorderType",
|
||||
"tr": "Bakım İş Emri Türleri",
|
||||
"en": "Workorder Types"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Maintenance.WorkorderStatus",
|
||||
"tr": "Bakım İş Emri Durumları",
|
||||
"en": "Workorder Statuses"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Maintenance.Workorders",
|
||||
|
|
|
|||
|
|
@ -85,7 +85,6 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
|
|||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
|
||||
new() {
|
||||
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [
|
||||
new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea },
|
||||
new EditingFormItemDto { Order = 4, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox },
|
||||
|
|
@ -114,22 +113,6 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
|
|||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Code",
|
||||
Width = 150,
|
||||
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,
|
||||
|
|
@ -184,7 +167,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region Workcenter status
|
||||
#region Workcenter Status
|
||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.WorkcenterStatus))
|
||||
{
|
||||
var listForm = await _listFormRepository.InsertAsync(
|
||||
|
|
@ -224,10 +207,9 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
|
|||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
|
||||
new() {
|
||||
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [
|
||||
new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea },
|
||||
new EditingFormItemDto { Order = 4, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox },
|
||||
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[] {
|
||||
|
|
@ -253,22 +235,6 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
|
|||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Code",
|
||||
Width = 150,
|
||||
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,
|
||||
|
|
@ -1858,7 +1824,371 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region Workorder Type
|
||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.WorkorderType))
|
||||
{
|
||||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.WorkorderType,
|
||||
Name = AppCodes.Maintenance.WorkorderType,
|
||||
Title = AppCodes.Maintenance.WorkorderType,
|
||||
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||
IsTenant = true,
|
||||
IsBranch = false,
|
||||
IsOrganizationUnit = false,
|
||||
Description = AppCodes.Maintenance.WorkorderType,
|
||||
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.WorkorderType)),
|
||||
KeyFieldName = "Id",
|
||||
KeyFieldDbSourceType = DbType.Guid,
|
||||
DefaultFilter = DefaultFilterJson,
|
||||
SortMode = GridOptions.SortModeSingle,
|
||||
FilterRowJson = DefaultFilterRowJson,
|
||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||
SearchPanelJson = DefaultSearchPanelJson,
|
||||
GroupPanelJson = DefaultGroupPanelJson,
|
||||
SelectionJson = DefaultSelectionSingleJson,
|
||||
ColumnOptionJson = DefaultColumnOptionJson,
|
||||
PermissionJson = DefaultPermissionJson(AppCodes.Maintenance.WorkorderType),
|
||||
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.WorkorderType)),
|
||||
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
|
||||
PagerOptionJson = DefaultPagerOptionJson,
|
||||
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
||||
EditingOptionJson = DefaultEditingOptionJson(AppCodes.Maintenance.WorkorderType, 500, 250, true, true, true, true, false),
|
||||
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 Workorder Type 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,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Name",
|
||||
Width = 350,
|
||||
ListOrderNo = 2,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
SortIndex = 1,
|
||||
SortDirection = GridColumnOptions.SortOrderAsc,
|
||||
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 Workorder Status
|
||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.WorkorderStatus))
|
||||
{
|
||||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.WorkorderStatus,
|
||||
Name = AppCodes.Maintenance.WorkorderStatus,
|
||||
Title = AppCodes.Maintenance.WorkorderStatus,
|
||||
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||
IsTenant = true,
|
||||
IsBranch = false,
|
||||
IsOrganizationUnit = false,
|
||||
Description = AppCodes.Maintenance.WorkorderStatus,
|
||||
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.WorkorderStatus)),
|
||||
KeyFieldName = "Id",
|
||||
KeyFieldDbSourceType = DbType.Guid,
|
||||
DefaultFilter = DefaultFilterJson,
|
||||
SortMode = GridOptions.SortModeSingle,
|
||||
FilterRowJson = DefaultFilterRowJson,
|
||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||
SearchPanelJson = DefaultSearchPanelJson,
|
||||
GroupPanelJson = DefaultGroupPanelJson,
|
||||
SelectionJson = DefaultSelectionSingleJson,
|
||||
ColumnOptionJson = DefaultColumnOptionJson,
|
||||
PermissionJson = DefaultPermissionJson(AppCodes.Maintenance.WorkorderStatus),
|
||||
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.WorkorderStatus)),
|
||||
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
|
||||
PagerOptionJson = DefaultPagerOptionJson,
|
||||
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
||||
EditingOptionJson = DefaultEditingOptionJson(AppCodes.Maintenance.WorkorderStatus, 500, 250, true, true, true, true, false),
|
||||
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 Workorder 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,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Name",
|
||||
Width = 350,
|
||||
ListOrderNo = 2,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
SortIndex = 1,
|
||||
SortDirection = GridColumnOptions.SortOrderAsc,
|
||||
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 Workorder
|
||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Workorder))
|
||||
{
|
||||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson,
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Workorder,
|
||||
Name = AppCodes.Maintenance.Workorder,
|
||||
Title = AppCodes.Maintenance.Workorder,
|
||||
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||
IsTenant = true,
|
||||
IsBranch = false,
|
||||
IsOrganizationUnit = false,
|
||||
Description = AppCodes.Maintenance.Workorder,
|
||||
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Workorder)),
|
||||
KeyFieldName = "Id",
|
||||
KeyFieldDbSourceType = DbType.Guid,
|
||||
DefaultFilter = DefaultFilterJson,
|
||||
SortMode = GridOptions.SortModeSingle,
|
||||
FilterRowJson = DefaultFilterRowJson,
|
||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||
SearchPanelJson = DefaultSearchPanelJson,
|
||||
GroupPanelJson = DefaultGroupPanelJson,
|
||||
SelectionJson = DefaultSelectionSingleJson,
|
||||
ColumnOptionJson = DefaultColumnOptionJson,
|
||||
PermissionJson = DefaultPermissionJson(AppCodes.Maintenance.Workorder),
|
||||
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Workorder)),
|
||||
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
|
||||
PagerOptionJson = DefaultPagerOptionJson,
|
||||
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
||||
EditingOptionJson = DefaultEditingOptionJson(AppCodes.Maintenance.Workorder, 500, 250, true, true, true, true, false),
|
||||
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 Workorder 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,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Name",
|
||||
Width = 350,
|
||||
ListOrderNo = 2,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
SortIndex = 1,
|
||||
SortDirection = GridColumnOptions.SortOrderAsc,
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2475,11 +2475,31 @@
|
|||
"RequiredPermissionName": "App.Maintenance.Fault",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Maintenance",
|
||||
"Code": "App.Maintenance.WorkorderType",
|
||||
"DisplayName": "App.Maintenance.WorkorderType",
|
||||
"Order": 9,
|
||||
"Url": "/admin/list/list-workordertype",
|
||||
"Icon": "FcWorkflow",
|
||||
"RequiredPermissionName": "App.Maintenance.WorkorderType",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Maintenance",
|
||||
"Code": "App.Maintenance.WorkorderStatus",
|
||||
"DisplayName": "App.Maintenance.WorkorderStatus",
|
||||
"Order": 10,
|
||||
"Url": "/admin/list/list-workorderstatus",
|
||||
"Icon": "FcProcess",
|
||||
"RequiredPermissionName": "App.Maintenance.WorkorderStatus",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Maintenance",
|
||||
"Code": "App.Maintenance.Workorders",
|
||||
"DisplayName": "App.Maintenance.Workorders",
|
||||
"Order": 10,
|
||||
"Order": 11,
|
||||
"Url": "/admin/maintenance/workorders",
|
||||
"Icon": "FcList",
|
||||
"RequiredPermissionName": "App.Maintenance.Workorders",
|
||||
|
|
|
|||
|
|
@ -6880,7 +6880,6 @@
|
|||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
|
||||
{
|
||||
"GroupName": "App.Maintenance",
|
||||
"Name": "App.Maintenance.FaultType",
|
||||
|
|
@ -6944,7 +6943,6 @@
|
|||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
|
||||
{
|
||||
"GroupName": "App.Maintenance",
|
||||
"Name": "App.Maintenance.FaultStatus",
|
||||
|
|
@ -7008,7 +7006,132 @@
|
|||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
|
||||
{
|
||||
"GroupName": "App.Maintenance",
|
||||
"Name": "App.Maintenance.WorkorderType",
|
||||
"ParentName": null,
|
||||
"DisplayName": "App.Maintenance.WorkorderType",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Maintenance",
|
||||
"Name": "App.Maintenance.WorkorderType.Create",
|
||||
"ParentName": "App.Maintenance.WorkorderType",
|
||||
"DisplayName": "Create",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Maintenance",
|
||||
"Name": "App.Maintenance.WorkorderType.Update",
|
||||
"ParentName": "App.Maintenance.WorkorderType",
|
||||
"DisplayName": "Update",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Maintenance",
|
||||
"Name": "App.Maintenance.WorkorderType.Delete",
|
||||
"ParentName": "App.Maintenance.WorkorderType",
|
||||
"DisplayName": "Delete",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Maintenance",
|
||||
"Name": "App.Maintenance.WorkorderType.Export",
|
||||
"ParentName": "App.Maintenance.WorkorderType",
|
||||
"DisplayName": "Export",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Maintenance",
|
||||
"Name": "App.Maintenance.WorkorderType.Import",
|
||||
"ParentName": "App.Maintenance.WorkorderType",
|
||||
"DisplayName": "Import",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Maintenance",
|
||||
"Name": "App.Maintenance.WorkorderType.Note",
|
||||
"ParentName": "App.Maintenance.WorkorderType",
|
||||
"DisplayName": "Note",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Maintenance",
|
||||
"Name": "App.Maintenance.WorkorderStatus",
|
||||
"ParentName": null,
|
||||
"DisplayName": "App.Maintenance.WorkorderStatus",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Maintenance",
|
||||
"Name": "App.Maintenance.WorkorderStatus.Create",
|
||||
"ParentName": "App.Maintenance.WorkorderStatus",
|
||||
"DisplayName": "Create",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Maintenance",
|
||||
"Name": "App.Maintenance.WorkorderStatus.Update",
|
||||
"ParentName": "App.Maintenance.WorkorderStatus",
|
||||
"DisplayName": "Update",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Maintenance",
|
||||
"Name": "App.Maintenance.WorkorderStatus.Delete",
|
||||
"ParentName": "App.Maintenance.WorkorderStatus",
|
||||
"DisplayName": "Delete",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Maintenance",
|
||||
"Name": "App.Maintenance.WorkorderStatus.Export",
|
||||
"ParentName": "App.Maintenance.WorkorderStatus",
|
||||
"DisplayName": "Export",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Maintenance",
|
||||
"Name": "App.Maintenance.WorkorderStatus.Import",
|
||||
"ParentName": "App.Maintenance.WorkorderStatus",
|
||||
"DisplayName": "Import",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Maintenance",
|
||||
"Name": "App.Maintenance.WorkorderStatus.Note",
|
||||
"ParentName": "App.Maintenance.WorkorderStatus",
|
||||
"DisplayName": "Note",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Maintenance",
|
||||
"Name": "App.Maintenance.Workorders",
|
||||
|
|
|
|||
|
|
@ -168,4 +168,7 @@ public enum TableNameEnum
|
|||
Fault,
|
||||
FaultStatus,
|
||||
FaultType,
|
||||
WorkorderType,
|
||||
WorkorderStatus,
|
||||
Workorder
|
||||
}
|
||||
|
|
|
|||
|
|
@ -542,6 +542,9 @@ public static class PlatformConsts
|
|||
public const string Fault = "list-fault";
|
||||
public const string FaultType = "list-faulttype";
|
||||
public const string FaultStatus = "list-faultstatus";
|
||||
public const string Workorder = "list-workorder";
|
||||
public const string WorkorderType = "list-workordertype";
|
||||
public const string WorkorderStatus = "list-workorderstatus";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -196,6 +196,9 @@ public static class TableNameResolver
|
|||
{ nameof(TableNameEnum.Fault), (TablePrefix.TenantByName, MenuPrefix.Maintenance) },
|
||||
{ nameof(TableNameEnum.FaultStatus), (TablePrefix.TenantByName, MenuPrefix.Maintenance) },
|
||||
{ nameof(TableNameEnum.FaultType), (TablePrefix.TenantByName, MenuPrefix.Maintenance) },
|
||||
{ nameof(TableNameEnum.Workorder), (TablePrefix.TenantByName, MenuPrefix.Maintenance) },
|
||||
{ nameof(TableNameEnum.WorkorderType), (TablePrefix.TenantByName, MenuPrefix.Maintenance) },
|
||||
{ nameof(TableNameEnum.WorkorderStatus), (TablePrefix.TenantByName, MenuPrefix.Maintenance) },
|
||||
|
||||
|
||||
// 🔹 ACCOUNTING
|
||||
|
|
|
|||
|
|
@ -532,6 +532,9 @@ public static class SeedConsts
|
|||
public const string Fault = Default + ".Fault";
|
||||
public const string FaultType = Default + ".FaultType";
|
||||
public const string FaultStatus = Default + ".FaultStatus";
|
||||
public const string Workorder = Default + ".Workorder";
|
||||
public const string WorkorderType = Default + ".WorkorderType";
|
||||
public const string WorkorderStatus = Default + ".WorkorderStatus";
|
||||
}
|
||||
|
||||
public static class Accounting
|
||||
|
|
|
|||
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Erp.Platform.Entities;
|
||||
|
||||
public class MaintenanceWorkorder : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public string WorkorderNumber { get; set; }
|
||||
public Guid WorkcenterId { get; set; }
|
||||
public Workcenter Workcenter { get; set; }
|
||||
|
||||
public Guid? PlanId { get; set; }
|
||||
public MaintenancePlan Plan { get; set; }
|
||||
|
||||
public Guid OrderTypeId { get; set; } //Preventive, Corrective, Emergency, Inspection, Calibration
|
||||
public MaintenanceWorkorderType OrderType { get; set; }
|
||||
|
||||
public string Priority { get; set; } //Low, Medium, High, Urgent
|
||||
public string Status { get; set; } //Created, Planned, Released, InProgress, OnHold, Completed, Cancelled
|
||||
|
||||
public string Description { get; set; }
|
||||
public string AssignedTo { get; set; }
|
||||
public string MaintenanceTeamId { get; set; }
|
||||
|
||||
public DateTime? ScheduledStart { get; set; }
|
||||
public DateTime? ScheduledEnd { get; set; }
|
||||
public DateTime? ActualStart { get; set; }
|
||||
public DateTime? ActualEnd { get; set; }
|
||||
|
||||
public int EstimatedCost { get; set; }
|
||||
public int ActualCost { get; set; }
|
||||
|
||||
public string Notes { get; set; }
|
||||
public string CompletionNotes { get; set; }
|
||||
|
||||
public ICollection<MaintenanceWorkorderMaterial> Materials { get; set; }
|
||||
public ICollection<MaintenanceWorkorderActivity> Activities { get; set; }
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
using System;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Erp.Platform.Entities;
|
||||
|
||||
public class MaintenanceWorkorderActivity : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public Guid WorkOrderId { get; set; }
|
||||
public MaintenanceWorkorder WorkOrder { get; set; }
|
||||
|
||||
public string ActivityDescription { get; set; }
|
||||
|
||||
public int PlannedDuration { get; set; }
|
||||
public int ActualDuration { get; set; }
|
||||
|
||||
public string PerformedBy { get; set; }
|
||||
public DateTime? CompletedAt { get; set; }
|
||||
public string Notes { get; set; }
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
using System;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Erp.Platform.Entities;
|
||||
|
||||
public class MaintenanceWorkorderMaterial : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public Guid WorkOrderId { get; set; }
|
||||
public MaintenanceWorkorder WorkOrder { get; set; }
|
||||
|
||||
public Guid MaterialId { get; set; }
|
||||
public Material Material { get; set; }
|
||||
|
||||
public int PlannedQuantity { get; set; }
|
||||
public int ActualQuantity { get; set; }
|
||||
|
||||
public int UnitCost { get; set; }
|
||||
public int TotalCost { 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 MaintenanceWorkorderStatus : 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<MaintenanceWorkorder> Workorders { get; set; }
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Erp.Platform.Entities;
|
||||
|
||||
public class MaintenanceWorkorderType : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public string Code { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
|
||||
public ICollection<MaintenanceWorkorder> Workorders { get; set; }
|
||||
}
|
||||
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
// Domain/Entities/PmWorkCenter.cs
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Erp.Platform.Entities;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ public class WorkcenterType : FullAuditedEntity<Guid>, IMultiTenant
|
|||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public string Code { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
|
|
|
|||
|
|
@ -239,6 +239,9 @@ public class PlatformDbContext :
|
|||
public DbSet<Fault> Faults { get; set; }
|
||||
public DbSet<FaultStatus> FaultStatuses { get; set; }
|
||||
public DbSet<FaultType> FaultTypes { get; set; }
|
||||
public DbSet<MaintenanceWorkorderType> WorkorderTypes { get; set; }
|
||||
public DbSet<MaintenanceWorkorderStatus> WorkorderStatuses { get; set; }
|
||||
public DbSet<MaintenanceWorkorder> Workorders { get; set; }
|
||||
#endregion
|
||||
|
||||
public PlatformDbContext(DbContextOptions<PlatformDbContext> options)
|
||||
|
|
@ -2835,5 +2838,25 @@ public class PlatformDbContext :
|
|||
b.Property(x => x.Description).HasMaxLength(500);
|
||||
b.Property(x => x.IsActive).HasDefaultValue(true);
|
||||
});
|
||||
|
||||
builder.Entity<MaintenanceWorkorderType>(b =>
|
||||
{
|
||||
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.WorkorderType)), 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<MaintenanceWorkorderStatus>(b =>
|
||||
{
|
||||
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.WorkorderStatus)), 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);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
|||
namespace Erp.Platform.Migrations
|
||||
{
|
||||
[DbContext(typeof(PlatformDbContext))]
|
||||
[Migration("20251121142619_Initial")]
|
||||
[Migration("20251123181533_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
/// <inheritdoc />
|
||||
|
|
@ -6372,6 +6372,364 @@ namespace Erp.Platform.Migrations
|
|||
b.ToTable("Mnt_T_PlanMaterial", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.MaintenanceWorkorder", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int>("ActualCost")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime?>("ActualEnd")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime?>("ActualStart")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("AssignedTo")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CompletionNotes")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
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")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("EstimatedCost")
|
||||
.HasColumnType("int");
|
||||
|
||||
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>("MaintenanceTeamId")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<Guid?>("MaintenanceWorkorderStatusId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Notes")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<Guid>("OrderTypeId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("PlanId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Priority")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime?>("ScheduledEnd")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime?>("ScheduledStart")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Status")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.Property<Guid>("WorkcenterId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("WorkorderNumber")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("MaintenanceWorkorderStatusId");
|
||||
|
||||
b.HasIndex("OrderTypeId");
|
||||
|
||||
b.HasIndex("PlanId");
|
||||
|
||||
b.HasIndex("WorkcenterId");
|
||||
|
||||
b.ToTable("Workorders");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.MaintenanceWorkorderActivity", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("ActivityDescription")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("ActualDuration")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime?>("CompletedAt")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
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<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")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("PerformedBy")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("PlannedDuration")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.Property<Guid>("WorkOrderId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("WorkOrderId");
|
||||
|
||||
b.ToTable("MaintenanceWorkorderActivity");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.MaintenanceWorkorderMaterial", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int>("ActualQuantity")
|
||||
.HasColumnType("int");
|
||||
|
||||
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<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<Guid>("MaterialId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int>("PlannedQuantity")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.Property<int>("TotalCost")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("UnitCost")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<Guid>("WorkOrderId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("MaterialId");
|
||||
|
||||
b.HasIndex("WorkOrderId");
|
||||
|
||||
b.ToTable("MaintenanceWorkorderMaterial");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.MaintenanceWorkorderStatus", 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("Mnt_T_WorkorderStatus", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.MaintenanceWorkorderType", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Code")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
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("Mnt_T_WorkorderType", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Material", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
@ -11834,9 +12192,6 @@ namespace Erp.Platform.Migrations
|
|||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Code")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
|
@ -14663,6 +15018,65 @@ namespace Erp.Platform.Migrations
|
|||
b.Navigation("MaintenancePlan");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.MaintenanceWorkorder", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.MaintenanceWorkorderStatus", null)
|
||||
.WithMany("Workorders")
|
||||
.HasForeignKey("MaintenanceWorkorderStatusId");
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.MaintenanceWorkorderType", "OrderType")
|
||||
.WithMany("Workorders")
|
||||
.HasForeignKey("OrderTypeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.MaintenancePlan", "Plan")
|
||||
.WithMany()
|
||||
.HasForeignKey("PlanId");
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.Workcenter", "Workcenter")
|
||||
.WithMany()
|
||||
.HasForeignKey("WorkcenterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("OrderType");
|
||||
|
||||
b.Navigation("Plan");
|
||||
|
||||
b.Navigation("Workcenter");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.MaintenanceWorkorderActivity", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.MaintenanceWorkorder", "WorkOrder")
|
||||
.WithMany("Activities")
|
||||
.HasForeignKey("WorkOrderId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("WorkOrder");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.MaintenanceWorkorderMaterial", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.Material", "Material")
|
||||
.WithMany()
|
||||
.HasForeignKey("MaterialId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.MaintenanceWorkorder", "WorkOrder")
|
||||
.WithMany("Materials")
|
||||
.HasForeignKey("WorkOrderId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Material");
|
||||
|
||||
b.Navigation("WorkOrder");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Material", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.Currency", "Currency")
|
||||
|
|
@ -15652,6 +16066,23 @@ namespace Erp.Platform.Migrations
|
|||
b.Navigation("Materials");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.MaintenanceWorkorder", b =>
|
||||
{
|
||||
b.Navigation("Activities");
|
||||
|
||||
b.Navigation("Materials");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.MaintenanceWorkorderStatus", b =>
|
||||
{
|
||||
b.Navigation("Workorders");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.MaintenanceWorkorderType", b =>
|
||||
{
|
||||
b.Navigation("Workorders");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Material", b =>
|
||||
{
|
||||
b.Navigation("AlternativeUoms");
|
||||
|
|
@ -1348,7 +1348,6 @@ namespace Erp.Platform.Migrations
|
|||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
Code = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Name = table.Column<string>(type: "nvarchar(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),
|
||||
|
|
@ -1365,6 +1364,51 @@ namespace Erp.Platform.Migrations
|
|||
table.PrimaryKey("PK_Mnt_T_WorkcenterType", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Mnt_T_WorkorderStatus",
|
||||
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_Mnt_T_WorkorderStatus", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Mnt_T_WorkorderType",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
Code = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Name = table.Column<string>(type: "nvarchar(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_Mnt_T_WorkorderType", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Net_T_EventCategory",
|
||||
columns: table => new
|
||||
|
|
@ -5616,6 +5660,65 @@ namespace Erp.Platform.Migrations
|
|||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Workorders",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
WorkorderNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WorkcenterId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
PlanId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
OrderTypeId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
Priority = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Status = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Description = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
AssignedTo = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
MaintenanceTeamId = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ScheduledStart = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
ScheduledEnd = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
ActualStart = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
ActualEnd = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
EstimatedCost = table.Column<int>(type: "int", nullable: false),
|
||||
ActualCost = table.Column<int>(type: "int", nullable: false),
|
||||
Notes = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
CompletionNotes = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
MaintenanceWorkorderStatusId = 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_Workorders", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Workorders_Mnt_T_Plan_PlanId",
|
||||
column: x => x.PlanId,
|
||||
principalTable: "Mnt_T_Plan",
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_Workorders_Mnt_T_Workcenter_WorkcenterId",
|
||||
column: x => x.WorkcenterId,
|
||||
principalTable: "Mnt_T_Workcenter",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_Workorders_Mnt_T_WorkorderStatus_MaintenanceWorkorderStatusId",
|
||||
column: x => x.MaintenanceWorkorderStatusId,
|
||||
principalTable: "Mnt_T_WorkorderStatus",
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_Workorders_Mnt_T_WorkorderType_OrderTypeId",
|
||||
column: x => x.OrderTypeId,
|
||||
principalTable: "Mnt_T_WorkorderType",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Hr_T_SurveyAnswer",
|
||||
columns: table => new
|
||||
|
|
@ -5880,6 +5983,75 @@ namespace Erp.Platform.Migrations
|
|||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "MaintenanceWorkorderActivity",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
WorkOrderId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
ActivityDescription = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
PlannedDuration = table.Column<int>(type: "int", nullable: false),
|
||||
ActualDuration = table.Column<int>(type: "int", nullable: false),
|
||||
PerformedBy = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
CompletedAt = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
Notes = table.Column<string>(type: "nvarchar(max)", 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_MaintenanceWorkorderActivity", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_MaintenanceWorkorderActivity_Workorders_WorkOrderId",
|
||||
column: x => x.WorkOrderId,
|
||||
principalTable: "Workorders",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "MaintenanceWorkorderMaterial",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
WorkOrderId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
MaterialId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
PlannedQuantity = table.Column<int>(type: "int", nullable: false),
|
||||
ActualQuantity = table.Column<int>(type: "int", nullable: false),
|
||||
UnitCost = table.Column<int>(type: "int", nullable: false),
|
||||
TotalCost = table.Column<int>(type: "int", nullable: false),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_MaintenanceWorkorderMaterial", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_MaintenanceWorkorderMaterial_Scp_T_Material_MaterialId",
|
||||
column: x => x.MaterialId,
|
||||
principalTable: "Scp_T_Material",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_MaintenanceWorkorderMaterial_Workorders_WorkOrderId",
|
||||
column: x => x.WorkOrderId,
|
||||
principalTable: "Workorders",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Net_T_SocialPollOption",
|
||||
columns: table => new
|
||||
|
|
@ -6538,6 +6710,21 @@ namespace Erp.Platform.Migrations
|
|||
table: "Hr_T_SurveyResponse",
|
||||
column: "SurveyId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_MaintenanceWorkorderActivity_WorkOrderId",
|
||||
table: "MaintenanceWorkorderActivity",
|
||||
column: "WorkOrderId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_MaintenanceWorkorderMaterial_MaterialId",
|
||||
table: "MaintenanceWorkorderMaterial",
|
||||
column: "MaterialId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_MaintenanceWorkorderMaterial_WorkOrderId",
|
||||
table: "MaintenanceWorkorderMaterial",
|
||||
column: "WorkOrderId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Mnt_T_Fault_FaultStatusId",
|
||||
table: "Mnt_T_Fault",
|
||||
|
|
@ -6969,6 +7156,26 @@ namespace Erp.Platform.Migrations
|
|||
table: "Scp_T_RequestItem",
|
||||
column: "UomId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Workorders_MaintenanceWorkorderStatusId",
|
||||
table: "Workorders",
|
||||
column: "MaintenanceWorkorderStatusId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Workorders_OrderTypeId",
|
||||
table: "Workorders",
|
||||
column: "OrderTypeId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Workorders_PlanId",
|
||||
table: "Workorders",
|
||||
column: "PlanId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Workorders_WorkcenterId",
|
||||
table: "Workorders",
|
||||
column: "WorkcenterId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Adm_T_BlogPost_Hr_T_Employee_EmployeeId",
|
||||
table: "Adm_T_BlogPost",
|
||||
|
|
@ -7276,6 +7483,12 @@ namespace Erp.Platform.Migrations
|
|||
migrationBuilder.DropTable(
|
||||
name: "Hr_T_SurveyQuestionOption");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "MaintenanceWorkorderActivity");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "MaintenanceWorkorderMaterial");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Mnt_T_Fault");
|
||||
|
||||
|
|
@ -7495,15 +7708,15 @@ namespace Erp.Platform.Migrations
|
|||
migrationBuilder.DropTable(
|
||||
name: "Hr_T_SurveyQuestion");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Workorders");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Mnt_T_FaultStatus");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Mnt_T_FaultType");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Mnt_T_Plan");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Net_T_Training");
|
||||
|
||||
|
|
@ -7586,7 +7799,13 @@ namespace Erp.Platform.Migrations
|
|||
name: "Hr_T_Survey");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Mnt_T_Workcenter");
|
||||
name: "Mnt_T_Plan");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Mnt_T_WorkorderStatus");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Mnt_T_WorkorderType");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Net_T_EventCategory");
|
||||
|
|
@ -7621,15 +7840,18 @@ namespace Erp.Platform.Migrations
|
|||
migrationBuilder.DropTable(
|
||||
name: "Sas_T_Branch");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Mnt_T_Workcenter");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Sas_H_CountryGroup");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Mnt_T_WorkcenterStatus");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Mnt_T_WorkcenterType");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Sas_H_CountryGroup");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Acc_T_Bank");
|
||||
|
||||
|
|
@ -6369,6 +6369,364 @@ namespace Erp.Platform.Migrations
|
|||
b.ToTable("Mnt_T_PlanMaterial", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.MaintenanceWorkorder", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int>("ActualCost")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime?>("ActualEnd")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime?>("ActualStart")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("AssignedTo")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CompletionNotes")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
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")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("EstimatedCost")
|
||||
.HasColumnType("int");
|
||||
|
||||
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>("MaintenanceTeamId")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<Guid?>("MaintenanceWorkorderStatusId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Notes")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<Guid>("OrderTypeId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("PlanId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Priority")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime?>("ScheduledEnd")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime?>("ScheduledStart")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Status")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.Property<Guid>("WorkcenterId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("WorkorderNumber")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("MaintenanceWorkorderStatusId");
|
||||
|
||||
b.HasIndex("OrderTypeId");
|
||||
|
||||
b.HasIndex("PlanId");
|
||||
|
||||
b.HasIndex("WorkcenterId");
|
||||
|
||||
b.ToTable("Workorders");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.MaintenanceWorkorderActivity", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("ActivityDescription")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("ActualDuration")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime?>("CompletedAt")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
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<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")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("PerformedBy")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("PlannedDuration")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.Property<Guid>("WorkOrderId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("WorkOrderId");
|
||||
|
||||
b.ToTable("MaintenanceWorkorderActivity");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.MaintenanceWorkorderMaterial", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int>("ActualQuantity")
|
||||
.HasColumnType("int");
|
||||
|
||||
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<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<Guid>("MaterialId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int>("PlannedQuantity")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.Property<int>("TotalCost")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("UnitCost")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<Guid>("WorkOrderId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("MaterialId");
|
||||
|
||||
b.HasIndex("WorkOrderId");
|
||||
|
||||
b.ToTable("MaintenanceWorkorderMaterial");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.MaintenanceWorkorderStatus", 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("Mnt_T_WorkorderStatus", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.MaintenanceWorkorderType", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Code")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
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("Mnt_T_WorkorderType", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Material", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
@ -11831,9 +12189,6 @@ namespace Erp.Platform.Migrations
|
|||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Code")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
|
@ -14660,6 +15015,65 @@ namespace Erp.Platform.Migrations
|
|||
b.Navigation("MaintenancePlan");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.MaintenanceWorkorder", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.MaintenanceWorkorderStatus", null)
|
||||
.WithMany("Workorders")
|
||||
.HasForeignKey("MaintenanceWorkorderStatusId");
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.MaintenanceWorkorderType", "OrderType")
|
||||
.WithMany("Workorders")
|
||||
.HasForeignKey("OrderTypeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.MaintenancePlan", "Plan")
|
||||
.WithMany()
|
||||
.HasForeignKey("PlanId");
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.Workcenter", "Workcenter")
|
||||
.WithMany()
|
||||
.HasForeignKey("WorkcenterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("OrderType");
|
||||
|
||||
b.Navigation("Plan");
|
||||
|
||||
b.Navigation("Workcenter");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.MaintenanceWorkorderActivity", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.MaintenanceWorkorder", "WorkOrder")
|
||||
.WithMany("Activities")
|
||||
.HasForeignKey("WorkOrderId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("WorkOrder");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.MaintenanceWorkorderMaterial", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.Material", "Material")
|
||||
.WithMany()
|
||||
.HasForeignKey("MaterialId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.MaintenanceWorkorder", "WorkOrder")
|
||||
.WithMany("Materials")
|
||||
.HasForeignKey("WorkOrderId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Material");
|
||||
|
||||
b.Navigation("WorkOrder");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Material", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.Currency", "Currency")
|
||||
|
|
@ -15649,6 +16063,23 @@ namespace Erp.Platform.Migrations
|
|||
b.Navigation("Materials");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.MaintenanceWorkorder", b =>
|
||||
{
|
||||
b.Navigation("Activities");
|
||||
|
||||
b.Navigation("Materials");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.MaintenanceWorkorderStatus", b =>
|
||||
{
|
||||
b.Navigation("Workorders");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.MaintenanceWorkorderType", b =>
|
||||
{
|
||||
b.Navigation("Workorders");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Material", b =>
|
||||
{
|
||||
b.Navigation("AlternativeUoms");
|
||||
|
|
|
|||
|
|
@ -100,7 +100,9 @@
|
|||
"props": null,
|
||||
"description": null,
|
||||
"isActive": true,
|
||||
"dependencies": ["DynamicEntityComponent"]
|
||||
"dependencies": [
|
||||
"DynamicEntityComponent"
|
||||
]
|
||||
}
|
||||
],
|
||||
"ReportCategories": [
|
||||
|
|
@ -2429,7 +2431,12 @@
|
|||
"minSalary": 80000,
|
||||
"maxSalary": 120000,
|
||||
"currencyCode": "USD",
|
||||
"requiredSkills": ["JavaScript", "TypeScript", "React", "Node.js"],
|
||||
"requiredSkills": [
|
||||
"JavaScript",
|
||||
"TypeScript",
|
||||
"React",
|
||||
"Node.js"
|
||||
],
|
||||
"responsibilities": [
|
||||
"Develop frontend and backend applications",
|
||||
"Write clean and maintainable code",
|
||||
|
|
@ -4124,7 +4131,9 @@
|
|||
{
|
||||
"postContent": "CI/CD pipeline güncellememiz tamamlandı! Deployment süremiz %40 azaldı. Otomasyonun gücü 💪",
|
||||
"type": "video",
|
||||
"urls": ["https://www.w3schools.com/html/mov_bbb.mp4"]
|
||||
"urls": [
|
||||
"https://www.w3schools.com/html/mov_bbb.mp4"
|
||||
]
|
||||
}
|
||||
],
|
||||
"SocialPollOptions": [
|
||||
|
|
@ -4831,25 +4840,21 @@
|
|||
],
|
||||
"WorkcenterTypes": [
|
||||
{
|
||||
"code": "CNC",
|
||||
"name": "CNC Makineleri",
|
||||
"description": "Bilgisayar kontrollü kesim ve şekillendirme makineleri",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"code": "COMP",
|
||||
"name": "Kompresörler",
|
||||
"description": "Hava ve gaz sıkıştırma makineleri",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"code": "CONV",
|
||||
"name": "Konveyörler",
|
||||
"description": "Malzeme taşıma sistemleri",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"code": "WELD",
|
||||
"name": "Kaynak Makineleri",
|
||||
"description": "Metal parçaların birleştirilmesi için kullanılan makineler",
|
||||
"isActive": true
|
||||
|
|
@ -4882,7 +4887,7 @@
|
|||
"code": "CNC-001",
|
||||
"name": "CNC Torna Tezgahı",
|
||||
"description": "Yüksek hassasiyetli CNC torna tezgahı",
|
||||
"workcenterTypeCode": "CNC",
|
||||
"workcenterTypeName": "CNC Makineleri",
|
||||
"manufacturer": "HAAS Automation",
|
||||
"model": "ST-30",
|
||||
"serialNumber": "SN123456789",
|
||||
|
|
@ -4901,7 +4906,7 @@
|
|||
"code": "COMP-001",
|
||||
"name": "Hava Kompresörü",
|
||||
"description": "Endüstriyel hava kompresörü sistemi",
|
||||
"workcenterTypeCode": "COMP",
|
||||
"workcenterTypeName": "Kompresörler",
|
||||
"manufacturer": "Atlas Copco",
|
||||
"model": "GA55VSD+",
|
||||
"serialNumber": "AC987654321",
|
||||
|
|
@ -4920,7 +4925,7 @@
|
|||
"code": "CONV-001",
|
||||
"name": "Konveyör Sistemi",
|
||||
"description": "Ana hat konveyör sistemi",
|
||||
"workcenterTypeCode": "CONV",
|
||||
"workcenterTypeName": "Konveyörler",
|
||||
"manufacturer": "Siemens",
|
||||
"model": "SIMATIC S7-1500",
|
||||
"serialNumber": "SM112233445",
|
||||
|
|
@ -5139,5 +5144,69 @@
|
|||
"description": "Arıza giderildi ve kayıt kapatıldı",
|
||||
"isActive": true
|
||||
}
|
||||
],
|
||||
"WorkorderTypes": [
|
||||
{
|
||||
"name": "Önleyici",
|
||||
"description": "Planlı bakım ve kontroller için yapılan iş emri türü",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"name": "Düzeltici",
|
||||
"description": "Arızaların önlenmesi için yapılan rutin bakım türü",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"name": "Acil",
|
||||
"description": "Acil durumlarda hızlı müdahale gerektiren bakım türü",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"name": "Denetim",
|
||||
"description": "Periyodik denetim ve kontrol işlemleri için yapılan iş emri türü",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"name": "Kalibrasyon",
|
||||
"description": "Ekipman kalibrasyonu ve ayarları için yapılan iş emri türü",
|
||||
"isActive": true
|
||||
}
|
||||
],
|
||||
"WorkorderStatuses": [
|
||||
{
|
||||
"name": "Oluşturuldu",
|
||||
"description": "İş emri oluşturuldu ancak henüz başlatılmadı",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"name": "Planlandı",
|
||||
"description": "İş emri planlandı ve atama bekliyor",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"name": "Serbest Bırakıldı",
|
||||
"description": "İş emri serbest bırakıldı ve çalışmaya hazır",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"name": "Devam Ediyor",
|
||||
"description": "İş emri devam ediyor ve çalışmalar sürüyor",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"name": "Beklemede",
|
||||
"description": "İş emri beklemede ve işlem yapılmayı bekliyor",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"name": "Tamamlandı",
|
||||
"description": "İş emri tamamlandı ve işlem sona erdi",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"name": "İptal Edildi",
|
||||
"description": "İş emri iptal edildi ve işlem sona erdi",
|
||||
"isActive": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -113,6 +113,8 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
private readonly IRepository<Fault, Guid> _faultRepository;
|
||||
private readonly IRepository<FaultStatus, Guid> _faultStatusRepository;
|
||||
private readonly IRepository<FaultType, Guid> _faultTypeRepository;
|
||||
private readonly IRepository<MaintenanceWorkorderType, Guid> _workorderTypeRepository;
|
||||
private readonly IRepository<MaintenanceWorkorderStatus, Guid> _workorderStatusRepository;
|
||||
|
||||
public TenantDataSeeder(
|
||||
IClock clock,
|
||||
|
|
@ -208,7 +210,9 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
IRepository<MaintenancePlan, Guid> maintenancePlanRepository,
|
||||
IRepository<Fault, Guid> faultRepository,
|
||||
IRepository<FaultStatus, Guid> faultStatusRepository,
|
||||
IRepository<FaultType, Guid> faultTypeRepository
|
||||
IRepository<FaultType, Guid> faultTypeRepository,
|
||||
IRepository<MaintenanceWorkorderType, Guid> workorderTypeRepository,
|
||||
IRepository<MaintenanceWorkorderStatus, Guid> workorderStatusRepository
|
||||
)
|
||||
{
|
||||
_clock = clock;
|
||||
|
|
@ -306,6 +310,8 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
_faultRepository = faultRepository;
|
||||
_faultStatusRepository = faultStatusRepository;
|
||||
_faultTypeRepository = faultTypeRepository;
|
||||
_workorderTypeRepository = workorderTypeRepository;
|
||||
_workorderStatusRepository = workorderStatusRepository;
|
||||
}
|
||||
|
||||
private static IConfigurationRoot BuildConfiguration()
|
||||
|
|
@ -1935,13 +1941,12 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
|
||||
foreach (var item in items.WorkcenterTypes)
|
||||
{
|
||||
var exists = await _workcenterTypeRepository.AnyAsync(x => x.Code == item.Code);
|
||||
var exists = await _workcenterTypeRepository.AnyAsync(x => x.Name == item.Name);
|
||||
if (exists)
|
||||
continue;
|
||||
|
||||
await _workcenterTypeRepository.InsertAsync(new WorkcenterType
|
||||
{
|
||||
Code = item.Code,
|
||||
Name = item.Name,
|
||||
Description = item.Description,
|
||||
IsActive = item.IsActive
|
||||
|
|
@ -1969,7 +1974,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
continue;
|
||||
|
||||
var department = await _departmentRepository.FirstOrDefaultAsync(x => x.Code == item.DepartmentCode);
|
||||
var workcenterType = await _workcenterTypeRepository.FirstOrDefaultAsync(x => x.Code == item.WorkcenterTypeCode);
|
||||
var workcenterType = await _workcenterTypeRepository.FirstOrDefaultAsync(x => x.Name == item.WorkcenterTypeName);
|
||||
|
||||
await _workcenterRepository.InsertAsync(new Workcenter
|
||||
{
|
||||
|
|
@ -2075,6 +2080,34 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
IsActive = item.IsActive,
|
||||
}, autoSave: true);
|
||||
}
|
||||
|
||||
foreach (var item in items.WorkorderTypes)
|
||||
{
|
||||
var exists = await _workorderTypeRepository.AnyAsync(x => x.Name == item.Name);
|
||||
if (exists)
|
||||
continue;
|
||||
|
||||
await _workorderTypeRepository.InsertAsync(new MaintenanceWorkorderType
|
||||
{
|
||||
Name = item.Name,
|
||||
Description = item.Description,
|
||||
IsActive = item.IsActive
|
||||
}, autoSave: true);
|
||||
}
|
||||
|
||||
foreach (var item in items.WorkorderStatuses)
|
||||
{
|
||||
var exists = await _workorderStatusRepository.AnyAsync(x => x.Name == item.Name);
|
||||
if (exists)
|
||||
continue;
|
||||
|
||||
await _workorderStatusRepository.InsertAsync(new MaintenanceWorkorderStatus
|
||||
{
|
||||
Name = item.Name,
|
||||
Description = item.Description,
|
||||
IsActive = item.IsActive
|
||||
}, autoSave: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -105,6 +105,22 @@ public class TenantSeederDto
|
|||
public List<FaultSeedDto> Faults { get; set; }
|
||||
public List<FaultStatusSeedDto> FaultStatuses { get; set; }
|
||||
public List<FaultTypeSeedDto> FaultTypes { get; set; }
|
||||
public List<WorkorderTypeSeedDto> WorkorderTypes { get; set; }
|
||||
public List<WorkorderStatusSeedDto> WorkorderStatuses { get; set; }
|
||||
}
|
||||
|
||||
public class WorkorderTypeSeedDto
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
}
|
||||
|
||||
public class WorkorderStatusSeedDto
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
}
|
||||
|
||||
public class FaultSeedDto
|
||||
|
|
@ -161,7 +177,7 @@ public class WorkcenterSeedDto
|
|||
public string Code { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string WorkcenterTypeCode { get; set; }
|
||||
public string WorkcenterTypeName { get; set; }
|
||||
public string Manufacturer { get; set; }
|
||||
public string Model { get; set; }
|
||||
public string SerialNumber { get; set; }
|
||||
|
|
|
|||
|
|
@ -30,24 +30,27 @@ export default defineConfig(async ({ mode }) => {
|
|||
type: 'module', // Modern module worker kullan
|
||||
},
|
||||
|
||||
workbox: {
|
||||
// Büyük asset'leri de cache'leyebil
|
||||
maximumFileSizeToCacheInBytes: 10 * 1024 * 1024,
|
||||
workbox:
|
||||
mode === 'production'
|
||||
? {
|
||||
globDirectory: 'dist',
|
||||
globPatterns: ['**/*.{js,css,html,wasm}'],
|
||||
|
||||
// EN KRİTİK: yeni SW beklemeden kontrolü alsın
|
||||
clientsClaim: true,
|
||||
skipWaiting: true,
|
||||
// Büyük asset'leri de cache'leyebil
|
||||
maximumFileSizeToCacheInBytes: 10 * 1024 * 1024,
|
||||
|
||||
// Eski workbox cache'lerini temizle
|
||||
cleanupOutdatedCaches: true,
|
||||
// EN KRİTİK: yeni SW beklemeden kontrolü alsın
|
||||
clientsClaim: true,
|
||||
skipWaiting: true,
|
||||
|
||||
// SPA fallback'i API çağrılarına uygulama
|
||||
navigateFallbackDenylist: [/^\/api\//],
|
||||
// Eski workbox cache'lerini temizle
|
||||
cleanupOutdatedCaches: true,
|
||||
|
||||
// ⭐⭐ BU KISMI EKLEYİN: Cache sorununu çözecek runtime caching
|
||||
runtimeCaching:
|
||||
mode === 'production'
|
||||
? [
|
||||
// SPA fallback'i API çağrılarına uygulama
|
||||
navigateFallbackDenylist: [/^\/api\//],
|
||||
|
||||
// ⭐⭐ BU KISMI EKLEYİN: Cache sorununu çözecek runtime caching
|
||||
runtimeCaching: [
|
||||
{
|
||||
urlPattern: /\.(?:js|css|json)$/,
|
||||
handler: 'NetworkFirst',
|
||||
|
|
@ -74,13 +77,13 @@ export default defineConfig(async ({ mode }) => {
|
|||
},
|
||||
},
|
||||
},
|
||||
]
|
||||
: [],
|
||||
],
|
||||
|
||||
// ⭐ YENİ EKLENEN: Additional navigation route for SPA
|
||||
navigateFallback: '/index.html',
|
||||
navigateFallbackAllowlist: [/^(?!\/__).*/],
|
||||
},
|
||||
// ⭐ YENİ EKLENEN: Additional navigation route for SPA
|
||||
navigateFallback: '/index.html',
|
||||
navigateFallbackAllowlist: [/^(?!\/__).*/],
|
||||
}
|
||||
: undefined,
|
||||
|
||||
manifest: {
|
||||
name: 'Erp Platform',
|
||||
|
|
|
|||
Loading…
Reference in a new issue