diff --git a/src/main/java/sg/com/smartinventory/utility/DataLoader.java b/src/main/java/sg/com/smartinventory/utility/DataLoader.java index 6c2a5ba..be49e14 100644 --- a/src/main/java/sg/com/smartinventory/utility/DataLoader.java +++ b/src/main/java/sg/com/smartinventory/utility/DataLoader.java @@ -31,21 +31,21 @@ public DataLoader(CustomerRepository customerRepository, ProductRepository produ @PostConstruct public void loadData() { - // Clear all data. - clearTableData(); + // // Clear all data. + // clearTableData(); - // Create fake data. - generateFakeData(); - } + // // Create fake data. + // generateFakeData(); + // } - public void clearTableData() { + // public void clearTableData() { // Clear all data. customerRepository.deleteAll(); productRepository.deleteAll(); reviewRepository.deleteAll(); - } + // } -// <<<<<<< SIS-39 + // <<<<<<< SIS-39 // = = = CUSTOMER DATA = = = Customer customer1 = customerRepository .save(new Customer("John", "Doe", "USA", "123 Main St", 123456, 12345678, @@ -62,20 +62,25 @@ public void clearTableData() { Customer customer5 = customerRepository .save(new Customer("David", "Wilson", "Germany", "654 Pine Rd", 987655, 36985214, "david.wilson@example.com")); -// ======= -// public void generateFakeData() { -// // Create fake data. -// customerRepository.save(new Customer("John", "Doe", "USA", "123 Main St", 123456, 12345678, -// "john.doe@example.com")); -// customerRepository.save(new Customer("Alice", "Smith", "Canada", "456 Maple Ave", 543210, 98765432, -// "alice.smith@example.com")); -// customerRepository.save(new Customer("Michael", "Johnson", "UK", "789 Oak Rd", 567890, 98761234, -// "michael.johnson@example.com")); -// customerRepository.save(new Customer("Emily", "Brown", "Australia", "321 Elm St", 135790, 45678912, -// "emily.brown@example.com")); -// customerRepository.save(new Customer("David", "Wilson", "Germany", "654 Pine Rd", 987655, 36985214, -// "david.wilson@example.com")); -// >>>>>>> main + // ======= + // public void generateFakeData() { + // // Create fake data. + // customerRepository.save(new Customer("John", "Doe", "USA", "123 Main St", + // 123456, 12345678, + // "john.doe@example.com")); + // customerRepository.save(new Customer("Alice", "Smith", "Canada", "456 Maple + // Ave", 543210, 98765432, + // "alice.smith@example.com")); + // customerRepository.save(new Customer("Michael", "Johnson", "UK", "789 Oak + // Rd", 567890, 98761234, + // "michael.johnson@example.com")); + // customerRepository.save(new Customer("Emily", "Brown", "Australia", "321 Elm + // St", 135790, 45678912, + // "emily.brown@example.com")); + // customerRepository.save(new Customer("David", "Wilson", "Germany", "654 Pine + // Rd", 987655, 36985214, + // "david.wilson@example.com")); + // >>>>>>> main // = = = REVIEW DATA = = = // Adding review data (note that the "same" review object is being used in all,