mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 16:38:19 +01:00
17 lines
510 B
TypeScript
17 lines
510 B
TypeScript
import type { z } from "zod";
|
|
import { DeleteSchema } from "../schemas/delete.ts";
|
|
import type { JSONObject } from "../types.ts";
|
|
import { Entity } from "./entity.ts";
|
|
|
|
export class Delete extends Entity {
|
|
public static override name = "Delete";
|
|
|
|
public constructor(public override data: z.infer<typeof DeleteSchema>) {
|
|
super(data);
|
|
}
|
|
|
|
public static override fromJSON(json: JSONObject): Promise<Delete> {
|
|
return DeleteSchema.parseAsync(json).then((u) => new Delete(u));
|
|
}
|
|
}
|