Coding task · NestJS course · Module 3: TypeORM and Databases
Entity with validation and indexes
Create an entity with validation decorators and database indexes.
Task
Write a Province entity with @Index() on the name, @Column({ unique: true }) for the code and @IsString(), @Length(2, 100) decorators