

INSERT INTO `{prefix}packages` (`name`, `version`, `created_at`, `updated_at`) VALUES
('shaun_market_place', '1.1.0', NOW(), NOW());

INSERT INTO `{prefix}model_maps` (`subject_type`, `model_class`) VALUES
('market_place_categories', 'Packages\\ShaunSocial\\MarketPlace\\Models\\MarketPlaceCategory'),
('market_place_attributes', 'Packages\\ShaunSocial\\MarketPlace\\Models\\MarketPlaceAttribute'),
('market_place_attribute_values', 'Packages\\ShaunSocial\\MarketPlace\\Models\\MarketPlaceAttributeValue'),
('market_place_listing_reviews', 'Packages\\ShaunSocial\\MarketPlace\\Models\\MarketPlaceListingReview'),
('market_place_listings', 'Packages\\ShaunSocial\\MarketPlace\\Models\\MarketPlaceListing');

INSERT INTO `{prefix}layout_maps` (`router`, `layout_class`) VALUES
('market_places', 'Packages\\ShaunSocial\\MarketPlace\\Repositories\\Helpers\\Layout\\MarketPlaceLayout'),
('listings', 'Packages\\ShaunSocial\\MarketPlace\\Repositories\\Helpers\\Layout\\ListingsLayout'),
('listing_detail', 'Packages\\ShaunSocial\\MarketPlace\\Repositories\\Helpers\\Layout\\ListingDetailLayout');

INSERT INTO `{prefix}layout_blocks` (`component`, `title`, `enable`, `class`, `support_header_footer`, `created_at`, `updated_at`, `package`) VALUES
('ListingCategories', 'Categories', 1, 'Packages\\ShaunSocial\\MarketPlace\\Repositories\\Helpers\\Widget\\ListingCategoriesWidget', 0, NOW(), NOW(), 'shaun_market_place'),
('FeaturedListings', 'Featured Listings', 1, 'Packages\\ShaunSocial\\MarketPlace\\Repositories\\Helpers\\Widget\\FeaturedListingsWidget', 0, NOW(), NOW(), 'shaun_market_place'),
('LatestListings', 'Latest Listings', 1, 'Packages\\ShaunSocial\\MarketPlace\\Repositories\\Helpers\\Widget\\LatestListingsWidget', 0, NOW(), NOW(), 'shaun_market_place'),
('NearbyListings', 'Nearby Listings', 1, 'Packages\\ShaunSocial\\MarketPlace\\Repositories\\Helpers\\Widget\\NearbyListingsWidget', 0, NOW(), NOW(), 'shaun_market_place');

INSERT INTO `{prefix}market_place_categories` (`id`,`name`, `order`, `parent_id`, `default_icon`, `is_active`, `enable_condition`, `enable_discount`, `price_type`, `enable_free_delivery`, `created_at`, `updated_at`) VALUES 
(1,'Cars & Vehicles', '1', '0', 'images/default/market_places/cars_and_vehicles.png', '1', '0', '0', NULL, '0', NOW(), NOW()),
(2,'Computers & Accessories', '2', '0', 'images/default/market_places/computer_and_accessories.png', '1', '0', '0', NULL, '0', NOW(), NOW()),
(3,'Devices', '3', '0', 'images/default/market_places/devices.png', '1', '0', '0', NULL, '0', NOW(), NOW()),
(4,'Contracts', '4', '0', 'images/default/market_places/contracts.png', '1', '0', '0', NULL, '0', NOW(), NOW()),
(5,'Electronics & Appliances', '5', '0', 'images/default/market_places/electronics_and_appliances.png', '1', '0', '0', NULL, '0', NOW(), NOW()),
(6,'Fashions', '6', '0', 'images/default/market_places/fashions.png', '1', '0', '0', NULL, '0', NOW(), NOW()),
(7,'Foods', '7', '0', 'images/default/market_places/foods.png', '1', '0', '0', NULL, '0', NOW(), NOW()),
(8,'Furniture', '8', '0', 'images/default/market_places/furnitures.png', '1', '0', '0', NULL, '0', NOW(), NOW()),
(9,'Houses & Lands', '9', '0', 'images/default/market_places/houses_and_lands.png', '1', '0', '0', NULL, '0', NOW(), NOW()),
(10,'Jobs', '10', '0', 'images/default/market_places/jobs.png', '1', '0', '0', NULL, '0', NOW(), NOW()),
(11,'Pet Services', '11', '0', 'images/default/market_places/pet_services.png', '1', '0', '0', NULL, '0', NOW(), NOW()),
(12,'Phone & Tablets', '12', '0', 'images/default/market_places/phone_and_tablets.png', '1', '0', '0', NULL, '0', NOW(), NOW());

INSERT INTO `{prefix}translations` (`table_name`, `column_name`, `foreign_key`, `locale`, `value`) VALUES
('market_place_categories', 'name', 1, 'en', 'Cars & Vehicles'),
('market_place_categories', 'name', 2, 'en', 'Computers & Accessories'),
('market_place_categories', 'name', 3, 'en', 'Devices'),
('market_place_categories', 'name', 4, 'en', 'Contracts'),
('market_place_categories', 'name', 5, 'en', 'Electronics & Appliances'),
('market_place_categories', 'name', 6, 'en', 'Fashions'),
('market_place_categories', 'name', 7, 'en', 'Foods'),
('market_place_categories', 'name', 8, 'en', 'Furniture'),
('market_place_categories', 'name', 9, 'en', 'Houses & Lands'),
('market_place_categories', 'name', 10, 'en', 'Jobs'),
('market_place_categories', 'name', 11, 'en', 'Pet Services'),
('market_place_categories', 'name', 12, 'en', 'Phone & Tablets');

INSERT INTO `{prefix}subscription_types` (`type`, `order`, `class`, `show`) VALUES
('listing_feature', 1, 'Packages\\ShaunSocial\\MarketPlace\\Subscription\\SubscriptionTypeListingFeature', 'page');

INSERT INTO `{prefix}wallet_transaction_sub_types` (`parent_type_id`, `type`, `class`) VALUES
(4, 'listing_feature_buy', 'Packages\\ShaunSocial\\MarketPlace\\Wallet\\Payment\\MarketPlaceTransactionTypeBuyFeature');

INSERT INTO `{prefix}wallet_transaction_sub_types` (`parent_type_id`, `type`, `class`) VALUES
((SELECT `id` FROM `{prefix}wallet_transaction_types` WHERE `type` = 'commission'), 'listing_feature_buy', 'Packages\\ShaunSocial\\MarketPlace\\Wallet\\Commission\\MarketPlaceTransactionTypeListingFeature');
