title: "Customizing Models"
Custom fields allow you to add your own custom data properties to many of the Vendure entities. The entities which may be have custom fields defined are listed in the CustomFields documentation
They are specified in the VendureConfig:
const config = {
// ...
dbConnectionOptions: {
// ...
synchronize: true,
},
customFields: {
Product: [
{ name: 'infoUrl', type: 'string' },
{ name: 'downloadable', type: 'boolean' },
{ name: 'shortName', type: 'localeString' },
],
User: [
{ name: 'socialLoginToken', type: 'string' },
],
},
}
With the example config above, the following will occur:
true as above.Product and User types respectively.