mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 16:53:34 +00:00
[SM-288] Rename models to follow naming convention (#3795)
This commit is contained in:
28
libs/common/src/models/view/collection.view.ts
Normal file
28
libs/common/src/models/view/collection.view.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { Collection } from "../domain/collection";
|
||||
import { ITreeNodeObject } from "../domain/tree-node";
|
||||
import { CollectionGroupDetailsResponse } from "../response/collectionResponse";
|
||||
|
||||
import { View } from "./view";
|
||||
|
||||
export class CollectionView implements View, ITreeNodeObject {
|
||||
id: string = null;
|
||||
organizationId: string = null;
|
||||
name: string = null;
|
||||
externalId: string = null;
|
||||
readOnly: boolean = null;
|
||||
hidePasswords: boolean = null;
|
||||
|
||||
constructor(c?: Collection | CollectionGroupDetailsResponse) {
|
||||
if (!c) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.id = c.id;
|
||||
this.organizationId = c.organizationId;
|
||||
this.externalId = c.externalId;
|
||||
if (c instanceof Collection) {
|
||||
this.readOnly = c.readOnly;
|
||||
this.hidePasswords = c.hidePasswords;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user