How to generate test data
Generator Module
serve as a foundational setup tool for initializing projects. They are specifically designed to define and manage services that generate test data or essential initial data at the beginning of a project.
Generator Module
. This means that it’s already set up and ready to use when you start a new project.
YourCustomPermissionArray
, YourPermissionType
, and YourRoleAlias
are placeholders for your specific permission array, type, and role alias, respectively.
AppModule
, the Role and Permission Generator Service is defined as follows:
createDefaultRoleAndPermissions
method uses this flag to determine whether to generate roles and permissions. Set generateRolesAndPermission
to true
to activate the generation each time the application starts.