remove expired room

This commit is contained in:
Peter Maquiran
2024-10-07 13:27:49 +01:00
parent d8eb3ddbd6
commit 0dd4fd665b
101 changed files with 698 additions and 4682 deletions
@@ -0,0 +1,28 @@
import { HttpErrorResponse } from "@angular/common/http";
import { Result } from "neverthrow";
import { HttpResult } from "src/app/infra/http/type";
import { PresidentialActionsCreateInput } from "../use-case/presidential-actions-create-use-case.service";
export abstract class IActionsRepository {
// POST /api/v2/PresidentialActions
abstract createPresidentialAction(body: PresidentialActionsCreateInput): Promise<Result<HttpResult<any>, HttpErrorResponse>>
// GET /api/v2/PresidentialActions
abstract getPresidentialActions(): Promise<Result<HttpResult<any>, HttpErrorResponse>>
// GET /api/v2/PresidentialActions/{processId}
abstract getPresidentialActionById(processId: number): Promise<Result<HttpResult<any>, HttpErrorResponse>>
// DELETE /api/v2/PresidentialActions/{processId}
abstract deletePresidentialAction(processId: number): Promise<Result<HttpResult<any>, HttpErrorResponse>>
// PUT /api/v2/PresidentialActions/{processId}
abstract updatePresidentialAction(processId: number, body: any): Promise<Result<HttpResult<any>, HttpErrorResponse>>
// GET /api/v2/PresidentialActions/{processId}/Posts
abstract getPostsByProcessId(processId: number): Promise<Result<HttpResult<any>, HttpErrorResponse>>
// DELETE /api/v2/PresidentialActions/{processId}/Posts/{documentId}
abstract deletePostByDocumentId(processId: number, documentId: number): Promise<Result<HttpResult<any>, HttpErrorResponse>>
}
@@ -0,0 +1,29 @@
import { Injectable } from '@angular/core';
import { z } from 'zod';
const PresidentialActionsCreateInputSchema = z.object({
userId: z.number(),
description: z.string(),
detail: z.string(),
location: z.string(),
dateBegin: z.string().datetime(), // or use `.refine` for specific date format validation
dateEnd: z.string().datetime(), // or use `.refine` for specific date format validation
actionType: z.string(),
});
// Type inference (optional, but useful if you need the TypeScript type)
export type PresidentialActionsCreateInput = z.infer<typeof PresidentialActionsCreateInputSchema>;
const PresidentialActionsCreateOutputSchema = z.object({});
export type PresidentialActionsCreateOutput = z.infer<typeof PresidentialActionsCreateOutputSchema>;
@Injectable({
providedIn: 'root'
})
export class PresidentialActionsCreateUseCaseService {
constructor() { }
}
@@ -0,0 +1,30 @@
import { Injectable } from '@angular/core';
import { z } from 'zod';
const PresidentialActionsGetCreateInputSchema = z.object({
userId: z.number(),
description: z.string(),
detail: z.string(),
location: z.string(),
dateBegin: z.string().datetime(), // or use `.refine` for specific date format validation
dateEnd: z.string().datetime(), // or use `.refine` for specific date format validation
actionType: z.string(),
});
// Type inference (optional, but useful if you need the TypeScript type)
export type PresidentialActionsGetCreateInput = z.infer<typeof PresidentialActionsGetCreateInputSchema>;
const PresidentialActionsGetCreateOutputSchema = z.object({});
export type PresidentialActionsGetCreateOutput = z.infer<typeof PresidentialActionsGetCreateOutputSchema>;
@Injectable({
providedIn: 'root'
})
export class PresidentialActionsGetGetService {
constructor() { }
}