mirror of
https://github.com/kmitresse/Compo-Service-Log-Project.git
synced 2026-05-13 17:11:49 +00:00
feat: Use container for the API service
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user