public with sharing class SubmitExtensionApprovalProcessController {

    @AuraEnabled
    public static InitData init(String recordId) {
        InitData res = new InitData();

        try {
            Rental_Apply__c rac = [SELECT Id, ExtensionStatus__c, Root_Rental_Apply__c, demo_purpose2__c, AgreementBorrowingExtensionDate__c, Return_dadeline_final__c from Rental_Apply__c where Id = :recordId];

            res.id = rac.Id;
            res.extensionStatus = rac.ExtensionStatus__c;
            res.rootRentalApply = rac.Root_Rental_Apply__c;
            res.demoPurpose2 = rac.demo_purpose2__c;
            res.agreementBorrowingExtensionDate = rac.AgreementBorrowingExtensionDate__c;
            res.returnDadelineFinal = rac.Return_dadeline_final__c;
        }
        catch (Exception e) {
            System.debug(LoggingLevel.INFO, '****e:' + e);
        }
        return res;
    }

    public class InitData {
        @AuraEnabled
        public String id;
        @AuraEnabled
        public String extensionStatus;
        @AuraEnabled
        public String rootRentalApply;
        @AuraEnabled
        public String demoPurpose2;
        @AuraEnabled
        public Date agreementBorrowingExtensionDate;
        @AuraEnabled
        public Date returnDadelineFinal;
    }
}