1/* 2 * Copyright (c) 2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16import DataRdb from '@ohos.data.relationalStore'; 17 18/** 19 * Database account entity class. 20 */ 21export default class Account { 22 /** 23 * The name in the distributed information of the OS account. 24 */ 25 distributedAccountName: string = ""; 26 27 /** 28 * The ID in the distributed information of the OS account. 29 */ 30 distributedAccountID: string = ""; 31 32 /** 33 * The local ID of an OS account. 34 */ 35 localId: number = 0; 36 37 /** 38 * Get inserted account data. 39 * 40 * @return Return account data. 41 */ 42 toValuesBucket(): DataRdb.ValuesBucket { 43 return { 44 distributedAccountName: this.distributedAccountName, 45 distributedAccountID: this.distributedAccountID, 46 localId: this.localId 47 }; 48 } 49} 50