Skip to content

Instantly share code, notes, and snippets.

@wovalle
Last active February 6, 2019 19:27
Show Gist options
  • Save wovalle/cd7b31b00af7bf3d988e6b77d7bd1727 to your computer and use it in GitHub Desktop.
Save wovalle/cd7b31b00af7bf3d988e6b77d7bd1727 to your computer and use it in GitHub Desktop.
import { Collection, SubCollection, ISubCollection } from 'fireorm';
class Album {
id: string;
name: string;
year: number;
}
@Collection()
export class Band {
id: string;
name: string;
formationYear: number;
genres: Array<string>;
@SubCollection(Album)
albums?: ISubCollection<Album>;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment