WIP start&stop edit magazine
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using static CMS_CORE_Library.DataStructures;
|
||||
|
||||
namespace Step.Model.DatabaseModels
|
||||
{
|
||||
[Table("magazine_position")]
|
||||
public class NcMagazinePositionModel
|
||||
public class DbNcMagazinePositionModel
|
||||
{
|
||||
[Key, Column("magazine_id", Order = 0)]
|
||||
public byte MagazineId { get; set; }
|
||||
@@ -17,5 +18,16 @@ namespace Step.Model.DatabaseModels
|
||||
|
||||
[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
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user