Skip to content

Commit 9b3d39e

Browse files
committed
docs: update docs for resource key/value adapter
AdminForth/1780/add-support-of-expiry-in-kv-ad
1 parent f9a1cb3 commit 9b3d39e

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

adminforth/documentation/docs/tutorial/06-Adapters/07-key-value-adapters.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ model key_values {
7878
key String @id
7979
value String
8080
collection String?
81+
expire_at DateTime? //optional column
8182
8283
@@index([key])
8384
@@index([collection])
@@ -117,6 +118,10 @@ export default {
117118
{
118119
name: 'collection',
119120
type: AdminForthDataTypes.STRING,
121+
},
122+
{
123+
name: 'expire_at'
124+
type: AdminForthDataTypes.DATETIME,
120125
}
121126
],
122127
options: {
@@ -157,5 +162,6 @@ const adapter = new ResourceKeyValueAdapter({
157162
keyField: 'key',
158163
valueField: 'value',
159164
collectionField: 'collection',
165+
expireField: 'expire_at'
160166
})
161167
```

0 commit comments

Comments
 (0)