like.ts 1022 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. import type { IUser } from "../auth/User"
  2. export type TLikeType = "like" | "dislike" | "favorite" | "watch";
  3. export interface ILikeData {
  4. id: string;
  5. type: TLikeType;
  6. target_id: string;
  7. target_type?: string;
  8. user: IUser;
  9. context?: string | null;
  10. selected?: boolean;
  11. my_id?: string;
  12. count?: number;
  13. updated_at?: string;
  14. created_at?: string;
  15. }
  16. export interface ILikeCount {
  17. type: TLikeType;
  18. selected?: boolean;
  19. my_id?: string;
  20. count?: number;
  21. user: IUser;
  22. }
  23. export interface ILikeListResponse {
  24. ok: boolean;
  25. message: string;
  26. data: {
  27. rows: ILikeData[];
  28. count: number;
  29. };
  30. }
  31. export interface ILikeResponse {
  32. ok: boolean;
  33. message: string;
  34. data: ILikeData;
  35. }
  36. export interface ILikeCountListResponse {
  37. ok: boolean;
  38. message: string;
  39. data: ILikeCount[];
  40. }
  41. export interface ILikeCountResponse {
  42. ok: boolean;
  43. message: string;
  44. data: ILikeCount;
  45. }
  46. export interface ILikeRequest {
  47. type: TLikeType;
  48. target_id: string;
  49. target_type: string;
  50. user_id?: string;
  51. }