<commit_before>package org.marsik.elshelves.api.entities;

import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.fasterxml.jackson.annotation.JsonIdentityReference;
import com.fasterxml.jackson.annotation.JsonSetter;
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
import org.marsik.elshelves.api.ember.EmberModelName;
import org.marsik.elshelves.api.ember.Sideload;
import org.marsik.elshelves.api.entities.idresolvers.PurchaseIdResolver;

import java.util.Set;
import java.util.UUID;

/**
 * The initial lot created when parts are purchased
 */
@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "id", resolver = PurchaseIdResolver.class)
@EmberModelName("purchase")
public class PurchaseApiModel extends LotBaseApiModel {
	public PurchaseApiModel(UUID id) {
		super(id);
	}

	public PurchaseApiModel() {
	}

	Double singlePrice;
    Double totalPrice;
    Double vat;
    Boolean vatIncluded;

	@Sideload
	TransactionApiModel transaction;

	PartTypeApiModel type;

	Set<LotApiModel> lots;<commit_msg>Do not sideload Transaction to Purchases<commit_after>package org.marsik.elshelves.api.entities;

import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.fasterxml.jackson.annotation.JsonIdentityReference;
import com.fasterxml.jackson.annotation.JsonSetter;
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
import org.marsik.elshelves.api.ember.EmberModelName;
import org.marsik.elshelves.api.ember.Sideload;
import org.marsik.elshelves.api.entities.idresolvers.PurchaseIdResolver;

import java.util.Set;
import java.util.UUID;

/**
 * The initial lot created when parts are purchased
 */
@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "id", resolver = PurchaseIdResolver.class)
@EmberModelName("purchase")
public class PurchaseApiModel extends LotBaseApiModel {
	public PurchaseApiModel(UUID id) {
		super(id);
	}

	public PurchaseApiModel() {
	}

	Double singlePrice;
    Double totalPrice;
    Double vat;
    Boolean vatIncluded;

	TransactionApiModel transaction;

	PartTypeApiModel type;

	Set<LotApiModel> lots;
{'fraction_non_alphanumeric': 0.09188432835820895, 'fraction_numerical': 0.0, 'mean_word_length': 6.102649006622516, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3958340', 'n_tokens_mistral': 694, 'n_tokens_neox': 654, 'n_words': 125}