mirror of
https://github.com/kmitresse/Compo-Service-Log-Project.git
synced 2026-05-13 17:11:49 +00:00
35 lines
610 B
TypeScript
35 lines
610 B
TypeScript
import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";
|
|
|
|
@Entity()
|
|
export class Log {
|
|
@PrimaryGeneratedColumn()
|
|
id: number = 0;
|
|
|
|
@Column("timestamp")
|
|
timestamp: Date = new Date();
|
|
|
|
@Column("text")
|
|
url: string;
|
|
|
|
@Column("text")
|
|
method: "GET" | "POST" | "PUT" | "DELETE" = "GET";
|
|
|
|
@Column("blob")
|
|
body: string = "";
|
|
|
|
@Column("blob")
|
|
output: string = "";
|
|
|
|
constructor(
|
|
url: string,
|
|
method: "GET" | "POST" | "PUT" | "DELETE",
|
|
body: string,
|
|
output: string,
|
|
) {
|
|
this.url = url;
|
|
this.method = method;
|
|
this.body = body;
|
|
this.output = output;
|
|
}
|
|
}
|