add interface

This commit is contained in:
Peter Maquiran
2024-08-27 20:29:57 +01:00
parent 6c0a15fb7c
commit ee30dd2d5b
43 changed files with 470 additions and 221 deletions
@@ -1,5 +1,6 @@
import { Injectable } from '@angular/core';
import { Subject } from 'rxjs';
import { IAttachmentLocalRepository } from 'src/app/core/chat/repository/attachment/attachment-local-repository';
import { AttachmentTable, AttachmentTableSchema } from 'src/app/infra/database/dexie/instance/chat/schema/attachment';
import { chatDatabase } from 'src/app/infra/database/dexie/service';
import { DexieRepository } from 'src/app/infra/repository/dexie/dexie-repository.service';
@@ -7,7 +8,7 @@ import { DexieRepository } from 'src/app/infra/repository/dexie/dexie-repository
@Injectable({
providedIn: 'root'
})
export class AttachmentLocalDataSource extends DexieRepository<AttachmentTable, AttachmentTable> {
export class AttachmentLocalDataSource extends DexieRepository<AttachmentTable, AttachmentTable> implements IAttachmentLocalRepository {
messageSubject = new Subject();
@@ -1,13 +1,12 @@
import { Injectable, Input } from '@angular/core';
import { IAttachmentRemoteRepository } from 'src/app/core/chat/repository/attachment/attachment-remote-repository';
import { HttpService } from 'src/app/services/http.service';
import { DataSourceReturn } from 'src/app/services/Repositorys/type';
import { MessageOutPutDTO } from '../../dto/message/messageOutputDTO';
import { MessageAttachmentByMessageIdInput } from '../../../domain/use-case/message/message-attachment-by-message-id.service';
@Injectable({
providedIn: 'root'
})
export class AttachmentRemoteDataSourceService {
export class AttachmentRemoteDataSourceService implements IAttachmentRemoteRepository {
private baseUrl = 'https://gdapi-dev.dyndns.info/stage/api/v2/Chat'; // Your base URL
constructor(