Share.ts 877 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import type { IUser } from "../auth/User"
  2. import type { IGroup } from "../group/Group"
  3. import type { TRole } from "./Auth"
  4. export interface IShareRequest {
  5. res_id: string;
  6. res_type: number;
  7. role: TRole;
  8. user_id: string[];
  9. user_type: string;
  10. }
  11. export interface IShareUpdateRequest {
  12. role: TRole;
  13. }
  14. export interface IShareData {
  15. id?: string;
  16. res_id: string;
  17. res_type: string;
  18. power?: number;
  19. res_name: string;
  20. user?: IUser;
  21. group?: IGroup;
  22. owner?: IUser;
  23. role?: TRole;
  24. created_at?: string;
  25. updated_at?: string;
  26. }
  27. export interface IShareResponse {
  28. ok: boolean;
  29. message: string;
  30. data: IShareData;
  31. }
  32. export interface IShareListResponse {
  33. ok: boolean;
  34. message: string;
  35. data: {
  36. rows: IShareData[];
  37. role: TRole;
  38. count: number;
  39. };
  40. }
  41. export interface IShareDeleteResponse {
  42. ok: boolean;
  43. message: string;
  44. data: number;
  45. }