File

src/entities/partnership.ts

Index

Properties

Properties

Optional client
Type : Client
Decorators :
@ManyToOne(type => Client)
@JoinColumn({name: 'client_id'})
clientId
Type : number
Decorators :
@Column({name: 'client_id', nullable: true})
data_destinations
Type : string
Decorators :
@Column({nullable: false, default: 'ALGAR'})
Optional distributor
Type : Distributor
Decorators :
@ManyToOne(undefined)
@JoinColumn({name: 'distributor_id'})
distributorId
Type : number
Decorators :
@Column({name: 'distributor_id', nullable: true})
enabled
Type : boolean
Decorators :
@Column({unique: false, nullable: false})
id
Type : number
Decorators :
@PrimaryGeneratedColumn()
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;
}

results matching ""

    No results matching ""