ls-deno/types.ts
2022-10-08 00:00:45 -05:00

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;
}