We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@ApiProperty({type: Date}) metadataLastCheckedAt: Date = new Date(2000-01-01T01:00:00+00:00);
SyntaxError: ';' expected. (16:42) 14 | 15 | @ApiProperty({type: Date}) > 16 | metadataLastCheckedAt: Date = 2000-01-01T01:00:00+00:00 | ^
model App { id Int @id @default(autoincrement()) metadataLastCheckedAt DateTime @default("2000-01-01T01:00:00.00Z") }
The text was updated successfully, but these errors were encountered:
This PR does not contain check whether type is DateTime:
if (this.default) { if (!isNaN(Date.parse(this.default))) { defaultValue = `= new Date('${this.default}')`
As this happens, defaults such as key Int @default(1) get outputted as key:number = new Date("1")
key Int @default(1)
key:number = new Date("1")
Sorry, something went wrong.
i also got error when generate with key String @default("1")
key String @default("1")
The default value of the string is also problematic, I think if !isNaN(Date.parse(this.default)) should be type === 'Date'
!isNaN(Date.parse(this.default))
type === 'Date'
No branches or pull requests
Expected Behavior
Actual Behavior
Steps to Reproduce the Problem
Specifications
The text was updated successfully, but these errors were encountered: