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