• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/**
2 * @file Describe the file
3 * Copyright (c) 2023 Huawei Device Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *     http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17import { Constants } from '../Constants';
18
19interface CalendarsColumnsType {
20  TABLE_NAME: string;
21  ID: string;
22  ACCOUNT_NAME: string;
23  ACCOUNT_TYPE: string;
24  SYNC_ID: string;
25  DIRTY: string;
26  MUTATORS: string;
27  NAME: string;
28  CALENDAR_DISPLAY_NAME: string;
29  CALENDAR_COLOR: string;
30  CALENDAR_COLOR_INDEX: string;
31  CALENDAR_ACCESS_LEVEL: string;
32  VISIBLE: string;
33  SYNC_EVENTS: string;
34  CALENDAR_LOCATION: string;
35  CALENDAR_TIMEZONE: string;
36  OWNER_ACCOUNT: string;
37  IS_PRIMARY: string;
38  CAN_ORGANIZER_RESPOND: string;
39  CAN_MODIFY_TIMEZONE: string;
40  CAN_PARTIALLY_UPDATE: string;
41  MAX_REMINDERS: string;
42  ALLOWED_REMINDERS: string;
43  ALLOWED_AVAILABILITY: string;
44  ALLOWED_ATTENDEE_TYPES: string;
45  DELETED: string;
46  CALENDAR_TIME_STAMP: string;
47  CAL_SYNC1: string;
48  CAL_SYNC2: string;
49  CAL_SYNC3: string;
50  CAL_SYNC4: string;
51  CAL_SYNC5: string;
52  CAL_SYNC6: string;
53  CAL_SYNC7: string;
54  CAL_SYNC8: string;
55  CAL_SYNC9: string;
56  CAL_SYNC10: string;
57  CAN_REMINDER: string;
58  CREATOR: string;
59}
60
61/**
62 * the const of table Calendars
63 *
64 * @since 2022-09-08
65 */
66export const CalendarsColumns: CalendarsColumnsType = {
67  TABLE_NAME: 'Calendars',
68  ID: '_id',
69  ACCOUNT_NAME: 'account_name',
70  ACCOUNT_TYPE: 'account_type',
71  SYNC_ID: '_sync_id',
72  DIRTY: 'dirty',
73  MUTATORS: 'mutators',
74  NAME: 'name',
75  CALENDAR_DISPLAY_NAME: 'calendar_displayName',
76  CALENDAR_COLOR: 'calendar_color',
77  CALENDAR_COLOR_INDEX: 'calendar_color_index',
78  CALENDAR_ACCESS_LEVEL: 'calendar_access_level',
79  VISIBLE: 'visible',
80  SYNC_EVENTS: 'sync_events',
81  CALENDAR_LOCATION: 'calendar_location',
82  CALENDAR_TIMEZONE: 'calendar_timezone',
83  OWNER_ACCOUNT: 'ownerAccount',
84  IS_PRIMARY: 'isPrimary',
85  CAN_ORGANIZER_RESPOND: 'canOrganizerRespond',
86  CAN_MODIFY_TIMEZONE: 'canModifyTimeZone',
87  CAN_PARTIALLY_UPDATE: 'canPartiallyUpdate',
88  MAX_REMINDERS: 'maxReminders',
89  ALLOWED_REMINDERS: 'allowedReminders',
90  ALLOWED_AVAILABILITY: 'allowedAvailability',
91  ALLOWED_ATTENDEE_TYPES: 'allowedAttendeeTypes',
92  DELETED: 'deleted',
93  CALENDAR_TIME_STAMP: 'calendar_time_stamp',
94  CAL_SYNC1: 'cal_sync1',
95  CAL_SYNC2: 'cal_sync2',
96  CAL_SYNC3: 'cal_sync3',
97  CAL_SYNC4: 'cal_sync4',
98  CAL_SYNC5: 'cal_sync5',
99  CAL_SYNC6: 'cal_sync6',
100  CAL_SYNC7: 'cal_sync7',
101  CAL_SYNC8: 'cal_sync8',
102  CAL_SYNC9: 'cal_sync9',
103  CAL_SYNC10: 'cal_sync10',
104  CAN_REMINDER: 'canReminder',
105  CREATOR: Constants.CREATOR,
106}
107
108interface AppNameType {
109  CALENDARDATA: string;
110}
111
112export const APP_NAME: AppNameType = {
113  CALENDARDATA: 'calendardata',
114}
115
116export const DEFAULT_CALENDAR_VALUE: Record<string, number | string> = {
117  '_id': 1,
118  'account_name': 'phone',
119  'account_type': 'local',
120  'creator': APP_NAME.CALENDARDATA,
121}