All files / src/modules/listings listing.model.ts

100% Statements 40/40
100% Branches 0/0
100% Functions 13/13
100% Lines 38/38

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 7411x     11x 33x 11x     11x     11x   33x 11x   33x 11x   33x 11x     33x 11x   33x 11x   33x 11x   33x 11x   33x 11x   33x 11x   33x 11x   33x 11x   33x 11x     11x     11x     11x     11x     11x     11x     11x     11x  
import { ObjectType, Field, Int, Float } from '@nestjs/graphql';
 
@ObjectType()
export class Listing {
  @Field(() => Int)
  id!: number;
 
  @Field()
  title!: string;
 
  @Field()
  description!: string;
 
  @Field(() => Float)
  price!: number;
 
  @Field(() => Int)
  addressId!: number;
 
  @Field(() => [String])
  photoUrls!: string[];
 
  // Additional fields to reach parity with REST/DB
  @Field(() => String, { nullable: true })
  type?: string;
 
  @Field(() => String, { nullable: true })
  transactionType?: string;
 
  @Field(() => Float, { nullable: true })
  area?: number;
 
  @Field(() => Int, { nullable: true })
  rooms?: number;
 
  @Field(() => Int, { nullable: true })
  floor?: number;
 
  @Field(() => Int, { nullable: true })
  totalFloors?: number;
 
  @Field(() => Int, { nullable: true })
  bathrooms?: number;
 
  @Field(() => Float, { nullable: true })
  ceilingHeight?: number;
 
  @Field(() => Int, { nullable: true })
  yearBuilt?: number;
 
  @Field({ nullable: true })
  furnished?: boolean;
 
  @Field({ nullable: true })
  renovated?: boolean;
 
  @Field({ nullable: true })
  balcony?: boolean;
 
  @Field({ nullable: true })
  elevator?: boolean;
 
  @Field({ nullable: true })
  internet?: boolean;
 
  @Field({ nullable: true })
  facingSide?: string;
 
  @Field({ nullable: true })
  heating?: string;
 
  @Field({ nullable: true })
  status?: string;
}