/** * Auto-generated JavaScript stub for Client_Department_Model * DO NOT EDIT - This file is automatically regenerated */ class Client_Department_Model extends Rsx_Js_Model { static get name() { return 'Client_Department_Model'; } /** * Fetch client relationship * @returns {Promise} Related model instance(s) or false */ async client() { if (!this.id) { shouldnt_happen('Cannot fetch relationship without id property'); } const response = await $.ajax({ url: `/_fetch_rel/Client_Department_Model/${this.id}/client`, method: 'POST', dataType: 'json' }); if (!response) return false; // Convert response to model instance(s) // Framework handles instantiation based on relationship type return response; } /** * Fetch contacts relationship * @returns {Promise} Related model instance(s) or false */ async contacts() { if (!this.id) { shouldnt_happen('Cannot fetch relationship without id property'); } const response = await $.ajax({ url: `/_fetch_rel/Client_Department_Model/${this.id}/contacts`, method: 'POST', dataType: 'json' }); if (!response) return false; // Convert response to model instance(s) // Framework handles instantiation based on relationship type return response; } /** * Fetch created_by relationship * @returns {Promise} Related model instance(s) or false */ async created_by() { if (!this.id) { shouldnt_happen('Cannot fetch relationship without id property'); } const response = await $.ajax({ url: `/_fetch_rel/Client_Department_Model/${this.id}/created_by`, method: 'POST', dataType: 'json' }); if (!response) return false; // Convert response to model instance(s) // Framework handles instantiation based on relationship type return response; } }