feat: implement community editing with audit logs and user attribution

Add created/updated tracking and edit logs to all wiki tables
Restrict create/update/delete operations to verified users
Display edit metadata on frontend detail and list views
This commit is contained in:
2026-04-30 11:53:29 +08:00
parent 9af8c98401
commit 0f5ff7be15
16 changed files with 537 additions and 90 deletions

View File

@@ -11,7 +11,19 @@ export interface Skill extends NamedEntity {
subcategory: string | null;
}
export interface Pokemon {
export interface UserSummary {
id: number;
displayName: string;
}
export interface EditInfo {
createdAt: string;
updatedAt: string;
createdBy: UserSummary | null;
updatedBy: UserSummary | null;
}
export interface Pokemon extends EditInfo {
id: number;
name: string;
environment: NamedEntity;
@@ -30,7 +42,7 @@ export interface PokemonDetail extends Pokemon {
}>;
}
export interface Habitat {
export interface Habitat extends EditInfo {
id: number;
name: string;
recipe: Array<NamedEntity & { quantity: number }>;
@@ -46,7 +58,7 @@ export interface HabitatDetail extends Habitat {
}>;
}
export interface Item {
export interface Item extends EditInfo {
id: number;
name: string;
category: NamedEntity;
@@ -65,7 +77,7 @@ export interface ItemDetail extends Item {
relatedHabitats: Array<NamedEntity & { quantity: number }>;
}
export interface Recipe {
export interface Recipe extends EditInfo {
id: number;
name: string;
materials: Array<NamedEntity & { quantity: number }>;