package com.realnet.order_estimation.Services;
import com.realnet.order_estimation.Repository.Customer_informationRepository;
import com.realnet.order_estimation.Entity.Customer_information;
 import java.util.List;
import com.realnet.users.entity1.AppUser;
import com.realnet.users.service1.AppUserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
	import org.springframework.stereotype.Service;

@Service
 public class Customer_informationInsertService1 {
@Autowired
private Customer_informationRepository Repository;
@Autowired
	private AppUserServiceImpl userService; 


public Customer_information insertaction(Customer_information customer_information	) {


	customer_information.setUpdatedBy(getUser().getUserId());
		customer_information.setCreatedBy(getUser().getUserId());
		customer_information.setAccountId(getUser().getAccount().getAccount_id()); 
	customer_information.setCustomer_name("text");
customer_information.setEmail_address("email");
customer_information.setContact_person("text");
customer_information.setPhone_number("phone");
customer_information.setSelect_objective("checkbox");
customer_information.setReset_btn("text");
customer_information.setCustomer_address("Paragraph");
customer_information.setDeployment_type("select");
final Customer_information save = Repository.save(customer_information);
		return save;
} 
public AppUser getUser() {
		AppUser user = userService.getLoggedInUser();
		return user;

	}}