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 const std::string FILED_IS_DEBUG = "is_debug";
35 const std::string FILED_ACCESSIBLE_POLICIES = "accessible_policies";
36 
37 const std::string FILED_ADMIN_NAME = "admin_name";
38 const std::string FILED_POLICY_NAME = "policy_name";
39 const std::string FILED_POLICY_VALUE = "policy_value";
40 
41 constexpr int32_t FILED_COLUMN_INDEX_ZERO = 0;
42 constexpr int32_t FILED_COLUMN_INDEX_ONE = 1;
43 constexpr int32_t FILED_COLUMN_INDEX_TWO = 2;
44 constexpr int32_t FILED_COLUMN_INDEX_THREE = 3;
45 constexpr int32_t FILED_COLUMN_INDEX_FOUR = 4;
46 constexpr int32_t FILED_COLUMN_INDEX_FIVE = 5;
47 constexpr int32_t FILED_COLUMN_INDEX_SIX = 6;
48 constexpr int32_t FILED_COLUMN_INDEX_SEVEN = 7;
49 constexpr int32_t FILED_COLUMN_INDEX_EIGHT = 8;
50 constexpr int32_t FILED_COLUMN_INDEX_NINE = 9;
51 constexpr int32_t FILED_COLUMN_INDEX_TEN = 10;
52 constexpr int32_t FILED_COLUMN_INDEX_ELEVEN = 11;
53 
54 const std::string EDM_SERVICE_DATABASE_PATH = "/data/service/el1/public/edm";
55 const std::string EDM_RDB_NAME = "/edmdb.db";
56 const std::string ADMIN_POLICIES_RDB_TABLE_NAME = "admin_policies";
57 const std::string DEVICE_ADMIN_POLICIES_RDB_TABLE_NAME = "device_admin_policies";
58 const std::string DEVICE_COMBINED_POLICIES_RDB_TABLE_NAME = "device_combined_policies";
59 constexpr int32_t EDM_RDB_VERSION = 3;
60 } // namespace EdmRdbFiledConst
61 } // namespace EDM
62 } // namespace OHOS
63 
64 #endif // SERVICES_EDM_INCLUDE_DATABASE_ADMIN_FILED_CONST_H