import { Column, CreateDateColumn, Entity, PrimaryGeneratedColumn } from "typeorm";
@Entity({ name: "access_logs" })
export class AccessLogEntity {
@PrimaryGeneratedColumn("uuid")
id!: string;
@Column({ type: "text", nullable: true })
userId!: string | null;
@Column({ type: "text", nullable: true })
email!: string | null;
@Column({ type: "text", nullable: true })
name!: string | null;
@Column({ type: "text", nullable: true })
provider!: string | null;
@Column({ type: "text" })
action!: string;
@Column({ type: "text", nullable: true })
ip!: string | null;
@Column({ type: "text", nullable: true })
userAgent!: string | null;
@Column({ type: "jsonb", nullable: true })
metadata!: Record<string, any> | null;
@CreateDateColumn()
createdAt!: Date;
}