Skip to content

Commit

Permalink
Update .ts file tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cbullinger committed May 21, 2024
1 parent 5812b37 commit 2abd314
Show file tree
Hide file tree
Showing 4 changed files with 612 additions and 623 deletions.
24 changes: 13 additions & 11 deletions examples/node/v12/__tests__/models/rql-data-models.ts
Original file line number Diff line number Diff line change
@@ -1,29 +1,31 @@
import Realm, { BSON, ObjectSchema } from "realm";

// Models for embedded objects & dot notation queries
export class Office extends Realm.Object {
export class Address extends Realm.Object<Address> {
name!: string;
address!: Address;
street!: string;
zipcode!: number;

static schema: ObjectSchema = {
name: "Office",
name: "Address",
embedded: true,
properties: {
name: "string",
address: "Address",
street: "string",
zipcode: "int",
},
};
}

export class Address extends Realm.Object {
export class Office extends Realm.Object<Office> {
name!: string;
street!: string;
zipcode!: number;
address!: Address;

static schema: ObjectSchema = {
name: "Address",
embedded: true,
name: "Office",
properties: {
name: "string",
street: "string",
zipcode: "int",
address: "Address",
},
};
}
Expand Down
Loading

0 comments on commit 2abd314

Please sign in to comment.