1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 17:23:37 +00:00

refactor req/res models

This commit is contained in:
Kyle Spearrin
2018-05-15 12:18:47 -04:00
parent 1d3ed93bff
commit 07cc64c0b8
25 changed files with 363 additions and 229 deletions

26
src/models/secureNote.ts Normal file
View File

@@ -0,0 +1,26 @@
import { SecureNoteType } from 'jslib/enums/secureNoteType';
import { SecureNoteView } from 'jslib/models/view/secureNoteView';
export class SecureNote {
static template(): SecureNote {
const req = new SecureNote();
req.type = SecureNoteType.Generic;
return req;
}
static toView(req: SecureNote, view = new SecureNoteView()) {
view.type = req.type;
return view;
}
type: SecureNoteType;
constructor(o?: SecureNoteView) {
if (o == null) {
return;
}
this.type = o.type;
}
}