Kaynağa Gözat

implement isExpired

itizawa 4 yıl önce
ebeveyn
işleme
27de436cb0

+ 5 - 0
packages/slackbot-proxy/src/entities/relation.ts

@@ -39,4 +39,9 @@ export class Relation {
   @CreateDateColumn()
   expiredAtCommands: Date;
 
+  isExpired():boolean {
+    const now = Date.now();
+    return this.expiredAtCommands.getTime() < now;
+  }
+
 }