60 lines
1.4 KiB
TypeScript
60 lines
1.4 KiB
TypeScript
import { Transaccion } from 'src/database/Monedero/entities/transaccion.entity';
|
|
import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from 'typeorm';
|
|
|
|
@Entity({ name: 'Persona' })
|
|
export class Persona {
|
|
@PrimaryGeneratedColumn()
|
|
idPersona: number;
|
|
|
|
@Column({ length: 50 })
|
|
nombre: string;
|
|
|
|
@Column({ length: 50 })
|
|
apellidoP: string;
|
|
|
|
@Column({ length: 50 })
|
|
apellidoM: string;
|
|
|
|
@Column({ length: 150 })
|
|
password: string;
|
|
|
|
@Column({ length: 150, nullable: true })
|
|
passwordTem?: string;
|
|
|
|
@Column({ type: 'datetime', nullable: true })
|
|
fechaPasswordTem?: Date;
|
|
|
|
@Column({ length: 100, unique: true })
|
|
correo: string;
|
|
|
|
@Column({ length: 100, nullable: true })
|
|
carreraAds?: string;
|
|
|
|
@Column({ type: 'float', default: 0 })
|
|
cantidadCuenta: number;
|
|
|
|
@Column({ length: 150, unique: true })
|
|
usuario: string;
|
|
|
|
@Column({ length: 50, nullable: true })
|
|
numeroIdentificar?: string;
|
|
|
|
@Column({ length: 50 })
|
|
tipoUsuario: string;
|
|
|
|
@Column({ type: 'boolean', default: false })
|
|
correoEnviado: boolean;
|
|
|
|
@Column({ type: 'datetime', default: () => 'CURRENT_TIMESTAMP' })
|
|
fechaRegistro: Date;
|
|
|
|
@Column({ type: 'boolean', default: false })
|
|
cambioPasswordReq: boolean;
|
|
|
|
@Column({ type: 'boolean', default: false })
|
|
primerLogin: boolean;
|
|
|
|
@OneToMany(() => Transaccion, (transaccion) => transaccion.persona)
|
|
transacciones: Transaccion[];
|
|
}
|