Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | 1x 1x 1x 1x 1x 1x | import { inject, Getter } from '@loopback/core';
import { repository, BelongsToAccessor, HasManyRepositoryFactory, HasOneRepositoryFactory } from '@loopback/repository';
import { LogChainDataSource } from '@logchain/datasources';
import {
User, Company, Flow, CompanyRegulatory,
RegulatoryDocuments, RegulatoryItems, RegulatoryParties, RegulatoryCargos, RegulatoryTransports, RegulatoryCustomsProcedureCodes, RegulatoryInvoices
} from '@logchain/models';
import {
BaseCrudRepository, UserViewRepository, CompanyRepository, CompanyRegulatoryRepository, FlowRepository, RegulatoryCargosRepository,
RegulatoryDocumentsRepository, RegulatoryItemsRepository, RegulatoryPartiesRepository,
RegulatoryTransportsRepository, RegulatoryCustomsProcedureCodesRepository, RegulatoryInvoicesRepository
} from '.';
import { RegulatoryDeclarationsView, RegulatoryDeclarationsViewRelations } from '@logchain/models/views';
export class RegulatoryDeclarationsViewRepository extends BaseCrudRepository<
RegulatoryDeclarationsView,
typeof RegulatoryDeclarationsView.prototype.id,
RegulatoryDeclarationsViewRelations
> {
public readonly creator: BelongsToAccessor<User, typeof User.prototype.id>;
public readonly modifier: BelongsToAccessor<User, typeof User.prototype.id>;
public readonly verifier: BelongsToAccessor<User, typeof User.prototype.id>;
public readonly submitter: BelongsToAccessor<User, typeof User.prototype.id>;
public readonly company: BelongsToAccessor<Company, typeof Company.prototype.id>;
public readonly flow: BelongsToAccessor<Flow, typeof Flow.prototype.id>;
public readonly regulatory: BelongsToAccessor<CompanyRegulatory, typeof Flow.prototype.id>;
public readonly documents: HasManyRepositoryFactory<RegulatoryDocuments, typeof RegulatoryDeclarationsView.prototype.id>;
public readonly items: HasManyRepositoryFactory<RegulatoryItems, typeof RegulatoryDeclarationsView.prototype.id>;
public readonly parties: HasManyRepositoryFactory<RegulatoryParties, typeof RegulatoryDeclarationsView.prototype.id>;
public readonly cargo: HasOneRepositoryFactory<RegulatoryCargos, typeof RegulatoryDeclarationsView.prototype.id>;
public readonly transports: HasManyRepositoryFactory<RegulatoryTransports, typeof RegulatoryDeclarationsView.prototype.id>;
public readonly customsProcedureCodes: HasManyRepositoryFactory<RegulatoryCustomsProcedureCodes, typeof RegulatoryDeclarationsView.prototype.id>;
public readonly invoices: HasManyRepositoryFactory<RegulatoryInvoices, typeof RegulatoryDeclarationsView.prototype.id>;
constructor(
@inject('datasources.logchain') dataSource: LogChainDataSource,
@repository.getter('UserViewRepository')
protected userRepoGetter: Getter<UserViewRepository>,
@repository.getter('CompanyRepository')
protected companyRepositoryGetter: Getter<CompanyRepository>,
@repository.getter('FlowRepository')
protected flowRepositoryGetter: Getter<FlowRepository>,
@repository.getter('CompanyRegulatoryRepository')
protected companyRegulatoryRepositoryGetter: Getter<CompanyRegulatoryRepository>,
@repository.getter('RegulatoryDocumentsRepository')
protected regulatoryDocumentsRepositoryGetter: Getter<RegulatoryDocumentsRepository>,
@repository.getter('RegulatoryItemsRepository')
protected regulatoryItemsRepositoryGetter: Getter<RegulatoryItemsRepository>,
@repository.getter('RegulatoryPartiesRepository')
protected regulatoryPartiesRepositoryGetter: Getter<RegulatoryPartiesRepository>,
@repository.getter('RegulatoryCargosRepository')
protected regulatoryCargosRepositoryGetter: Getter<RegulatoryCargosRepository>,
@repository.getter('RegulatoryTransportsRepository')
protected regulatoryTransportsRepositoryGetter: Getter<RegulatoryTransportsRepository>,
@repository.getter('RegulatoryCustomsProcedureCodesRepository')
protected regulatoryCustomsProcedureCodesRepositoryGetter: Getter<RegulatoryCustomsProcedureCodesRepository>,
@repository.getter('RegulatoryInvoicesRepository')
protected regulatoryInvoicesRepositoryGetter: Getter<RegulatoryInvoicesRepository>,
) {
super(RegulatoryDeclarationsView, dataSource);
this.invoices = this.createHasManyRepositoryFactoryFor('invoices', regulatoryInvoicesRepositoryGetter,);
this.registerInclusionResolver('invoices', this.invoices.inclusionResolver);
this.customsProcedureCodes = this.createHasManyRepositoryFactoryFor('customsProcedureCodes', regulatoryCustomsProcedureCodesRepositoryGetter,);
this.registerInclusionResolver('customsProcedureCodes', this.customsProcedureCodes.inclusionResolver);
this.transports = this.createHasManyRepositoryFactoryFor('transports', regulatoryTransportsRepositoryGetter);
this.registerInclusionResolver('transports', this.transports.inclusionResolver);
this.cargo = this.createHasOneRepositoryFactoryFor('cargo', regulatoryCargosRepositoryGetter);
this.registerInclusionResolver('cargo', this.cargo.inclusionResolver);
this.parties = this.createHasManyRepositoryFactoryFor('parties', regulatoryPartiesRepositoryGetter,);
this.registerInclusionResolver('parties', this.parties.inclusionResolver);
this.items = this.createHasManyRepositoryFactoryFor('items', regulatoryItemsRepositoryGetter,);
this.registerInclusionResolver('items', this.items.inclusionResolver);
this.documents = this.createHasManyRepositoryFactoryFor('documents', regulatoryDocumentsRepositoryGetter,);
this.registerInclusionResolver('documents', this.documents.inclusionResolver);
this.regulatory = this.createBelongsToAccessor('regulatory', companyRegulatoryRepositoryGetter,);
this.flow = this.createBelongsToAccessor('flow', flowRepositoryGetter,);
this.company = this.createBelongsToAccessor('company', companyRepositoryGetter);
this.creator = this.createBelongsToAccessor('creator', userRepoGetter);
this.modifier = this.createBelongsToAccessor('modifier', userRepoGetter);
this.submitter = this.createBelongsToAccessor('submitter', userRepoGetter);
this.verifier = this.createBelongsToAccessor('verifier', userRepoGetter);
}
}
|