|
| 1 | +export type User = { |
| 2 | + id: string; |
| 3 | + email: string; |
| 4 | + passcode: string; |
| 5 | + name: string; |
| 6 | +}; |
| 7 | + |
| 8 | +export type Post = { |
| 9 | + id: string; |
| 10 | + content: string; |
| 11 | + userId: string; |
| 12 | +}; |
| 13 | + |
| 14 | +export const database: { users: User[]; posts: Post[] } = { |
| 15 | + users: [ |
| 16 | + { |
| 17 | + id: '3dcb4a1f-0c91-42c5-834f-26d227c532e2', |
| 18 | + |
| 19 | + passcode: '1234', |
| 20 | + name: 'James', |
| 21 | + }, |
| 22 | + { |
| 23 | + id: 'ea120573-2eb4-495e-be48-1b2debac2640', |
| 24 | + |
| 25 | + passcode: '9876', |
| 26 | + name: 'Alex', |
| 27 | + }, |
| 28 | + { |
| 29 | + id: '2ee1c07c-7537-48f5-b5d8-8740e165cd62', |
| 30 | + |
| 31 | + passcode: '1234', |
| 32 | + name: 'Sachin', |
| 33 | + }, |
| 34 | + ], |
| 35 | + posts: [ |
| 36 | + { |
| 37 | + id: 'fc206d47-6d50-4b6a-9779-e9eeaee59aa4', |
| 38 | + content: 'Hello world', |
| 39 | + userId: '3dcb4a1f-0c91-42c5-834f-26d227c532e2', |
| 40 | + }, |
| 41 | + { |
| 42 | + id: 'a10479a2-a397-441e-b451-0b649d15cfd6', |
| 43 | + content: 'tRPC is so awesome', |
| 44 | + userId: 'ea120573-2eb4-495e-be48-1b2debac2640', |
| 45 | + }, |
| 46 | + { |
| 47 | + id: 'de6867c7-13f1-4932-a69b-e96fd245ee72', |
| 48 | + content: 'Know the ropes', |
| 49 | + userId: '3dcb4a1f-0c91-42c5-834f-26d227c532e2', |
| 50 | + }, |
| 51 | + { |
| 52 | + id: '15a742b3-82f6-4fba-9fed-2d1328a4500a', |
| 53 | + content: 'Fight fire with fire', |
| 54 | + userId: 'ea120573-2eb4-495e-be48-1b2debac2640', |
| 55 | + }, |
| 56 | + { |
| 57 | + id: '31afa9ad-bc37-4e74-8d8b-1c1656184a33', |
| 58 | + content: 'I ate breakfast today', |
| 59 | + userId: '3dcb4a1f-0c91-42c5-834f-26d227c532e2', |
| 60 | + }, |
| 61 | + { |
| 62 | + id: '557cb26a-b26e-4329-a5b4-137327616ead', |
| 63 | + content: 'Par for the course', |
| 64 | + userId: '2ee1c07c-7537-48f5-b5d8-8740e165cd62', |
| 65 | + }, |
| 66 | + ], |
| 67 | +}; |
0 commit comments