博客评论添加ip及地址

This commit is contained in:
2025-06-08 22:00:02 +08:00
parent bff23ebf90
commit 3bdf97ec7b
3 changed files with 7 additions and 6 deletions

View File

@@ -9,11 +9,11 @@ export class BlogComment {
@Column()
content: string;
// @Column()
// ip: string;
@Column()
ip: string;
// @Column()
// address: string;
@Column()
address: string;
@CreateDateColumn({ precision: 3 })
createdAt: Date;

View File

@@ -41,7 +41,7 @@ export function BlogComments({ blogId }: { blogId: string }) {
<div className="whitespace-pre-wrap break-all">{d.content}</div>
<div className="text-xs text-zinc-500 flex gap-2">
<p>{new Date(d.createdAt).toLocaleString()}</p>
<p></p>
<p>{d.address}</p>
<p className="text-zinc-900 cursor-pointer" onClick={() => setReplayTarget(d)}></p>
</div>
{
@@ -54,7 +54,7 @@ export function BlogComments({ blogId }: { blogId: string }) {
<div className="whitespace-pre-wrap break-all">{c.content}</div>
<div className="text-xs text-zinc-500 flex gap-2">
<p>{new Date().toLocaleString()}</p>
<p></p>
<p>{c.address}</p>
</div>
</div>
))

View File

@@ -8,4 +8,5 @@ export interface BlogComment {
deletedAt: string | null;
parentId: string | null;
user: User | null;
address: string;
}