NetanelBasal
7/4/2018 - 3:52 PM

1stores.ts

// movies.store.ts
export interface State extends EntityState<Movie> {}

@StoreConfig({ name: 'movies' })
export class MoviesStore extends EntityStore<State, Movie> {
  constructor() {
    super();
  }
}

// actors.store.ts
export interface State extends EntityState<Actor> {}

@StoreConfig({ name: 'actors' })
export class ActorsStore extends EntityStore<State, Actor> {
  constructor() {
    super();
  }
}

// genres.store.ts
export interface State extends EntityState<Genre> {}

@StoreConfig({ name: 'genres' })
export class GenresStore extends EntityStore<State, Genre> {
  constructor() {
    super();
  }
}

// movies.query.ts
export class MoviesQuery extends QueryEntity<State, Movie> {
  constructor(protected store: MoviesStore) {
    super(store);
  }
}


// actors.query.ts
export class ActorsQuery extends QueryEntity<State, Actor> {
  constructor(protected store: ActorsStore) {
    super(store);
  }
}

// genres.query.ts
export class GenresQuery extends QueryEntity<State, Genre> {
  constructor(protected store: GenresStore) {
    super(store);
  }
}