28 lines
519 B
TypeScript
28 lines
519 B
TypeScript
export interface Identifiable {
|
|
id: string;
|
|
}
|
|
|
|
export interface Creatable {
|
|
createdAt: Date;
|
|
}
|
|
|
|
export interface Updatable {
|
|
updatedAt: Date;
|
|
}
|
|
|
|
export type Timestamped = Creatable & Updatable;
|
|
|
|
export interface Note extends Identifiable, Timestamped {
|
|
content: string;
|
|
}
|
|
|
|
export type UserStatus = "unverified" | "verified" | "superadmin";
|
|
|
|
export interface User extends Identifiable, Timestamped {
|
|
username: string;
|
|
email?: string;
|
|
passwordDigest: string;
|
|
displayName?: string;
|
|
status: UserStatus;
|
|
}
|