"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.tvSeasonRepository = void 0;

var _tvseason = require("../entity/tvseason");

var _repository = require("./repository");

var _dbconfig = require("../dbconfig");

class TvSeasonRepository extends (0, _repository.repository)({
  tableName: 'season',
  columnNames: _tvseason.tvSeasonColumns,
  primaryColumnName: 'id',
  booleanColumnNames: ['isSpecialSeason']
}) {
  async withMissingPosters(seasonIdsWithPoster) {
    return await _dbconfig.Database.knex(this.tableName).whereNotIn('id', seasonIdsWithPoster).whereNotNull('poster').whereNot('poster', '');
  }

}

const tvSeasonRepository = new TvSeasonRepository();
exports.tvSeasonRepository = tvSeasonRepository;
//# sourceMappingURL=season.js.map