Created
March 27, 2018 14:35
-
-
Save veeranjik/4153136639836fb5d5d44a7a4bcbc778 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Class Name : FullCalendarSchCntr | |
* Description : Convenience class that can be used in Full calendar (getting Properties and Reservations) | |
* Created By : Veeranjaneyulu k | |
* Created On : 22nd March 2018 | |
* | |
* Modification Log: | |
* -------------------------------------------------------------------------------------------------------------------------------------- | |
* Developer Date Modification ID Description | |
* --------------------------------------------------------------------------------------------------------------------------------------- | |
**/ | |
public class FullCalendarSchCntr { | |
/** | |
* @description : To get the properties with reservations | |
* @param : | |
* @return : List<Property__c> | |
**/ | |
@AuraEnabled | |
public static List<Property__c> getReasource(){ | |
//List<sObject> recordList = Database.query('select id,name from property__C where status=\'Active\''); | |
List<Property__c> proList =[select id,name ,(SELECT Name, Check_in__c, Check_out__c,Status__c,Property__r.Name,Property__c FROM Reservations__r where CALENDAR_YEAR(Check_in__c)= 2018) from Property__c where id in (select Property__c from Reservation__c where CALENDAR_YEAR(Check_in__c)= 2018) ]; | |
return proList; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment