From 0f5d7a7e428f2f42da39a239e5c8175c0726ea30 Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Sat, 28 Mar 2020 18:17:11 +0100 Subject: [PATCH] Frontend: Add account model #225 Signed-off-by: Michael Mayer --- frontend/src/model/account.js | 56 +++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 frontend/src/model/account.js diff --git a/frontend/src/model/account.js b/frontend/src/model/account.js new file mode 100644 index 000000000..d4e09ea5b --- /dev/null +++ b/frontend/src/model/account.js @@ -0,0 +1,56 @@ +import Abstract from "model/abstract"; + +class Account extends Abstract { + getDefaults() { + return { + ID: 0, + AccName: "", + AccOwner: "", + AccURL: "", + AccType: "", + AccKey: "", + AccUser: "", + AccPass: "", + AccError: "", + AccPush: false, + AccSync: false, + RetryLimit: 3, + PushPath: "", + PushSize: "", + PushExpires: 0, + PushExif: true, + PushSidecar: false, + SyncPath: "", + SyncInterval: 86400, + SyncUpload: false, + SyncDownload: true, + SyncDelete: false, + SyncRaw: true, + SyncVideo: true, + SyncSidecar: true, + SyncStart: null, + SyncedAt: null, + CreatedAt: "", + UpdatedAt: "", + DeletedAt: null, + }; + } + + getEntityName() { + return this.AccName; + } + + getId() { + return this.ID; + } + + static getCollectionResource() { + return "accounts"; + } + + static getModelName() { + return "Account"; + } +} + +export default Account;