Share.ts 837 B

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