Spaces:
Running
Running
Commit History
-
Manual changes saved
Verified signature044c6f9
-
Promote version 65dd0ea to main
Verified signaturePromoted commit 65dd0eaea2a04c7058960340ae7de3528139d4c6 to main branchb25a91d -
okay can you now add a header with a side menu button on the far left side of it
Verified signature5c75c54 -
can you now add a download button it should download all 4 files
Verified signature1447a4b -
this is how the output for the service should look like:
Verified signature@Service public class KorisnikService { @Autowired private KorisnikRepository korisnikRepository; public Iterable<Korisnik> findAll(){ return korisnikRepository.findAll(); } public Optional<Korisnik> findById(Long id){ return korisnikRepository.findById(id); } public Nastavnik save(Korisnik nastavnik){ return korisnikRepository.save(korisnik); } public void delete(Korisnik korisnik){ korisnikRepository.delete(korisnik); } public void delete(Long id){ korisnikRepository.deleteById(id); } }4b0a220 -
okay can you change the output on the repository to be CrudRepository<> and inside that instad of long take the type from the field with name id
Verified signature6f1cf67 -
can each tab have just one text output instead of 2 outputs on the repository,service and controller tabs?
Verified signaturec57b456 -
okay now the repository tab should look the same as the entity tab but the output data should look like this:
Verified signature"package com.example.repository; import com.example.entity.Customer; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; // The @Repository annotation is optional if extending JpaRepository, but good practice public interface CustomerRepository extends CrudRepository<Customer, Long> { }10d74a5 -
okay now can you change the name of the tabs the first one will be entity the second one will be repository the third one will be service and the fourth one will be controller
Verified signature019bfa0 -
Promote version 07280d0 to main
Verified signaturePromoted commit 07280d0af61aa9e9148c2b0c876d6106dafec2db to main branch4382eea -
can you add back the tabs above the text output?
Verified signature3084c39 -
Promote version a92e9af to main
Verified signaturePromoted commit a92e9af4a93dd3f61beade5a8b10706fc492f4af to main branch366e13f -
okay do you remember how we had tabs above the output can you add them back there will be 4 tabs the current existing one will be called entity, the next one will be called repository, the next one will be called service and the last one will be called controller
Verified signature96c62a4 -
okay now generate output button will generate another output that will be on the second tab called Repository, the original tab is called Entity, the repository output will also be generated from the inputs and it will look like this:
Verified signature"package com.example.repository; import com.example.entity.Customer; import org.springframework.data.jpa.repository.CrudRepository; import org.springframework.stereotype.Repository; // The @Repository annotation is optional if extending JpaRepository, but good practice public interface CustomerRepository extends CrudRepository<Customer, Long> { }"d384bf6 -
Promote version a92e9af to main
Verified signaturePromoted commit a92e9af4a93dd3f61beade5a8b10706fc492f4af to main branch58b80d0 -
the add button doesnt work anymore fix it
Verified signature53c2ef3 -
okay now add back the tabs the original one should be called "Entity", the seacond one should be repository and its output should look like this:
Verified signature"package com.example.repository; import com.example.entity.Customer; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; // The @Repository annotation is optional if extending JpaRepository, but good practice public interface CustomerRepository extends CrudRepository<Customer, Long> { }" in this case Customer repository is from the class name input so if I input MyClass the repository name will be MyClassRepository and inside <> first parametar is again class name and the second parametar is field type from the input of name id1ae9a3a -
Promote version a92e9af to main
Verified signaturePromoted commit a92e9af4a93dd3f61beade5a8b10706fc492f4af to main branch9aa39c6 -
they still dont do anything
Verified signatureb65a903 -
now none of the buttons work the add field button should still add a normal field but the relation button should add the inputs that I specified in the last message
Verified signature0cb9223 -
okay now next to add button for inputs add a button that will say add relation and it will have 3 inputs first 2 as before name and type but the last will be dropdown that will have 2 options "Parent" and "Child" if child is selected that field will have
Verified signature"@ManyToOne // Many Employees to One Department @JoinColumn(name = "department_id") private Department department;" above it in this case department is field name from the input so do fieldname_id, and if the parent is selected another input appears , that will have "@OneToMany(mappedBy = "department") " above it and in this case department is from the 4th input that appears when the parent is selected1fbf4e0 -
now there is no output when generate output is clicked can you re-add that?
Verified signaturea92e9af -
okay now remove the tabs please and add a download button for the output the downloaded file should be named ClassName.java
Verified signature673d3dc -
okay and the output should look something like this:
Verified signaturepackage com.example.accessingdatajpa; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.GenerationType; import jakarta.persistence.Id; @Entity public class Customer { @Id @GeneratedValue(strategy=GenerationType.AUTO) private Long id; private String firstName; private String lastName; protected Customer() {} public Customer(String firstName, String lastName) { this.firstName = firstName; this.lastName = lastName; } @Override public String toString() { return String.format( "Customer[id=%d, firstName='%s', lastName='%s']", id, firstName, lastName); } public Long getId() { return id; } public String getFirstName() { return firstName; } public String getLastName() { return lastName; } } in this case Customer is the class name from the input under that there is private Long id Long …282d72a -
okay now above input fields there will be a single input that will be Class Name
Verified signature3903985 -
okay now I want the input to be 2 inputs instead of 1, so each input will have 2 inputs one will have a placeholder of "Field Name" and the other will have "Field Type"
Verified signature433cbba -
make me a page that will have inputs on the right at the top should be a button to add more inputs and on the left should be a large text output and above it should be tabs, the page should be dark
Verified signature3ae84ae