src/entities/client.ts
Properties |
|
Optional application |
Type : ApplicationClient[]
|
Decorators :
@OneToMany(type => ApplicationClient, application => application.client, {eager: false})
|
Defined in src/entities/client.ts:65
|
Optional cnpj |
Type : string
|
Decorators :
@Column({unique: true, nullable: true})
|
Defined in src/entities/client.ts:30
|
Optional cnpjClient |
Type : CnpjClient
|
Decorators :
@OneToOne(undefined, cnpj => cnpj.client, {eager: false})
|
Defined in src/entities/client.ts:54
|
company |
Type : string
|
Decorators :
@Column()
|
Defined in src/entities/client.ts:42
|
data_destinations |
Type : string
|
Decorators :
@Column({nullable: false, default: 'ALGAR'})
|
Defined in src/entities/client.ts:36
|
enabled |
Type : boolean
|
Decorators :
@Column({nullable: false, default: true})
|
Defined in src/entities/client.ts:34
|
historicConfig |
Type : HistClientConfig
|
Decorators :
@OneToMany(undefined, x => x.client)
|
Defined in src/entities/client.ts:77
|
id |
Type : number
|
Decorators :
@PrimaryGeneratedColumn({type: 'bigint'})
|
Defined in src/entities/client.ts:24
|
idOrigem |
Type : string
|
Decorators :
@Column({name: 'id_origem', nullable: true})
|
Defined in src/entities/client.ts:40
|
idRefSql |
Type : number
|
Decorators :
@Column({name: 'id_ref_sql', nullable: true})
|
Defined in src/entities/client.ts:38
|
Optional internalCode |
Type : string
|
Decorators :
@Column({name: 'internal_code', nullable: true})
|
Defined in src/entities/client.ts:28
|
mtrixCode |
Type : number
|
Decorators :
@Column({name: 'mtrix_code', nullable: false, type: 'int4'})
|
Defined in src/entities/client.ts:48
|
name |
Type : string
|
Decorators :
@Column({unique: false, nullable: false})
|
Defined in src/entities/client.ts:26
|
Optional observation |
Type : Observation[]
|
Decorators :
@OneToMany(undefined, observation => observation.client)
|
Defined in src/entities/client.ts:57
|
Optional partnership |
Type : Partnership[]
|
Decorators :
@OneToMany(undefined, partnership => partnership.client)
|
Defined in src/entities/client.ts:68
|
Optional realm |
Type : string
|
Decorators :
@Column({nullable: true})
|
Defined in src/entities/client.ts:32
|
Optional salesForceLevel |
Type : SalesForceLevel[]
|
Decorators :
@OneToMany(undefined, salesForceLevel => salesForceLevel.client)
|
Defined in src/entities/client.ts:74
|
statusDeploymentId |
Type : statusDeployment
|
Decorators :
@Column({name: 'status_deployment_id', nullable: false, type: 'int4'})
|
Defined in src/entities/client.ts:51
|
type |
Type : "F" | "D"
|
Decorators :
@Column({name: 'client_type', nullable: false})
|
Defined in src/entities/client.ts:45
|
useChannel |
Type : boolean
|
Decorators :
@Column({type: 'boolean', name: 'use_channel'})
|
Defined in src/entities/client.ts:60
|
Optional users |
Type : UserClient[]
|
Decorators :
@OneToMany(undefined, x => x.client)
|
Defined in src/entities/client.ts:71
|
import {
Column,
JoinColumn,
ManyToOne,
OneToMany,
OneToOne,
PrimaryGeneratedColumn,
Unique,
} from 'typeorm';
import { ApplicationClient } from './applicationClient';
import { BaseEntity } from './baseEntity';
import { CnpjClient } from './cnpjClient';
import { Observation } from './observation';
import { Partnership } from './partnership';
import { UserClient } from './user-client';
import { SalesForceLevel } from './salesForceLevel';
import { statusDeployment } from 'src/types/statusDeployment';
import { HistClientConfig } from './hist-client-config';
@BaseEntity('clients')
@Unique(['cnpj'])
export class Client {
@PrimaryGeneratedColumn({ type: 'bigint' })
id: number;
@Column({ unique: false, nullable: false })
name: string;
@Column({ name: 'internal_code', nullable: true })
internalCode?: string;
@Column({ unique: true, nullable: true })
cnpj?: string;
@Column({ nullable: true })
realm?: 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;
@Column()
company: string;
@Column({ name: 'client_type', nullable: false })
type: 'F' | 'D';
@Column({ name: 'mtrix_code', nullable: false, type: 'int4' })
mtrixCode: number; // supplier or distributor code
@Column({ name: 'status_deployment_id', nullable: false, type: 'int4' })
statusDeploymentId: statusDeployment;
@OneToOne(() => CnpjClient, (cnpj) => cnpj.client, { eager: false })
cnpjClient?: CnpjClient;
@OneToMany(() => Observation, (observation) => observation.client)
observation?: Observation[];
@Column({ type: 'boolean', name: 'use_channel' })
useChannel: boolean;
@OneToMany((type) => ApplicationClient, (application) => application.client, {
eager: false,
})
application?: ApplicationClient[];
@OneToMany(() => Partnership, (partnership) => partnership.client)
partnership?: Partnership[];
@OneToMany(() => UserClient, (x) => x.client)
users?: UserClient[];
@OneToMany(() => SalesForceLevel, (salesForceLevel) => salesForceLevel.client)
salesForceLevel?: SalesForceLevel[];
@OneToMany(() => HistClientConfig, (x) => x.client)
historicConfig: HistClientConfig;
}