import { ApiProperty } from "@nestjs/swagger";
import { IsNotEmpty } from "class-validator";
import { extname } from "path";


export class CreateMaterialDto {
    @IsNotEmpty()
    @ApiProperty()
    name: string;


    @IsNotEmpty()
    @ApiProperty()
    type: string;

    @IsNotEmpty()
    @ApiProperty()
    description: string;

    @IsNotEmpty()
    @ApiProperty()
    brand: string;

    @IsNotEmpty()
    @ApiProperty()
    uom: string;

    @IsNotEmpty()
    @ApiProperty()
    quantity: number;

    @IsNotEmpty()
    @ApiProperty()
    price: number;

    @IsNotEmpty()
    @ApiProperty()
    batch_number: number;

    @IsNotEmpty()
    @ApiProperty()
    expiry_date: Date;

    @IsNotEmpty()
    @ApiProperty()
    vendor_id: number;

    @ApiProperty()
    created_at: Date

}

export class UpdateMaterialDto {
    @IsNotEmpty()
    @ApiProperty()
    name: string;


    @IsNotEmpty()
    @ApiProperty()
    type: string;

    @IsNotEmpty()
    @ApiProperty()
    description: string;

    @IsNotEmpty()
    @ApiProperty()
    brand: string;

    @IsNotEmpty()
    @ApiProperty()
    uom: string;

    @IsNotEmpty()
    @ApiProperty()
    quantity: number;

    @IsNotEmpty()
    @ApiProperty()
    price: number;

    @IsNotEmpty()
    @ApiProperty()
    batch_number: number;

    @IsNotEmpty()
    @ApiProperty()
    expiry_date: Date;

    @IsNotEmpty()
    @ApiProperty()
    vendor_id: number;

    @ApiProperty()
    updated_at: Date;
  
}

export class CreateMaterialConsumedDto {
    @IsNotEmpty()
    @ApiProperty()
    name: string;


    @IsNotEmpty()
    @ApiProperty()
    type: string;

    @IsNotEmpty()
    @ApiProperty()
    brand: string;

    @IsNotEmpty()
    @ApiProperty()
    uom: string;

    @IsNotEmpty()
    @ApiProperty()
    quantity_consumed: number;

    @IsNotEmpty()
    @ApiProperty()
    batch_number: number;

    @ApiProperty()
    created_at: Date;


}

export class UpdateMaterialConsumedDto {
    @IsNotEmpty()
    @ApiProperty()
    name: string;


    @IsNotEmpty()
    @ApiProperty()
    type: string;

    @IsNotEmpty()
    @ApiProperty()
    brand: string;

    @IsNotEmpty()
    @ApiProperty()
    uom: string;

    @IsNotEmpty()
    @ApiProperty()
    quantity_consumed: number;

    @IsNotEmpty()
    @ApiProperty()
    batch_number: number;

    @ApiProperty()
    updated_at: Date;


}


export class CreateMaterialIssuedDto {
    @IsNotEmpty()
    @ApiProperty()
    name: string;

    @ApiProperty()
    brand: string;

    @ApiProperty()
    uom: string;

    @ApiProperty()
    quantity_issued: number;

    @ApiProperty()
    batch_number: number;

    @ApiProperty()
    type: string;

    @ApiProperty()
    created_at: Date;

}

export class UpdateMaterialIssuedDto {
    @IsNotEmpty()
    @ApiProperty()
    name: string;


    @IsNotEmpty()
    @ApiProperty()
    type: string;

    @IsNotEmpty()
    @ApiProperty()
    brand: string;

    @IsNotEmpty()
    @ApiProperty()
    uom: string;

    @IsNotEmpty()
    @ApiProperty()
    quantity_issued: number;

    @IsNotEmpty()
    @ApiProperty()
    batch_number: number;

    @ApiProperty()
    updated_at: Date;


}

export class CreateMaterialRecievedDto {
    @IsNotEmpty()
    @ApiProperty()
    name: string;


    @IsNotEmpty()
    @ApiProperty()
    type: string;

    @IsNotEmpty()
    @ApiProperty()
    brand: string;

    @IsNotEmpty()
    @ApiProperty()
    uom: string;

    @IsNotEmpty()
    @ApiProperty()
    quantity_recieved: number;

    @IsNotEmpty()
    @ApiProperty()
    batch_number: number;

    @ApiProperty()
    created_at: Date;


}

export class UpdateMaterialRecievedDto {
    @IsNotEmpty()
    @ApiProperty()
    name: string;


    @IsNotEmpty()
    @ApiProperty()
    type: string;

    @IsNotEmpty()
    @ApiProperty()
    brand: string;

    @IsNotEmpty()
    @ApiProperty()
    uom: string;

    @IsNotEmpty()
    @ApiProperty()
    quantity_recieved: number;

    @IsNotEmpty()
    @ApiProperty()
    batch_number: number;

    @ApiProperty()
    updated_at: Date;


}



export class CreateDepartmentDto {
    @IsNotEmpty()
    @ApiProperty()
    department_name:string;
  
}

export class UpdateDepartmentDto {
    @IsNotEmpty()
    @ApiProperty()
    department_name:string;
  
}