Merge branch 'feature/Osai_ToolTable' into develop
# Conflicts: # Libs/CMS_CORE_Library.dll # Step.Core/ThreadsFunctions.cs # Step.Core/ThreadsHandler.cs # Step.Database/DatabaseContext.cs # Step.Database/Migrations/201806220920193_InitMigration.Designer.cs # Step.Database/Migrations/201806220920193_InitMigration.cs # Step.Database/Migrations/201807120908403_InitMigration.Designer.cs # Step.Database/Migrations/201807120908403_InitMigration.cs # Step.Database/Migrations/201807120908403_InitMigration.resx # Step.Database/Migrations/201807251330036_InitMigration.Designer.cs # Step.Database/Migrations/201807251330036_InitMigration.cs # Step.Database/Step.Database.csproj # Step.Model/Constants.cs # Step.NC/NcHandler.cs # Step/Listeners/ListenersHandler.cs # Step/Step.csproj
This commit is contained in:
@@ -0,0 +1,95 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using static CMS_CORE_Library.DataStructures;
|
||||
|
||||
namespace Step.Model.DatabaseModels
|
||||
{
|
||||
[Table("family")]
|
||||
public class DbNcFamilyModel
|
||||
{
|
||||
[Key]
|
||||
[Column("id")]
|
||||
public int FamilyId { get; set; }
|
||||
|
||||
[Column("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Column("type")]
|
||||
public byte Type { get; set; }
|
||||
|
||||
[Column("right_size")]
|
||||
public byte RightSize { get; set; }
|
||||
|
||||
[Column("left_size")]
|
||||
public byte LeftSize { get; set; }
|
||||
|
||||
[Column("tcp_table")]
|
||||
public byte TcpTable { get; set; }
|
||||
|
||||
[Column("gamma")]
|
||||
public byte Gamma { get; set; }
|
||||
|
||||
[Column("rotation_type")]
|
||||
public byte RotationType { get; set; }
|
||||
|
||||
[Column("cooling_byte")]
|
||||
public byte CoolingByte { get; set; }
|
||||
|
||||
[Column("max_speed")]
|
||||
public int MaxSpeed { get; set; }
|
||||
|
||||
[Column("max_load")]
|
||||
public byte MaxLoad { get; set; }
|
||||
|
||||
[Column("min_load_pct_autoload")]
|
||||
public byte MinLoadPctAutoload { get; set; }
|
||||
|
||||
[Column("max_load_pct_autoload")]
|
||||
public byte MaxLoadPctAutoload { get; set; }
|
||||
|
||||
[Column("dynamic_compensation")]
|
||||
public byte DynamicCompensation { get; set; }
|
||||
|
||||
[Column("min_load_dynamic_comp")]
|
||||
public byte MinLoadDynamicCompensation { get; set; }
|
||||
|
||||
[Column("max_load_dynamic_comp")]
|
||||
public byte MaxLoadDynamicCompensation { get; set; }
|
||||
|
||||
[Column("life_type")]
|
||||
public byte LifeType { get; set; }
|
||||
|
||||
[Column("nominal_life")]
|
||||
public int NominalLife { get; set; }
|
||||
|
||||
[Column("revive_delta")]
|
||||
public int ReviveDelta { get; set; }
|
||||
|
||||
public List<DbNcToolModel> Tools { get; set; }
|
||||
|
||||
public static explicit operator NcFamilyModel(DbNcFamilyModel obj)
|
||||
{
|
||||
return new NcFamilyModel()
|
||||
{
|
||||
Id = (ushort)obj.FamilyId,
|
||||
Type = obj.Type,
|
||||
RightSize = obj.RightSize,
|
||||
LeftSize = obj.LeftSize,
|
||||
TcpTable = obj.TcpTable,
|
||||
Gamma = obj.Gamma,
|
||||
CoolingByte = obj.CoolingByte,
|
||||
RotationType = obj.RotationType,
|
||||
MaxLoad = obj.MaxLoad,
|
||||
MaxSpeed = (ushort)obj.MaxSpeed,
|
||||
MinLoadPctAutoload = obj.MinLoadPctAutoload,
|
||||
MaxLoadPctAutoload = obj.MaxLoadDynamicCompensation,
|
||||
MinLoadDynamicCompensation = obj.MinLoadDynamicCompensation,
|
||||
MaxLoadDynamicCompensation = obj.MaxLoadDynamicCompensation,
|
||||
LifeType = obj.LifeType,
|
||||
NominalLife = (uint)obj.NominalLife,
|
||||
ReviveDelta = (ushort)obj.ReviveDelta
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using static CMS_CORE_Library.DataStructures;
|
||||
|
||||
namespace Step.Model.DatabaseModels
|
||||
{
|
||||
[Table("magazine_position")]
|
||||
public class DbNcMagazinePositionModel
|
||||
{
|
||||
[Key, Column("magazine_id", Order = 0)]
|
||||
public byte MagazineId { get; set; }
|
||||
|
||||
[Key, Column("position_id", Order = 1)]
|
||||
public byte PositionId { get; set; }
|
||||
|
||||
[Column("type")]
|
||||
public byte Type { get; set; }
|
||||
|
||||
[Column("disabled")]
|
||||
public bool Disabled { get; set; }
|
||||
|
||||
public static explicit operator NcMagazinePositionModel(DbNcMagazinePositionModel obj)
|
||||
{
|
||||
return new NcMagazinePositionModel()
|
||||
{
|
||||
MagazineId = obj.MagazineId,
|
||||
PositionId = obj.PositionId,
|
||||
Disabled = obj.Disabled ? (byte)1 : (byte)0,
|
||||
Type = obj.Type
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Step.Model.DatabaseModels
|
||||
{
|
||||
[Table("offset")]
|
||||
public class NcOffsetModel
|
||||
{
|
||||
[Key]
|
||||
[Column("id")]
|
||||
public int OffsetId { get; set; }
|
||||
|
||||
[Column("nc_offset_id")]
|
||||
public int NcOffsetId { get; set; }
|
||||
|
||||
[Column("lenght")]
|
||||
public double Lenght { get; set; }
|
||||
|
||||
[Column("radius")]
|
||||
public double Radius { get; set; }
|
||||
|
||||
[Column("wear_length")]
|
||||
public double WearLength { get; set; }
|
||||
|
||||
[Column("wear_radius")]
|
||||
public double WearRadius { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using static CMS_CORE_Library.DataStructures;
|
||||
|
||||
namespace Step.Model.DatabaseModels
|
||||
{
|
||||
[Table("shank")]
|
||||
public class DbNcShankModel
|
||||
{
|
||||
[Key]
|
||||
[Column("id")]
|
||||
public int ShankId { get; set; }
|
||||
|
||||
[Column("balluf")]
|
||||
public int? Balluf { get; set; }
|
||||
|
||||
[Column("magazine_position_type")]
|
||||
public byte MagazinePositionType { get; set; }
|
||||
|
||||
[ForeignKey("MagazinePosition"), Column("magazine_id", Order = 0)]
|
||||
public byte? MagazineId { get; set; }
|
||||
|
||||
[ForeignKey("MagazinePosition"), Column("position_id", Order = 1)]
|
||||
public byte? PositionId { get; set; }
|
||||
|
||||
public DbNcMagazinePositionModel MagazinePosition { get; set; }
|
||||
|
||||
public List<DbNcToolModel> Tools { get; set; }
|
||||
|
||||
public static explicit operator NcShankModel(DbNcShankModel obj)
|
||||
{
|
||||
return new NcShankModel()
|
||||
{
|
||||
Id = obj.ShankId,
|
||||
Balluf = obj.Balluf == null ? (ushort)0 : (ushort)obj.Balluf.Value,
|
||||
MagazineId = obj.MagazineId == null ? (byte)0 : obj.MagazineId.Value,
|
||||
PositionId = obj.PositionId == null ? (byte)0 : obj.PositionId.Value,
|
||||
MagazinePositionType = obj.MagazinePositionType,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using static CMS_CORE_Library.DataStructures;
|
||||
|
||||
namespace Step.Model.DatabaseModels
|
||||
{
|
||||
[Table("tool")]
|
||||
public class DbNcToolModel
|
||||
{
|
||||
[Key]
|
||||
[Column("id")]
|
||||
public int ToolId { get; set; }
|
||||
|
||||
[Column("offset_length")]
|
||||
public int OffsetLength { get; set; }
|
||||
|
||||
[Column("residual_life")]
|
||||
public int ResidualLife { get; set; }
|
||||
|
||||
[Column("residual_revive")]
|
||||
public int ResidualRevive { get; set; }
|
||||
|
||||
[Column("status")]
|
||||
public byte Status { get; set; }
|
||||
|
||||
// Foreign keys
|
||||
[Column("family_id")]
|
||||
[ForeignKey("Family")]
|
||||
public int FamilyId { get; set; }
|
||||
|
||||
[Column("shank_id")]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||
|
||||
[ForeignKey("Shank")]
|
||||
public int? ShankId { get; set; }
|
||||
|
||||
[Column("offsetId1")]
|
||||
public int? OffsetId1 { get; set; }
|
||||
|
||||
[Column("offsetId2")]
|
||||
public int? OffsetId2 { get; set; }
|
||||
|
||||
[Column("offsetId3")]
|
||||
public int? OffsetId3 { get; set; }
|
||||
|
||||
public virtual DbNcFamilyModel Family { get; set; }
|
||||
public virtual DbNcShankModel Shank { get; set; }
|
||||
|
||||
public static explicit operator NcToolModel(DbNcToolModel obj)
|
||||
{
|
||||
return new NcToolModel()
|
||||
{
|
||||
Id = (ushort)obj.ToolId,
|
||||
FamilyId = obj.FamilyId,
|
||||
OffsetLength = (ushort)obj.OffsetLength,
|
||||
ResidualLife = (ushort)obj.ResidualLife,
|
||||
Status = obj.Status,
|
||||
ResidualRevive = (ushort)obj.ResidualRevive,
|
||||
ShankId = obj.ShankId == null ? 0 : obj.ShankId.Value,
|
||||
OffsetId1 = obj.OffsetId1 == null ? 0 : obj.OffsetId1.Value,
|
||||
OffsetId2 = obj.OffsetId2 == null ? 0 : obj.OffsetId2.Value,
|
||||
OffsetId3 = obj.OffsetId3 == null ? 0 : obj.OffsetId3.Value
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
declare module server {
|
||||
interface roleModel {
|
||||
roleId: number;
|
||||
name: string;
|
||||
level: number;
|
||||
}
|
||||
}
|
||||
-130
@@ -1,130 +0,0 @@
|
||||
declare module server {
|
||||
interface userModel {
|
||||
userId: number;
|
||||
username: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
password: string;
|
||||
securityStamp: string;
|
||||
_language: string;
|
||||
language: {
|
||||
parent: any;
|
||||
lCID: number;
|
||||
keyboardLayoutId: number;
|
||||
name: string;
|
||||
ietfLanguageTag: string;
|
||||
displayName: string;
|
||||
nativeName: string;
|
||||
englishName: string;
|
||||
twoLetterISOLanguageName: string;
|
||||
threeLetterISOLanguageName: string;
|
||||
threeLetterWindowsLanguageName: string;
|
||||
compareInfo: {
|
||||
name: string;
|
||||
lCID: number;
|
||||
version: {
|
||||
fullVersion: number;
|
||||
sortId: any;
|
||||
};
|
||||
};
|
||||
textInfo: {
|
||||
aNSICodePage: number;
|
||||
oEMCodePage: number;
|
||||
macCodePage: number;
|
||||
eBCDICCodePage: number;
|
||||
lCID: number;
|
||||
cultureName: string;
|
||||
isReadOnly: boolean;
|
||||
listSeparator: string;
|
||||
isRightToLeft: boolean;
|
||||
};
|
||||
isNeutralCulture: boolean;
|
||||
cultureTypes: any;
|
||||
numberFormat: {
|
||||
currencyDecimalDigits: number;
|
||||
currencyDecimalSeparator: string;
|
||||
isReadOnly: boolean;
|
||||
currencyGroupSizes: number[];
|
||||
numberGroupSizes: number[];
|
||||
percentGroupSizes: number[];
|
||||
currencyGroupSeparator: string;
|
||||
currencySymbol: string;
|
||||
naNSymbol: string;
|
||||
currencyNegativePattern: number;
|
||||
numberNegativePattern: number;
|
||||
percentPositivePattern: number;
|
||||
percentNegativePattern: number;
|
||||
negativeInfinitySymbol: string;
|
||||
negativeSign: string;
|
||||
numberDecimalDigits: number;
|
||||
numberDecimalSeparator: string;
|
||||
numberGroupSeparator: string;
|
||||
currencyPositivePattern: number;
|
||||
positiveInfinitySymbol: string;
|
||||
positiveSign: string;
|
||||
percentDecimalDigits: number;
|
||||
percentDecimalSeparator: string;
|
||||
percentGroupSeparator: string;
|
||||
percentSymbol: string;
|
||||
perMilleSymbol: string;
|
||||
nativeDigits: string[];
|
||||
digitSubstitution: any;
|
||||
};
|
||||
dateTimeFormat: {
|
||||
aMDesignator: string;
|
||||
calendar: {
|
||||
minSupportedDateTime: Date;
|
||||
maxSupportedDateTime: Date;
|
||||
algorithmType: any;
|
||||
isReadOnly: boolean;
|
||||
eras: number[];
|
||||
twoDigitYearMax: number;
|
||||
};
|
||||
dateSeparator: string;
|
||||
firstDayOfWeek: any;
|
||||
calendarWeekRule: any;
|
||||
fullDateTimePattern: string;
|
||||
longDatePattern: string;
|
||||
longTimePattern: string;
|
||||
monthDayPattern: string;
|
||||
pMDesignator: string;
|
||||
rFC1123Pattern: string;
|
||||
shortDatePattern: string;
|
||||
shortTimePattern: string;
|
||||
sortableDateTimePattern: string;
|
||||
timeSeparator: string;
|
||||
universalSortableDateTimePattern: string;
|
||||
yearMonthPattern: string;
|
||||
abbreviatedDayNames: string[];
|
||||
shortestDayNames: string[];
|
||||
dayNames: string[];
|
||||
abbreviatedMonthNames: string[];
|
||||
monthNames: string[];
|
||||
isReadOnly: boolean;
|
||||
nativeCalendarName: string;
|
||||
abbreviatedMonthGenitiveNames: string[];
|
||||
monthGenitiveNames: string[];
|
||||
};
|
||||
calendar: {
|
||||
minSupportedDateTime: Date;
|
||||
maxSupportedDateTime: Date;
|
||||
algorithmType: any;
|
||||
isReadOnly: boolean;
|
||||
eras: number[];
|
||||
twoDigitYearMax: number;
|
||||
};
|
||||
optionalCalendars: {
|
||||
minSupportedDateTime: Date;
|
||||
maxSupportedDateTime: Date;
|
||||
algorithmType: any;
|
||||
isReadOnly: boolean;
|
||||
eras: number[];
|
||||
twoDigitYearMax: number;
|
||||
}[];
|
||||
useUserOverride: boolean;
|
||||
isReadOnly: boolean;
|
||||
};
|
||||
roleId: number;
|
||||
role: server.RoleModel;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user