Ignore:
Timestamp:
01/04/21 19:20:57 (4 years ago)
Author:
Vzdra <vladko.zdravkovski@…>
Branches:
master
Children:
83a5af4
Parents:
efdb71a
Message:

added initial login functionality

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/it/finki/tinki/bootstrap/DataHolder.java

    refdb71a r29c0ed0  
    11package it.finki.tinki.bootstrap;
    22
     3import it.finki.tinki.model.Address;
    34import it.finki.tinki.model.Skill;
    4 import it.finki.tinki.repository.SkillRepository;
     5import it.finki.tinki.model.Users.Company;
     6import it.finki.tinki.model.Users.User;
     7import it.finki.tinki.model.enumerator.AccountType;
     8import it.finki.tinki.repository.*;
    59import org.springframework.stereotype.Component;
    610
    711import javax.annotation.PostConstruct;
     12import java.util.ArrayList;
     13import java.util.List;
    814
    915@Component
     
    1117
    1218    SkillRepository skillRepository;
     19    UserRepository userRepository;
     20    CompanyRepository companyRepository;
     21    TeamRepository teamRepository;
     22    AddressRepository addressRepository;
    1323
    14     public DataHolder(SkillRepository skillRepository) {
     24    public DataHolder(SkillRepository skillRepository, UserRepository userRepository, CompanyRepository companyRepository, TeamRepository teamRepository, AddressRepository addressRepository) {
    1525        this.skillRepository = skillRepository;
     26        this.userRepository = userRepository;
     27        this.companyRepository = companyRepository;
     28        this.teamRepository = teamRepository;
     29        this.addressRepository = addressRepository;
    1630    }
    1731
     
    4155            skillRepository.save(s0);
    4256        }
     57
     58        addressRepository.save(new Address("asdf", "asdf", "asdf"));
     59        companyRepository.save(new Company("asdf@asdf", "pass", "Co.co", AccountType.COMPANY, addressRepository.findAll().get(0)));
    4360    }
    4461
Note: See TracChangeset for help on using the changeset viewer.