Encrypt archives at rest

This commit is contained in:
Dragory 2020-09-16 22:42:25 +03:00
parent 7562a886e1
commit a017aa7bfe
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
3 changed files with 47 additions and 1 deletions

View file

@ -1,4 +1,5 @@
import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";
import { createEncryptedTextTransformer } from "../encryptedTextTransformer";
@Entity("archives")
export class ArchiveEntry {
@ -8,7 +9,11 @@ export class ArchiveEntry {
@Column() guild_id: string;
@Column() body: string;
@Column({
type: "mediumtext",
transformer: createEncryptedTextTransformer(),
})
body: string;
@Column() created_at: string;