|
1
|
{"slug":"/references/user/models/User","title":"User - User Module Data Models Reference","frontmatter":{"displayed_sidebar":"userModelReference","slug":"/references/user/models/User","sidebar_label":"User"},"toc":[],"blocks":[{"kind":"markdown","html":"This documentation provides a reference to the User data model. It belongs to the User Module."},{"kind":"sourceCodeLink","link":"https://github.com/medusajs/medusa/blob/020565398e436a2bc65777a3b1ad347b4735d6df/packages/modules/user/src/models/user.ts#L3"},{"kind":"typeList","sectionTitle":"User","types":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The first name of the user.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$dataType","type":"`string`","description":"A type-only property to infer the JavaScript data-type\nof the schema property","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"#retrievable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#providerOptions","type":"`Record<string, Record<string, unknown>>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#filterable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#sortable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#facetable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"types","type":"[SearchFacetKind](/references/types/SearchTypes/types/types.SearchTypes.SearchFacetKind)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"#array","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#searchable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"weight","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"dataType","type":"`object`","description":"The runtime dataType for the schema. It is not the same as\nthe \"$dataType\".","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`\"text\"`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record<string, any>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"last_name","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The last name of the user.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$dataType","type":"`string`","description":"A type-only property to infer the JavaScript data-type\nof the schema property","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"#retrievable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#providerOptions","type":"`Record<string, Record<string, unknown>>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#filterable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#sortable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#facetable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"types","type":"[SearchFacetKind](/references/types/SearchTypes/types/types.SearchTypes.SearchFacetKind)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"#array","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#searchable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"weight","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"dataType","type":"`object`","description":"The runtime dataType for the schema. It is not the same as\nthe \"$dataType\".","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`\"text\"`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record<string, any>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"email","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The email of the user.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"$dataType","type":"`string`","description":"A type-only property to infer the JavaScript data-type\nof the schema property","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"#retrievable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#providerOptions","type":"`Record<string, Record<string, unknown>>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#filterable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#sortable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#facetable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"types","type":"[SearchFacetKind](/references/types/SearchTypes/types/types.SearchTypes.SearchFacetKind)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"#array","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#searchable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"weight","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"dataType","type":"`object`","description":"The runtime dataType for the schema. It is not the same as\nthe \"$dataType\".","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`\"text\"`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record<string, any>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"avatar_url","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The image URL of the user's avatar.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$dataType","type":"`string`","description":"A type-only property to infer the JavaScript data-type\nof the schema property","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"#retrievable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#providerOptions","type":"`Record<string, Record<string, unknown>>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#filterable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#sortable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#facetable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"types","type":"[SearchFacetKind](/references/types/SearchTypes/types/types.SearchTypes.SearchFacetKind)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"#array","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#searchable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"weight","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"dataType","type":"`object`","description":"The runtime dataType for the schema. It is not the same as\nthe \"$dataType\".","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`\"text\"`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record<string, any>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"metadata","type":"JSONProperty<NoInfer<Record<string, unknown>>>","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} |