mirror of
https://github.com/strapi/strapi.git
synced 2025-10-09 23:31:11 +00:00
Add uids to models
This commit is contained in:
parent
b58d7a138a
commit
7b28777825
3
packages/strapi/lib/core/bootstrap.js
vendored
3
packages/strapi/lib/core/bootstrap.js
vendored
@ -64,6 +64,7 @@ module.exports = function(strapi) {
|
||||
|
||||
Object.assign(model, {
|
||||
modelType: 'contentType',
|
||||
uid: `app::${key}.${index}`,
|
||||
apiName: key,
|
||||
globalId: model.globalId || _.upperFirst(_.camelCase(index)),
|
||||
collectionName: model.collectionName || `${index}`.toLocaleLowerCase(),
|
||||
@ -131,6 +132,7 @@ module.exports = function(strapi) {
|
||||
|
||||
Object.assign(model, {
|
||||
modelType: 'contentType',
|
||||
uid: `strapi::admin.${key}`,
|
||||
identity: model.identity || _.upperFirst(key),
|
||||
globalId: model.globalId || _.upperFirst(_.camelCase(`admin-${key}`)),
|
||||
connection:
|
||||
@ -160,6 +162,7 @@ module.exports = function(strapi) {
|
||||
|
||||
Object.assign(model, {
|
||||
modelType: 'contentType',
|
||||
uid: `plugins::${pluginName}.${key}`,
|
||||
plugin: pluginName,
|
||||
collectionName:
|
||||
model.collectionName || `${pluginName}_${key}`.toLowerCase(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user