Last active
February 6, 2019 19:27
-
-
Save wovalle/cd7b31b00af7bf3d988e6b77d7bd1727 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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