Опции: woIdItemUsage, itemId, itemNumber, itemThirdNumber, itemDescription, amountMeasure, branchId, branchDescription, locationId, дозовое количество, measureMeasureUnit, itemAction, itemPlague, itemJustilListListListList.Live.U.
@Entity(
primaryKeys = ["itemId", "branchId", "woIdItemUsage"],
foreignKeys = [
ForeignKey(entity = WorkOrder::class,
parentColumns = ["woId"],
childColumns = ["woIdItemUsage"],
onUpdate = ForeignKey.CASCADE,
onDelete = ForeignKey.CASCADE)],
indices = [Index("woIdItemUsage", "itemId", "branchId", name = "woItemUsagePk", unique = true)]
@Entity(
primaryKeys = ["woIdItemUsageLot", "itemId", "branchId", "lotId"],
foreignKeys = [
ForeignKey(entity = WorkOrderItemUsage::class,
parentColumns = ["woIdItemUsage", "itemId", "branchId"],
childColumns = ["woIdItemUsageLot", "itemId", "branchId"],
onUpdate = ForeignKey.CASCADE,
onDelete = ForeignKey.CASCADE)],
indices = [Index("woIdItemUsageLot", "itemId", "branchId", name = "woItemUsageLotPk", unique = true)])
class WorkOrderItemUsageWithLots(@Embedded var itemUsage: WorkOrderItemUsage) {
@Relation(parentColumn = "woItemUsagePk", entityColumn= "woItemUsageLotPk")
var lotList: List<WorkOrderItemUsageLot> = emptyList()}