mirror of
https://github.com/usatiuk/writer.git
synced 2025-10-29 00:17:48 +01:00
add creationDate to Document
This commit is contained in:
@@ -22,8 +22,12 @@ export class Document extends BaseEntity {
|
||||
@Column({ type: "text" })
|
||||
public content: string;
|
||||
|
||||
@Column({ type: "timestamp" })
|
||||
public createdAt: Date;
|
||||
|
||||
constructor(user: User, name: string, content: string) {
|
||||
super();
|
||||
this.createdAt = new Date();
|
||||
this.user = user;
|
||||
this.name = name;
|
||||
this.content = content;
|
||||
|
||||
Reference in New Issue
Block a user