mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
feat: add fieldKeys
in generated const
This commit is contained in:
parent
1b0cce6de9
commit
fbd8498c25
3 changed files with 22 additions and 0 deletions
|
@ -23,4 +23,14 @@ export const OidcModelInstances = Object.freeze({
|
|||
uid: 'uid',
|
||||
grantId: 'grant_id',
|
||||
},
|
||||
fieldKeys: [
|
||||
'modelName',
|
||||
'id',
|
||||
'payload',
|
||||
'expiresAt',
|
||||
'consumedAt',
|
||||
'userCode',
|
||||
'uid',
|
||||
'grantId',
|
||||
],
|
||||
} as const);
|
||||
|
|
|
@ -23,4 +23,13 @@ export const Users = Object.freeze({
|
|||
passwordEncryptionMethod: 'password_encryption_method',
|
||||
passwordEncryptionSalt: 'password_encryption_salt',
|
||||
},
|
||||
fieldKeys: [
|
||||
'id',
|
||||
'userName',
|
||||
'primaryEmail',
|
||||
'primaryPhone',
|
||||
'passwordEncrypted',
|
||||
'passwordEncryptionMethod',
|
||||
'passwordEncryptionSalt',
|
||||
],
|
||||
} as const);
|
||||
|
|
|
@ -194,6 +194,9 @@ const generate = async () => {
|
|||
' fields: {',
|
||||
...fields.map(({ name }) => ` ${camelcase(name)}: '${name}',`),
|
||||
' },',
|
||||
' fieldKeys: [',
|
||||
...fields.map(({ name }) => ` '${camelcase(name)}',`),
|
||||
' ],',
|
||||
'} as const);',
|
||||
].join('\n')
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue