src/entities/partnership.ts
Properties |
|
Optional client |
Type : Client
|
Decorators :
@ManyToOne(type => Client)
|
Defined in src/entities/partnership.ts:21
|
clientId |
Type : number
|
Decorators :
@Column({name: 'client_id', nullable: true})
|
Defined in src/entities/partnership.ts:13
|
data_destinations |
Type : string
|
Decorators :
@Column({nullable: false, default: 'ALGAR'})
|
Defined in src/entities/partnership.ts:17
|
Optional distributor |
Type : Distributor
|
Decorators :
@ManyToOne(undefined)
|
Defined in src/entities/partnership.ts:25
|
distributorId |
Type : number
|
Decorators :
@Column({name: 'distributor_id', nullable: true})
|
Defined in src/entities/partnership.ts:15
|
enabled |
Type : boolean
|
Decorators :
@Column({unique: false, nullable: false})
|
Defined in src/entities/partnership.ts:11
|
id |
Type : number
|
Decorators :
@PrimaryGeneratedColumn()
|
Defined in src/entities/partnership.ts:9
|
import { Column, JoinColumn, ManyToOne, PrimaryGeneratedColumn } from 'typeorm';
import { BaseEntity } from './baseEntity';
import { Client } from './client';
import { Distributor } from './distributor';
@BaseEntity('partnership')
export class Partnership {
@PrimaryGeneratedColumn()
id: number;
@Column({ unique: false, nullable: false })
enabled: boolean;
@Column({ name: 'client_id', nullable: true })
clientId: number;
@Column({ name: 'distributor_id', nullable: true })
distributorId: number;
@Column({ nullable: false, default: 'ALGAR' })
data_destinations: string;
@ManyToOne((type) => Client)
@JoinColumn({ name: 'client_id' })
client?: Client;
@ManyToOne(() => Distributor)
@JoinColumn({ name: 'distributor_id' })
distributor?: Distributor;
}