import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm'; import { EstadoServicio } from '../../../common/enums/estados.enum.js'; @Entity('servicio') export class Servicio { @PrimaryGeneratedColumn('uuid') idServicio: string; @Column() nombre: string; @Column({ type: 'date' }) fecha: string; @Column({ type: 'uuid' }) creadoPor: string; @Column({ type: 'double precision', nullable: true }) lat?: number | null; @Column({ type: 'double precision', nullable: true }) lng?: number | null; @Column({ type: 'varchar', default: EstadoServicio.Programado, }) estado: EstadoServicio; /** * PIN de 6 dígitos para marcar asistencia (PIN tecleado o escaneado en QR). * Se genera al publicar el servicio; el líder lo ve en el detalle. */ @Column({ type: 'varchar', nullable: true }) pinMarcado?: string | null; }