<commit_before>'use strict'
var BaseModel = require('capital-models').BaseModel;
var Supplier = require('../master/supplier');
var Buyer = require('../master/buyer');
var PurchaseOrderItem = require('./purchase-order-item');
var map = require('../map');

module.exports = class PurchaseOrder extends BaseModel {
    constructor(source, type) { 
        super(type || map.purchasing.type.PurchaseOrder, '1.0.0');

        // Define properties
        this.no = '';
        this.refNo = '';
        this.iso = '';

        this.realizationOrderId = {};
        this.realizationOrder = {};
        this.purchaseRequestId = {};
        this.purchaseRequest = {};
        this.buyerId = {};
        this.buyer = new Buyer();
        this.purchaseOrderExternalId = {};
        this.purchaseOrderExternal = {};
        this.supplierId = {};
        this.supplier = new Supplier();

        this.unitId = {};<commit_msg>add sourcePurchaseOrder property on PurchaseOrder model<commit_after>'use strict'
var BaseModel = require('capital-models').BaseModel;
var Supplier = require('../master/supplier');
var Buyer = require('../master/buyer');
var PurchaseOrderItem = require('./purchase-order-item');
var map = require('../map');

module.exports = class PurchaseOrder extends BaseModel {
    constructor(source, type) { 
        super(type || map.purchasing.type.PurchaseOrder, '1.0.0');

        // Define properties
        this.no = '';
        this.refNo = '';
        this.iso = '';

        this.realizationOrderId = {};
        this.realizationOrder = {};
        this.purchaseRequestId = {};
        this.purchaseRequest = {};
        this.buyerId = {};
        this.buyer = new Buyer();
        this.purchaseOrderExternalId = {};
        this.purchaseOrderExternal = {};
        this.sourcePurchaseOrderId = null;
        this.sourcePurchaseOrder = null;
        this.supplierId = {};
        this.supplier = new Supplier();

        this.unitId = {};
{'fraction_non_alphanumeric': 0.15076923076923077, 'fraction_numerical': 0.003076923076923077, 'mean_word_length': 2.5732600732600734, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '647330', 'n_tokens_mistral': 566, 'n_tokens_neox': 544, 'n_words': 103}