src/sales-force/entities/organization-chart.entity.ts
Properties |
|
accessUserCode |
Type : string
|
Decorators :
@Column({name: 'access_user_code', nullable: true})
|
Optional children |
Type : OrganizationChart[]
|
childrenOrganizationChart |
Type : OrganizationChart[]
|
Decorators :
@OneToMany(undefined, organizationChart => organizationChart.previusOrganizationChart, {cascade: true})
|
color |
Type : string
|
Decorators :
@Column({name: 'color', type: 'text', default: '#FFFFFF'})
|
Optional deleteDate |
Type : any
|
Type : string
|
Decorators :
@Column({name: 'email', nullable: true})
|
hash |
Type : string
|
Decorators :
@Column({name: 'hash', nullable: true})
|
id |
Type : number
|
Decorators :
@PrimaryGeneratedColumn({name: 'id'})
|
internalCode |
Type : string
|
Decorators :
@Column({name: 'internal_code', nullable: true})
|
isSensitive |
Type : boolean
|
Decorators :
@Column({name: 'is_sensitive', default: false})
|
Optional lastAlterationDate |
Type : any
|
level |
Type : number
|
Decorators :
@Column({name: 'level'})
|
Optional linkedDistributorsChart |
Type : LinkedDistributorsChart[]
|
Decorators :
@OneToMany(undefined, linkedDistributorsChart => linkedDistributorsChart.organizationChart)
|
name |
Type : string
|
Decorators :
@Column({name: 'name_chart', type: 'varchar', default: 'N_C '})
|
previousId |
Type : number
|
Decorators :
@Column({name: 'previous_id', nullable: true})
|
previusOrganizationChart |
Type : OrganizationChart
|
Decorators :
@ManyToOne(undefined, organizationChart => organizationChart.childrenOrganizationChart)
|
Optional registrationDate |
Type : any
|
salesForce |
Type : SalesForce
|
Decorators :
@ManyToOne(undefined, salesForce => salesForce.organizationChart)
|
salesForceId |
Type : number
|
Decorators :
@Column({name: 'sales_force_id'})
|
userName |
Type : string
|
Decorators :
@Column({name: 'user_name', nullable: true})
|
import {
Column,
JoinColumn,
ManyToOne,
OneToMany,
OneToOne,
PrimaryGeneratedColumn,
} from 'typeorm';
import { BaseEntity } from './base.entity';
import { LinkedDistributorsChart } from './linked-distributors-chart.entity';
import { SalesForce } from './sales-force.entity';
@BaseEntity({ name: 'organization_chart_node', schema: 'sales_force' })
export class OrganizationChart {
@PrimaryGeneratedColumn({ name: 'id' })
id: number;
@Column({ name: 'sales_force_id' })
salesForceId: number;
@Column({ name: 'level' })
level: number;
@Column({ name: 'name_chart', type: 'varchar', default: 'N_C ' })
name: string;
@Column({ name: 'color', type: 'text', default: '#FFFFFF' })
color: string;
@Column({ name: 'previous_id', nullable: true })
previousId: number;
@Column({ name: 'access_user_code', nullable: true })
accessUserCode: string;
@Column({ name: 'user_name', nullable: true })
userName: string;
@Column({ name: 'internal_code', nullable: true })
internalCode: string;
@Column({ name: 'is_sensitive', default: false })
isSensitive: boolean;
@Column({ name: 'email', nullable: true })
email: string;
@Column({ name: 'hash', nullable: true })
hash: string;
@ManyToOne(() => OrganizationChart, (organizationChart) => organizationChart.childrenOrganizationChart)
@JoinColumn({ name: 'previous_id', referencedColumnName: 'id' })
previusOrganizationChart: OrganizationChart
@ManyToOne(() => SalesForce, (salesForce) => salesForce.organizationChart)
@JoinColumn({ name: 'sales_force_id', referencedColumnName: 'id' })
salesForce: SalesForce
@OneToMany(() => OrganizationChart, (organizationChart) => organizationChart.previusOrganizationChart, { cascade: true })
childrenOrganizationChart: OrganizationChart[]
@OneToMany(() => LinkedDistributorsChart, (linkedDistributorsChart) => linkedDistributorsChart.organizationChart)
linkedDistributorsChart?: LinkedDistributorsChart[];
registrationDate?: any;
lastAlterationDate?: any;
deleteDate?: any;
children?:OrganizationChart[];
}