ls-deno/types.ts

32 lines
603 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 interface Team extends Identifiable, Timestamped {
displayName: string;
}
export type UserStatus = "unverified" | "verified" | "superadmin";
export interface User extends Identifiable, Timestamped {
username: string;
email?: string;
passwordDigest: string;
displayName?: string;
status: UserStatus;
}