creating line scrappy works sort of

This commit is contained in:
talksik
2022-05-05 08:07:50 -05:00
parent 149be0e23c
commit d013212054
7 changed files with 56 additions and 20 deletions
+3 -2
View File
@@ -2,10 +2,11 @@ import { ObjectId } from "mongodb";
export class Line {
constructor(
public _id?: ObjectId,
public createdByUserId: ObjectId,
public name?: string,
public createdDate: Date = new Date(),
public lastUpdatedDate: Date = new Date(),
public name?: string
public _id?: ObjectId
) {}
}
@@ -0,0 +1,17 @@
// TODO: enforce this or the other sort of thing for the class
// type INirvanaResponse<T> =
// | {
// data: T;
// error?: Error;
// }
// | { data?: T; error: Error };
export default class NirvanaResponse<T> {
data?: T;
error?: Error;
constructor(_data: T, _error?: Error) {
this.data = _data;
this.error = _error;
}
}