ls-deno/types.ts

28 lines
519 B
TypeScript
Raw Normal View History

2022-10-08 00:00:45 -05:00
export interface Identifiable {
2022-10-07 23:22:35 -05:00
id: string;
2022-10-08 00:00:45 -05:00
}
export interface Creatable {
2022-10-07 23:22:35 -05:00
createdAt: Date;
2022-10-08 00:00:45 -05:00
}
export interface Updatable {
updatedAt: Date;
}
export type Timestamped = Creatable & Updatable;
export interface Note extends Identifiable, Timestamped {
2022-10-07 23:22:35 -05:00
content: string;
}
2022-10-08 00:00:45 -05:00
export type UserStatus = "unverified" | "verified" | "superadmin";
export interface User extends Identifiable, Timestamped {
username: string;
email?: string;
passwordDigest: string;
displayName?: string;
status: UserStatus;
}