Sharkey/src/models/entities/log.ts
syuilo b9cb6d1c10 refactor: refactoring imports
将来ESMに移行しやすいように
Related: #7658

なんかmochaが起動しなくなってるけど理由不明
すぐ直したい
2021-08-19 18:33:41 +09:00

46 lines
778 B
TypeScript

import { Entity, PrimaryColumn, Index, Column } from 'typeorm';
import { id } from '../id.js';
@Entity()
export class Log {
@PrimaryColumn(id())
public id: string;
@Index()
@Column('timestamp with time zone', {
comment: 'The created date of the Log.'
})
public createdAt: Date;
@Index()
@Column('varchar', {
length: 64, array: true, default: '{}'
})
public domain: string[];
@Index()
@Column('enum', {
enum: ['error', 'warning', 'info', 'success', 'debug']
})
public level: string;
@Column('varchar', {
length: 8
})
public worker: string;
@Column('varchar', {
length: 128
})
public machine: string;
@Column('varchar', {
length: 2048
})
public message: string;
@Column('jsonb', {
default: {}
})
public data: Record<string, any>;
}