-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
65 lines (60 loc) · 1.45 KB
/
types.ts
File metadata and controls
65 lines (60 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import { Models } from 'appwrite';
import { OrderStatus, UserRole } from './constants';
export interface UserProfile {
$id: string; // Appwrite User ID
name: string;
email: string;
role: UserRole;
createdAt: string;
}
export interface Order extends Models.Document {
userId: string; // The Admin who created the assignment
title: string;
description: string;
deadline: string;
fileId?: string;
status: OrderStatus;
// Explicitly defining Appwrite document fields to ensure they exist in the type
$id: string;
$collectionId: string;
$databaseId: string;
$createdAt: string;
$updatedAt: string;
$permissions: string[];
$sequence: number;
}
export interface Submission extends Models.Document {
assignmentId: string;
studentId: string;
fileId: string;
notes?: string;
submittedAt: string;
status: 'submitted' | 'approved' | 'rejected' | 'graded';
grade?: string;
// Explicit fields
$id: string;
$collectionId: string;
$databaseId: string;
$createdAt: string;
$updatedAt: string;
$permissions: string[];
$sequence: number;
}
export interface Message extends Models.Document {
senderId: string;
senderName: string;
subject: string;
content: string;
sentAt: string;
$id: string;
$collectionId: string;
$databaseId: string;
$createdAt: string;
$updatedAt: string;
$permissions: string[];
$sequence: number;
}
export interface OrderStats {
name: string;
value: number;
}