creating line scrappy works sort of
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user