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 enum CalendarsColumns { 67 TABLE_NAME = 'Calendars', 68 69 ID = '_id', 70 71 ACCOUNT_NAME = 'account_name', 72 73 ACCOUNT_TYPE = 'account_type', 74 75 D_SIDE_ACCOUNT_TYPE = 'd_side_account_type', 76 77 SYNC_ID = '_sync_id', 78 79 DIRTY = 'dirty', 80 81 MUTATORS = 'mutators', 82 83 NAME = 'name', 84 85 CALENDAR_DISPLAY_NAME = 'calendar_displayName', 86 87 CALENDAR_COLOR = 'calendar_color', 88 89 CALENDAR_COLOR_INDEX = 'calendar_color_index', 90 91 CALENDAR_ACCESS_LEVEL = 'calendar_access_level', 92 93 VISIBLE = 'visible', 94 95 SYNC_EVENTS = 'sync_events', 96 97 CALENDAR_LOCATION = 'calendar_location', 98 99 CALENDAR_TIMEZONE = 'calendar_timezone', 100 101 OWNER_ACCOUNT = 'ownerAccount', 102 103 IS_PRIMARY = 'isPrimary', 104 105 CAN_ORGANIZER_RESPOND = 'canOrganizerRespond', 106 107 CAN_MODIFY_TIMEZONE = 'canModifyTimeZone', 108 109 CAN_PARTIALLY_UPDATE = 'canPartiallyUpdate', 110 111 MAX_REMINDERS = 'maxReminders', 112 113 ALLOWED_REMINDERS = 'allowedReminders', 114 115 ALLOWED_AVAILABILITY = 'allowedAvailability', 116 117 ALLOWED_ATTENDEE_TYPES = 'allowedAttendeeTypes', 118 119 DELETED = 'deleted', 120 121 CALENDAR_TIME_STAMP = 'calendar_time_stamp', 122 123 CAL_SYNC1 = 'cal_sync1', 124 125 CAL_SYNC2 = 'cal_sync2', 126 127 CAL_SYNC3 = 'cal_sync3', 128 129 CAL_SYNC4 = 'cal_sync4', 130 131 CAL_SYNC5 = 'cal_sync5', 132 133 CAL_SYNC6 = 'cal_sync6', 134 135 CAL_SYNC7 = 'cal_sync7', 136 137 CAL_SYNC8 = 'cal_sync8', 138 139 CAL_SYNC9 = 'cal_sync9', 140 141 CAL_SYNC10 = 'cal_sync10', 142 143 CAN_REMINDER = 'canReminder', 144 145 CREATOR = 'creator', 146} 147 148export enum AppName { 149 CALENDARDATA = 'com.huawei.hmos.calendardata', 150} 151 152export const DEFAULT_CALENDAR_VALUE: Record<string, number | string> = { 153 '_id': 1, 154 'account_name': 'phone', 155 'account_type': 'local', 156 'creator': AppName.CALENDARDATA, 157}