CREATE TABLE tx_nlproducts_domain_model_product (
	title varchar(255) NOT NULL DEFAULT '',
	teaser_text text NOT NULL DEFAULT '',
    teaser_link_text varchar(255) NOT NULL DEFAULT '',
	page int(11) NOT NULL DEFAULT '0',
	cid varchar(1024) NOT NULL DEFAULT '',
	glb int(11) unsigned NOT NULL DEFAULT '0',
	product_categories int(11) unsigned NOT NULL DEFAULT '0',
	product_variations int(11) unsigned NOT NULL DEFAULT '0',
    background_images int(11) unsigned NOT NULL DEFAULT '0',
    awards int(11) unsigned NOT NULL DEFAULT '0',
	systems int(11) unsigned NOT NULL DEFAULT '0',
	global_properties int(11) unsigned NOT NULL DEFAULT '0'
);

CREATE TABLE tx_nlproducts_domain_model_productcategory (
	title varchar(255) NOT NULL DEFAULT '',
	list_text text,
	teaser_text text NOT NULL DEFAULT '',
	teaser_link_text varchar(255) NOT NULL DEFAULT '',
	page int(11) NOT NULL DEFAULT '0',
    products int(11) unsigned NOT NULL DEFAULT '0',
	global_properties int(11) unsigned NOT NULL DEFAULT '0'
);

CREATE TABLE tx_nlproducts_domain_model_productvariation (
	product int(11) unsigned DEFAULT '0' NOT NULL,
	dimensions varchar(255) NOT NULL DEFAULT '',
	background_images int(11) unsigned NOT NULL DEFAULT '0',
	link_to_online_catalog varchar(1024) NOT NULL DEFAULT '',
	images int(11) unsigned NOT NULL DEFAULT '0',
	program int(11) unsigned DEFAULT '0',
	global_properties int(11) unsigned NOT NULL DEFAULT '0',

    sorting_foreign int(11) unsigned NOT NULL DEFAULT '0',

    KEY product (product),
    KEY program (program)
);

CREATE TABLE tx_nlproducts_domain_model_color (
	title varchar(255) NOT NULL DEFAULT '',
	code varchar(7) NOT NULL DEFAULT ''
);

CREATE TABLE tx_nlproducts_domain_model_material (
	title varchar(255) NOT NULL DEFAULT ''
);

CREATE TABLE tx_nlproducts_domain_model_program (
	title varchar(255) NOT NULL DEFAULT '',
    sustainable smallint(1) unsigned NOT NULL DEFAULT '0',
	page int(11) NOT NULL DEFAULT '0',
	global_properties int(11) unsigned NOT NULL DEFAULT '0',
    product_variations int(11) unsigned NOT NULL DEFAULT '0',
);

CREATE TABLE tx_nlproducts_domain_model_system (
	title varchar(255) NOT NULL DEFAULT '',
	page int(11) NOT NULL DEFAULT '0',
	global_properties int(11) unsigned NOT NULL DEFAULT '0'
);

CREATE TABLE sys_file_metadata (
    bgcolor varchar(7) NOT NULL DEFAULT '',
	main_color int(11) unsigned DEFAULT '0',
	main_material int(11) unsigned DEFAULT '0',
	frame_color int(11) unsigned DEFAULT '0',
	frame_material int(11) unsigned DEFAULT '0',
	glb int(11) unsigned DEFAULT '0',
    oc_products int(11) unsigned DEFAULT '0',

    KEY main_color (main_color),
    KEY main_material (main_material),
    KEY frame_color (frame_color),
    KEY frame_material (frame_material)
);

CREATE TABLE sys_file_reference (
    bgcolor varchar(7) NOT NULL DEFAULT '',
	main_color int(11) unsigned DEFAULT '0',
	main_material int(11) unsigned DEFAULT '0',
	frame_color int(11) unsigned DEFAULT '0',
	frame_material int(11) unsigned DEFAULT '0',
	glb int(11) unsigned DEFAULT '0',
    oc_products int(11) unsigned DEFAULT '0'
);

CREATE TABLE tx_nlproducts_domain_model_linkgroup (
	title varchar(255) NOT NULL DEFAULT '',
	text text,
	links int(11) unsigned NOT NULL DEFAULT '0'
);

CREATE TABLE tx_nlproducts_domain_model_link (
	linkgroup int(11) unsigned DEFAULT '0' NOT NULL,
	link varchar(255) NOT NULL DEFAULT '',
	text varchar(255) NOT NULL DEFAULT '',
	icon varchar(255) NOT NULL DEFAULT ''
);

CREATE TABLE tx_nlproducts_sysfilemetadata_ocproduct_mm (
   uid_local int(11) unsigned NOT NULL DEFAULT '0',
   uid_foreign int(11) unsigned NOT NULL DEFAULT '0',
   sorting int(11) unsigned DEFAULT '0' NOT NULL,
   sorting_foreign int(11) unsigned DEFAULT '0' NOT NULL,

   PRIMARY KEY (uid_local,uid_foreign),
   KEY uid_local (uid_local),
   KEY uid_foreign (uid_foreign)
);

CREATE TABLE tx_nlproducts_sysfilereference_ocproduct_mm (
   uid_local int(11) unsigned NOT NULL DEFAULT '0',
   uid_foreign int(11) unsigned NOT NULL DEFAULT '0',
   sorting int(11) unsigned DEFAULT '0' NOT NULL,
   sorting_foreign int(11) unsigned DEFAULT '0' NOT NULL,

   PRIMARY KEY (uid_local,uid_foreign),
   KEY uid_local (uid_local),
   KEY uid_foreign (uid_foreign)
);
