We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 59db881 commit 322900fCopy full SHA for 322900f
src/schemas/index.ts
@@ -0,0 +1 @@
1
+export { default as itemSchema } from "./item.schema";
src/schemas/item.schema.ts
@@ -0,0 +1,24 @@
+import dynamoose from "dynamoose";
2
+import { v4 as uuidv4 } from "uuid";
3
+
4
+const itemSchema = new dynamoose.Schema({
5
+ id: {
6
+ type: String,
7
+ hashKey: true,
8
+ default: () => uuidv4(),
9
+ },
10
+ name: {
11
12
+ required: true,
13
14
+ description: {
15
16
+ required: false,
17
18
+ createdAt: {
19
+ type: Date,
20
+ default: () => new Date(),
21
22
+});
23
24
+export default itemSchema;
0 commit comments