gov_auth_logging_lib
Version:
logging library for cerbos
40 lines (38 loc) • 818 B
JavaScript
const EntitySchema = require("typeorm").EntitySchema;
const LogEntry = new EntitySchema({
name: "LogEntry",
tableName: "log_entries",
columns: {
id: {
primary: true,
type: "int",
generated: true
},
timestamp: {
type: "timestamp",
createDate: true
},
path: {
type: "varchar"
},
method: {
type: "varchar"
},
userId: {
type: "varchar",
nullable: true
},
ip: {
type: "varchar"
},
userAgent: {
name: "user_agent",
type: "varchar"
},
metadata: {
type: "jsonb",
nullable: true
}
}
});
module.exports = LogEntry;