src/entities/distributor.ts
Properties |
|
Optional cnpjDistributor |
Type : CnpjDistributor
|
Decorators :
@OneToOne(undefined, cnpj => cnpj.distributor, {eager: false})
|
Defined in src/entities/distributor.ts:24
|
enabled |
Type : boolean
|
Decorators :
@Column({nullable: false, default: true})
|
Defined in src/entities/distributor.ts:15
|
id |
Type : number
|
Decorators :
@PrimaryGeneratedColumn()
|
Defined in src/entities/distributor.ts:9
|
idOrigem |
Type : string
|
Decorators :
@Column({name: 'id_origem', nullable: true})
|
Defined in src/entities/distributor.ts:21
|
idRefSql |
Type : number
|
Decorators :
@Column({name: 'id_ref_sql', nullable: true})
|
Defined in src/entities/distributor.ts:19
|
Optional internalCode |
Type : string
|
Decorators :
@Column({name: 'internal_code', nullable: true})
|
Defined in src/entities/distributor.ts:13
|
name |
Type : string
|
Decorators :
@Column({unique: false, nullable: false})
|
Defined in src/entities/distributor.ts:11
|
Optional partnership |
Type : Partnership[]
|
Decorators :
@OneToMany(undefined, partnership => partnership.distributor)
|
Defined in src/entities/distributor.ts:27
|
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[];
}