1 /*
2  * Copyright (c) 2023-2024 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 OHOS_CLOUD_DISK_SERVICE_FILE_COLUMN_H
17 #define OHOS_CLOUD_DISK_SERVICE_FILE_COLUMN_H
18 
19 #include <vector>
20 
21 #include "clouddisk_db_const.h"
22 
23 namespace OHOS {
24 namespace FileManagement {
25 namespace CloudDisk {
26 class FileColumn {
27 public:
28     // Local And Cloud
29     static const std::string CLOUD_ID;
30     static const std::string IS_DIRECTORY;
31     static const std::string FILE_NAME;
32     static const std::string PARENT_CLOUD_ID;
33     static const std::string FILE_SIZE;
34     static const std::string FILE_SHA256;
35     static const std::string FILE_TIME_ADDED;
36     static const std::string FILE_TIME_EDITED;
37     static const std::string FILE_TIME_RECYCLED;
38     static const std::string META_TIME_EDITED;
39     static const std::string DIRECTLY_RECYCLED;
40     static const std::string VERSION;
41     static const std::string OPERATE_TYPE;
42     static const std::string FILE_STATUS;
43     static const std::string ROW_ID;
44     static const std::string CHECK_FLAG;
45     static const std::string ROOT_DIRECTORY;
46     static const std::string ATTRIBUTE;
47 
48     // Only Local
49     static const std::string FILE_TIME_VISIT;
50     static const std::string SYNC_STATUS;
51     static const std::string POSITION;
52     static const std::string DIRTY_TYPE;
53     static const std::string MIME_TYPE;
54     static const std::string FILE_TYPE;
55     static const std::string FILE_CATEGORY;
56     static const std::string IS_FAVORITE;
57 
58     // table name
59     static const std::string FILES_TABLE;
60 
61     // parentCloudId index
62     static const std::string PARENT_CLOUD_ID_INDEX;
63 
64     // create FileTable sql
65     static const std::string CREATE_FILE_TABLE;
66 
67     // create parentCloudId index
68     static const std::string CREATE_PARENT_CLOUD_ID_INDEX;
69 
70     //create IsFavorite
71     static const std::string ADD_IS_FAVORITE;
72 
73     //create FileStatus
74     static const std::string ADD_FILE_STATUS;
75 
76     //set FileStatus
77     static const std::string SET_FILE_STATUS_DEFAULT;
78 
79     //set CheckFlag
80     static const std::string ADD_CHECK_FLAG;
81 
82     // set attribute
83     static const std::string ADD_ATTRIBUTE;
84 
85     // Query FILES_TABLE for FileSystem
86     static const std::vector<std::string> FILE_SYSTEM_QUERY_COLUMNS;
87 
88     // Query FILES_TABLE for Disk Push
89     static const std::vector<std::string> DISK_CLOUD_SYNC_COLUMNS;
90 
91     static const std::vector<std::string> LOCAL_COLUMNS;
92 
93     // Query pull info columns
94     static const std::vector<std::string> PULL_QUERY_COLUMNS;
95 
96     // Query local info columns
97     static const std::vector<std::string> DISK_ON_UPLOAD_COLUMNS;
98 
99     static const std::vector<std::string> EXT_ATTR_QUERY_COLUMNS;
100 };
101 } // namespace CloudDisk
102 } // namespace FileManagement
103 } // namespace OHOS
104 #endif // OHOS_CLOUD_DISK_SERVICE_FILE_COLUMN_H