database.ts 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. export type Json = string | number | boolean | null | { [key: string]: Json | undefined } | Json[];
  2. export interface Database {
  3. public: {
  4. Tables: {
  5. users: {
  6. Row: {
  7. id: string;
  8. display_name: string;
  9. avatar_color: string | null;
  10. recovery_code: string | null;
  11. last_active_at: string;
  12. created_at: string;
  13. };
  14. Insert: {
  15. id: string;
  16. display_name: string;
  17. avatar_color?: string | null;
  18. recovery_code?: string | null;
  19. last_active_at?: string;
  20. created_at?: string;
  21. };
  22. Update: {
  23. id?: string;
  24. display_name?: string;
  25. avatar_color?: string | null;
  26. recovery_code?: string | null;
  27. last_active_at?: string;
  28. created_at?: string;
  29. };
  30. };
  31. groups: {
  32. Row: {
  33. id: string;
  34. name: string;
  35. invite_code: string;
  36. created_by: string;
  37. created_at: string;
  38. };
  39. Insert: {
  40. id?: string;
  41. name: string;
  42. invite_code: string;
  43. created_by: string;
  44. created_at?: string;
  45. };
  46. Update: {
  47. id?: string;
  48. name?: string;
  49. invite_code?: string;
  50. created_by?: string;
  51. created_at?: string;
  52. };
  53. };
  54. group_members: {
  55. Row: {
  56. group_id: string;
  57. user_id: string;
  58. role: "admin" | "member";
  59. joined_at: string;
  60. };
  61. Insert: {
  62. group_id: string;
  63. user_id: string;
  64. role: "admin" | "member";
  65. joined_at?: string;
  66. };
  67. Update: {
  68. group_id?: string;
  69. user_id?: string;
  70. role?: "admin" | "member";
  71. joined_at?: string;
  72. };
  73. };
  74. movies: {
  75. Row: {
  76. id: string;
  77. group_id: string;
  78. tmdb_id: number;
  79. title: string;
  80. year: number;
  81. poster_path: string | null;
  82. genres: string[];
  83. trailer_url: string | null;
  84. trailer_url_refreshed_at: string | null;
  85. metadata_refreshed_at: string | null;
  86. added_by: string | null;
  87. watched: boolean;
  88. watched_at: string | null;
  89. added_at: string;
  90. };
  91. Insert: {
  92. id?: string;
  93. group_id: string;
  94. tmdb_id: number;
  95. title: string;
  96. year: number;
  97. poster_path?: string | null;
  98. genres?: string[];
  99. trailer_url?: string | null;
  100. trailer_url_refreshed_at?: string | null;
  101. metadata_refreshed_at?: string | null;
  102. added_by: string;
  103. watched?: boolean;
  104. watched_at?: string | null;
  105. added_at?: string;
  106. };
  107. Update: {
  108. id?: string;
  109. group_id?: string;
  110. tmdb_id?: number;
  111. title?: string;
  112. year?: number;
  113. poster_path?: string | null;
  114. genres?: string[];
  115. trailer_url?: string | null;
  116. trailer_url_refreshed_at?: string | null;
  117. metadata_refreshed_at?: string | null;
  118. added_by?: string | null;
  119. watched?: boolean;
  120. watched_at?: string | null;
  121. added_at?: string;
  122. };
  123. };
  124. landing_reel_posters: {
  125. Row: {
  126. id: number;
  127. tmdb_id: number;
  128. poster_path: string;
  129. title: string;
  130. refreshed_at: string;
  131. };
  132. Insert: {
  133. id?: number;
  134. tmdb_id: number;
  135. poster_path: string;
  136. title: string;
  137. refreshed_at?: string;
  138. };
  139. Update: {
  140. id?: number;
  141. tmdb_id?: number;
  142. poster_path?: string;
  143. title?: string;
  144. refreshed_at?: string;
  145. };
  146. };
  147. };
  148. Views: Record<string, never>;
  149. Functions: Record<string, never>;
  150. Enums: Record<string, never>;
  151. };
  152. }