Transfer.ts 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import type { IStudio } from "../auth/Studio"
  2. import type { IUser } from "../auth/User"
  3. import type { IChannel } from "../channel/Channel"
  4. import type { TResType } from "../discussion/DiscussionListCard"
  5. export type ITransferStatus = "transferred" | "accept" | "refuse" | "cancel";
  6. export interface ITransferRequest {
  7. res_type?: TResType;
  8. res_id?: string[];
  9. new_owner?: string;
  10. status?: ITransferStatus;
  11. }
  12. export interface ITransferResponseData {
  13. id: string;
  14. origin_owner: IStudio;
  15. res_type: TResType;
  16. res_id: string;
  17. channel?: IChannel;
  18. transferor: IUser;
  19. new_owner: IStudio;
  20. status: ITransferStatus;
  21. editor?: IUser | null;
  22. created_at: string;
  23. updated_at: string;
  24. }
  25. export interface ITransferCreateResponse {
  26. ok: boolean;
  27. message: string;
  28. data: number;
  29. }
  30. export interface ITransferResponse {
  31. ok: boolean;
  32. message: string;
  33. data: ITransferResponseData;
  34. }
  35. export interface ITransferResponseList {
  36. ok: boolean;
  37. message: string;
  38. data: {
  39. rows: ITransferResponseData[];
  40. count: number;
  41. out: number;
  42. in: number;
  43. };
  44. }