File

src/entities/distributor.ts

Index

Properties

Properties

Optional cnpjDistributor
Type : CnpjDistributor
Decorators :
@OneToOne(undefined, cnpj => cnpj.distributor, {eager: false})
enabled
Type : boolean
Decorators :
@Column({nullable: false, default: true})
id
Type : number
Decorators :
@PrimaryGeneratedColumn()
idOrigem
Type : string
Decorators :
@Column({name: 'id_origem', nullable: true})
idRefSql
Type : number
Decorators :
@Column({name: 'id_ref_sql', nullable: true})
Optional internalCode
Type : string
Decorators :
@Column({name: 'internal_code', nullable: true})
name
Type : string
Decorators :
@Column({unique: false, nullable: false})
Optional partnership
Type : Partnership[]
Decorators :
@OneToMany(undefined, partnership => partnership.distributor)
import { Column, OneToMany, OneToOne, PrimaryGeneratedColumn } from 'typeorm';
import { BaseEntity } from './baseEntity';
import { CnpjDistributor } from './cnpjDistributor';
import { Partnership } from './partnership';

@BaseEntity('distributor')
export class Distributor {
  @PrimaryGeneratedColumn()
  id: number;
  @Column({ unique: false, nullable: false })
  name: string;
  @Column({ name: 'internal_code', nullable: true })
  internalCode?: string;
  @Column({ nullable: false, default: true })
  enabled: boolean;
  // @Column({ nullable: false,default:'ALGAR' })
  // data_destinations: string;
  @Column({ name: 'id_ref_sql', nullable: true })
  idRefSql: number;
  @Column({ name: 'id_origem', nullable: true })
  idOrigem: string;

  @OneToOne(() => CnpjDistributor, (cnpj) => cnpj.distributor, { eager: false })
  cnpjDistributor?: CnpjDistributor;

  @OneToMany(() => Partnership, (partnership) => partnership.distributor)
  partnership?: Partnership[];
}

results matching ""

    No results matching ""