<commit_before>﻿
// Sys.require(ExoWeb.Mock)???
//with (ExoWeb.Mock) {

ExoWeb.Mock.typeProvider({ delay: 10 });
ExoWeb.Mock.objectProvider({ delay: 200 });
ExoWeb.Mock.listProvider({ delay: 500 });

ExoWeb.Mock.types({
	Person: {
		properties: {
			Name: { type: "String", rules: [{ required: {}}] },
			PhoneNumber: { type: "String", format: "Phone", rules: [{ required: {}}] }
		}
	},
	Driver: {
		baseType: "Person",
		properties: {
			Owner: { type: "CarOwner" },
			Cars: { type: "Car", isList: true, rules: [{ allowedValues: { source: "this.Dealer.AvailableCars"}}] },
			BirthDate: { type: "Date", format: "ShortDate" },
			Dealer: { type: "Dealer>Person", rules: [{ allowedValues: { source: "Dealer.All"}}] },
			MilesDriven: { type: "Number", rules: [{ range: { min: 0}}] }
		}
	},
	Car: {
		properties: {
			Name: { type: "String" },
			Driver: { type: "Driver>Person" }
		}
	},
	Dealer: {
		baseType: "Person",
		properties: {
			All: { type: "Driver>Person", isList: true, isStatic: true },
			AvailableCars: { type: "Car", isList: true }
		}
	},
	CarOwner: {
		properties: {
			Name: { type: "String" },
			Location: { type: "OwnerLocation", rules: [{ allowedValues: { source: "this.AvailableLocations"}}] },
			AvailableLocations: { type: "OwnerLocation", isList: true }
		}
	},
	OwnerLocation: {
		properties: {
			Name: { type: "String" },
			Address: { type: "LocationAddress" }
		}
	},
	LocationAddress: {
		properties: {
			State: { type: "AddressState" }
		}
	},
	AddressState: {
		properties: {
			Abbreviation: { type: "String" },
			Name: { type: "String" }
		}
	}
});

ExoWeb.Mock.objects({
	Driver: {
		1: {
			Name: "<NAME>",
			Cars: ["1", "2"],
			Owner: "1",
			BirthDate: new Date("02/07/1985"),
			PhoneNumber: "803-608-7508",
			Dealer: "1",
			MilesDriven: 100000
		}
	},
	Car: {
		1: {
			Name: "Sentra",
			Driver: "1"
		},
		2: {
			Name: "Bike",
			Driver: "1"
		},
		3: {
			Name: "Tank",
			Driver: null
		}
	},
	Dealer: {
		shared: {
			All: ["1", "2"]
		},
		1: {
			Name: "<NAME>",<commit_msg>mock data fixes<commit_after>﻿
// Sys.require(ExoWeb.Mock)???
//with (ExoWeb.Mock) {

ExoWeb.Mock.typeProvider({ delay: 10 });
ExoWeb.Mock.objectProvider({ delay: 200 });
ExoWeb.Mock.listProvider({ delay: 500 });

ExoWeb.Mock.types({
	Person: {
		properties: {
			Name: { type: "String", rules: [{ required: {}}] },
			PhoneNumber: { type: "String", format: "Phone", rules: [{ required: {}}] }
		}
	},
	Driver: {
		baseType: "Person",
		properties: {
			Owner: { type: "CarOwner" },
			Cars: { type: "Car", isList: true, rules: [{ allowedValues: { source: "this.Dealer.AvailableCars"}}] },
			BirthDate: { type: "Date", format: "ShortDate" },
			Dealer: { type: "Dealer>Person", rules: [{ allowedValues: { source: "Dealer.All"}}] },
			MilesDriven: { type: "Number", rules: [{ range: { min: 0}}] }
		}
	},
	Car: {
		properties: {
			Name: { type: "String" },
			Driver: { type: "Driver>Person" }
		}
	},
	Dealer: {
		baseType: "Person",
		properties: {
			All: { type: "Dealer>Person", isList: true, isStatic: true },
			AvailableCars: { type: "Car", isList: true }
		}
	},
	CarOwner: {
		properties: {
			Name: { type: "String" },
			Location: { type: "OwnerLocation", rules: [{ allowedValues: { source: "this.AvailableLocations"}}] },
			AvailableLocations: { type: "OwnerLocation", isList: true }
		}
	},
	OwnerLocation: {
		properties: {
			Name: { type: "String" },
			Address: { type: "LocationAddress" }
		}
	},
	LocationAddress: {
		properties: {
			State: { type: "AddressState" }
		}
	},
	AddressState: {
		properties: {
			Abbreviation: { type: "String" },
			Name: { type: "String" }
		}
	}
});

ExoWeb.Mock.objects({
	Driver: {
		1: {
			Name: "<NAME>",
			Cars: ["1", "2"],
			Owner: "1",
			BirthDate: new Date("02/07/1985"),
			PhoneNumber: "803-608-7508",
			Dealer: "1",
			MilesDriven: 100000
		}
	},
	Car: {
		1: {
			Name: "Sentra",
			Driver: "1"
		},
		2: {
			Name: "Bike",
			Driver: "1"
		},
		3: {
			Name: "Tank",
			Driver: null
		}
	},
	Dealer: {
		static: {
			All: ["1", "2"]
		},
		1: {
			Name: "<NAME>",
{'fraction_non_alphanumeric': 0.21207658321060383, 'fraction_numerical': 0.022582228767795778, 'mean_word_length': 3.231568016614746, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, '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': '4995233', 'n_tokens_mistral': 1847, 'n_tokens_neox': 1595, 'n_words': 337}