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 16 #ifndef SERVICES_EDM_INCLUDE_DATABASE_ADMIN_FILED_CONST_H 17 #define SERVICES_EDM_INCLUDE_DATABASE_ADMIN_FILED_CONST_H 18 19 #include <string> 20 21 namespace OHOS { 22 namespace EDM { 23 namespace EdmRdbFiledConst { 24 const std::string FILED_ID = "id"; 25 const std::string FILED_USER_ID = "user_id"; 26 const std::string FILED_ADMIN_TYPE = "admin_type"; 27 const std::string FILED_PACKAGE_NAME = "package_name"; 28 const std::string FILED_CLASS_NAME = "class_name"; 29 const std::string FILED_ENT_NAME = "ent_name"; 30 const std::string FILED_ENT_DESC = "ent_desc"; 31 const std::string FILED_PERMISSIONS = "permissions"; 32 const std::string FILED_SUBSCRIBE_EVENTS = "subscribe_events"; 33 const std::string FILED_PARENT_ADMIN = "parent_admin"; 34 35 const std::string FILED_ADMIN_NAME = "admin_name"; 36 const std::string FILED_POLICY_NAME = "policy_name"; 37 const std::string FILED_POLICY_VALUE = "policy_value"; 38 39 constexpr int32_t FILED_COLUMN_INDEX_ZERO = 0; 40 constexpr int32_t FILED_COLUMN_INDEX_ONE = 1; 41 constexpr int32_t FILED_COLUMN_INDEX_TWO = 2; 42 constexpr int32_t FILED_COLUMN_INDEX_THREE = 3; 43 constexpr int32_t FILED_COLUMN_INDEX_FOUR = 4; 44 constexpr int32_t FILED_COLUMN_INDEX_FIVE = 5; 45 constexpr int32_t FILED_COLUMN_INDEX_SIX = 6; 46 constexpr int32_t FILED_COLUMN_INDEX_SEVEN = 7; 47 constexpr int32_t FILED_COLUMN_INDEX_EIGHT = 8; 48 constexpr int32_t FILED_COLUMN_INDEX_NINE = 9; 49 50 const std::string EDM_SERVICE_DATABASE_PATH = "/data/service/el1/public/edm"; 51 const std::string EDM_RDB_NAME = "/edmdb.db"; 52 const std::string ADMIN_POLICIES_RDB_TABLE_NAME = "admin_policies"; 53 const std::string DEVICE_ADMIN_POLICIES_RDB_TABLE_NAME = "device_admin_policies"; 54 const std::string DEVICE_COMBINED_POLICIES_RDB_TABLE_NAME = "device_combined_policies"; 55 constexpr int32_t EDM_RDB_VERSION = 1; 56 } // namespace EdmRdbFiledConst 57 } // namespace EDM 58 } // namespace OHOS 59 60 #endif // SERVICES_EDM_INCLUDE_DATABASE_ADMIN_FILED_CONST_H