mirror of
https://github.com/strapi/strapi.git
synced 2025-10-03 04:13:51 +00:00

* Don't set connection field on create/edit operation on content-types & components Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu> * Make sure that every component has a valid connection attribute Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu> * Remove connection check on components load Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu> * Remove default connections from core & webhook stores but make sure it's defined in the application lifecycle Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu> * Fix component's associations that can be undefined instead of empty in populateBareAssociations Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu> * Remove "default" connection from plugins' models Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu> * Remove connection attribute from generated models (cli) Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu> * Mutate each component instead of reassign Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu> * Build core_store and webhook model based on the current config Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu> * Add connection to templates conditionally (based on args) Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu> * Set default value for description to undefined instead of empty string Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu> * Remove unnecessary complexity Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu> * Update getStarted models Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu> * Fix attributes parsing for generate:model Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu> * Removed tpl option from generate:model/api Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu> * Remove tpl option from cli Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
56 lines
1.6 KiB
Plaintext
56 lines
1.6 KiB
Plaintext
'use strict';
|
|
|
|
/**
|
|
* Lifecycle callbacks for the `<%= name %>` model.
|
|
*/
|
|
|
|
module.exports = {
|
|
// Before saving a value.
|
|
// Fired before an `insert` or `update` query.
|
|
// beforeSave: async (model, attrs, options) => {},
|
|
|
|
// After saving a value.
|
|
// Fired after an `insert` or `update` query.
|
|
// afterSave: async (model, response, options) => {},
|
|
|
|
// Before fetching all values.
|
|
// Fired before a `fetchAll` operation.
|
|
// beforeFetchCollection: async (model, columns, options) => {},
|
|
|
|
// After fetching all values.
|
|
// Fired after a `fetchAll` operation.
|
|
// afterFetchCollection: async (model, columns, options) => {},
|
|
|
|
// Before fetching a value.
|
|
// Fired before a `fetch` operation.
|
|
// beforeFetch: async (model, columns, options) => {},
|
|
|
|
// After fetching a value.
|
|
// Fired after a `fetch` operation.
|
|
// afterFetch: async (model, response, options) => {},
|
|
|
|
// Before creating a value.
|
|
// Fired before an `insert` query.
|
|
// beforeCreate: async (model, attrs, options) => {},
|
|
|
|
// After creating a value.
|
|
// Fired after an `insert` query.
|
|
// afterCreate: async (model, attrs, options) => {},
|
|
|
|
// Before updating a value.
|
|
// Fired before an `update` query.
|
|
// beforeUpdate: async (model, attrs, options) => {},
|
|
|
|
// After updating a value.
|
|
// Fired after an `update` query.
|
|
// afterUpdate: async (model, attrs, options) => {},
|
|
|
|
// Before destroying a value.
|
|
// Fired before a `delete` query.
|
|
// beforeDestroy: async (model, attrs, options) => {},
|
|
|
|
// After destroying a value.
|
|
// Fired after a `delete` query.
|
|
// afterDestroy: async (model, attrs, options) => {}
|
|
};
|