public with sharing class SubmitExtensionApprovalProcessController {

    public SubmitExtensionApprovalProcessController() {
        
    }


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

        try {
            Rental_Apply__c rac = [SELECT Id, ExtensionStatus__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;
    }
}