Skip to content

Commit fec65d2

Browse files
authored
Merge pull request #1 from jackall3n/master
Add support for Float
2 parents 720ce85 + dbac585 commit fec65d2

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ model Post {
6565
viewCount Int @default(0)
6666
author User? @relation(fields: [authorId], references: [id])
6767
authorId Int?
68+
rating Float
6869
}
6970
```
7071

prisma/schema.prisma

+1
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,5 @@ model Post {
2828
viewCount Int @default(0)
2929
author User? @relation(fields: [authorId], references: [id])
3030
authorId Int?
31+
rating Float
3132
}

src/helpers.ts

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export const getTSDataTypeFromFieldType = (field: PrismaDMMF.Field) => {
4242
let type = field.type;
4343
switch (field.type) {
4444
case 'Int':
45+
case 'Float':
4546
type = 'number';
4647
break;
4748
case 'DateTime':

0 commit comments

Comments
 (0)