File

src/entities/user.ts

Index

Properties

Properties

applications
Type : ApplicationUser[]
Decorators :
@OneToMany(undefined, x => x.user)
clients
Type : UserClient[]
Decorators :
@OneToMany(undefined, x => x.user)
cpf
Type : string
Decorators :
@Column({length: 11, nullable: true})
email
Type : string
Decorators :
@Column({length: 100, unique: true})
enabled
Type : boolean
Decorators :
@Column({default: true})
fax
Type : string
Decorators :
@Column({length: 20, nullable: true})
id
Type : number
Decorators :
@PrimaryGeneratedColumn({type: 'bigint'})
Optional jobPositionId
Type : number
Decorators :
@Column({name: 'job_position_id', type: 'int4', nullable: false})
name
Type : string
Decorators :
@Column({name: 'person_name', length: 80})
observation
Type : string
Decorators :
@Column({length: 100, nullable: true})
ramal1
Type : number
Decorators :
@Column({name: 'ramal_1', type: 'int4', nullable: true})
ramal2
Type : number
Decorators :
@Column({name: 'ramal_2', type: 'int4', nullable: true})
telephone1
Type : string
Decorators :
@Column({name: 'telephone_1', length: 40, nullable: true})
telephone2
Type : string
Decorators :
@Column({name: 'telephone_2', length: 40, nullable: true})
username
Type : string
Decorators :
@Column({length: 20, unique: true})
userRole
Type : string
Decorators :
@Column({name: 'user_role', length: 40, nullable: true})
import { Column, OneToMany, PrimaryGeneratedColumn } from 'typeorm';
import { BaseEntity } from './baseEntity';
import { ApplicationUser } from './application-user';
import { UserClient } from './user-client';

@BaseEntity('users')
export class User {
  @PrimaryGeneratedColumn({ type: 'bigint' })
  id: number;

  @Column({ name: 'person_name', length: 80 })
  name: string;

  @Column({ length: 20, unique: true })
  username: string;

  @Column({ length: 100, unique: true })
  email: string;

  @Column({ default: true })
  enabled: boolean;

  @Column({ length: 11, nullable: true })
  cpf: string;

  @Column({ name: 'user_role', length: 40, nullable: true })
  userRole: string;

  @Column({ name: 'telephone_1', length: 40, nullable: true })
  telephone1: string;

  @Column({ name: 'telephone_2', length: 40, nullable: true })
  telephone2: string;

  @Column({ length: 20, nullable: true })
  fax: string;

  @Column({ length: 100, nullable: true })
  observation: string;

  @Column({ name: 'ramal_1', type: 'int4', nullable: true })
  ramal1: number;

  @Column({ name: 'ramal_2', type: 'int4', nullable: true })
  ramal2: number;

  @Column({ name: 'job_position_id', type: 'int4', nullable: false })
  jobPositionId?: number;

  @OneToMany(() => ApplicationUser, (x) => x.user)
  applications: ApplicationUser[];

  @OneToMany(() => UserClient, (x) => x.user)
  clients: UserClient[];
}

results matching ""

    No results matching ""