Work in Progress
parent
0d860d7f37
commit
fad15a12f9
|
@ -1,12 +1,18 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using mapper.attributes;
|
||||
|
||||
namespace sharpwawi.models
|
||||
{
|
||||
[MappingConstraintAttribute(FieldMappingConstraint = MappingConstraints.DONTMAP,PropertyMappingConstraint = MappingConstraints.ANNOTATEDONLY)]
|
||||
public class Assembly
|
||||
{
|
||||
[Mapped]
|
||||
[PrimaryKey]
|
||||
public Part Part { get; private set; }
|
||||
[Mapped]
|
||||
[PrimaryKey]
|
||||
public int Revision { get; private set; }
|
||||
|
||||
IList<AssemblyComponent> components = new List<AssemblyComponent>();
|
||||
|
|
|
@ -1,9 +1,16 @@
|
|||
namespace sharpwawi.models
|
||||
using mapper.attributes;
|
||||
using System;
|
||||
namespace sharpwawi.models
|
||||
{
|
||||
[MappingConstraint(FieldMappingConstraint = MappingConstraints.ANNOTATEDONLY,PropertyMappingConstraint = MappingConstraints.ALL)]
|
||||
public class AssemblyComponent
|
||||
{
|
||||
[PrimaryKey]
|
||||
public Assembly Assembly { get; private set; }
|
||||
[PrimaryKey]
|
||||
public Part Component { get; private set; }
|
||||
|
||||
public int Position { get; set; }
|
||||
public double Quantity { get; set; }
|
||||
|
||||
public AssemblyComponent()
|
||||
|
@ -15,6 +22,7 @@
|
|||
this.Assembly = assembly;
|
||||
this.Component = component;
|
||||
this.Quantity = quantity;
|
||||
this.Position = 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using mapper.attributes;
|
||||
namespace sharpwawi.models
|
||||
{
|
||||
[MappingConstraint(FieldMappingConstraint = MappingConstraints.ANNOTATEDONLY,PropertyMappingConstraint = MappingConstraints.ALL)]
|
||||
public class Entity
|
||||
{
|
||||
[PrimaryKey]
|
||||
public String Key { get; set; }
|
||||
public String Name { get; set; }
|
||||
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using mapper.attributes;
|
||||
namespace sharpwawi.models
|
||||
{
|
||||
[MappingConstraint(FieldMappingConstraint = MappingConstraints.ANNOTATEDONLY,PropertyMappingConstraint = MappingConstraints.ANNOTATEDONLY)]
|
||||
public class Part : Entity
|
||||
{
|
||||
public ISet<Assembly> Assemblies { get; private set; } = new HashSet<Assembly>();
|
||||
|
|
Loading…
Reference in New Issue