debug license
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { LicenseStatus } from '@/generated/prisma/enums'
|
||||
import { ApiProperty, OmitType, PartialType } from '@nestjs/swagger'
|
||||
import { ApiProperty, PartialType } from '@nestjs/swagger'
|
||||
import { IsDateString, IsEnum } from 'class-validator'
|
||||
|
||||
export class CreateLicenseDto {
|
||||
@@ -21,16 +21,7 @@ export class CreateLicenseDto {
|
||||
partner_id: string
|
||||
}
|
||||
|
||||
export class UpdateLicenseDto extends OmitType(PartialType(CreateLicenseDto), [
|
||||
'starts_at',
|
||||
]) {
|
||||
@ApiProperty({ required: true, default: new Date().toISOString() })
|
||||
@IsDateString(
|
||||
{ strict: true },
|
||||
{ message: 'invoice_date must be a valid ISO-8601 string' },
|
||||
)
|
||||
starts_at: Date
|
||||
|
||||
export class UpdateLicenseDto extends PartialType(CreateLicenseDto) {
|
||||
@ApiProperty({ enum: LicenseStatus })
|
||||
@IsEnum(LicenseStatus)
|
||||
status?: LicenseStatus
|
||||
|
||||
Reference in New Issue
Block a user