import { Column, CreatedAt, DataType, Model, PrimaryKey, Table } from 'sequelize-typescript';

interface TimeTrackingIncidenceNotificationLogCreationFields {
    id: string;
    instanceId: number;
    userId: number;
    dateString: string;
    incidenceType: string;
    entryId: number | null;
}

@Table({ tableName: 'TimeTrackingIncidenceNotificationLogs', updatedAt: false })
export class TimeTrackingIncidenceNotificationLogDAO extends Model<
    TimeTrackingIncidenceNotificationLogDAO,
    TimeTrackingIncidenceNotificationLogCreationFields
> {
    @PrimaryKey
    @Column(DataType.UUID)
    id!: string;

    @Column
    instanceId!: number;

    @Column
    userId!: number;

    @Column(DataType.STRING)
    dateString!: string;

    @Column(DataType.STRING)
    incidenceType!: string;

    @Column(DataType.INTEGER)
    entryId!: number | null;

    @CreatedAt
    @Column
    createdAt!: Date;
}
