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 serviceType { 20 SERVICE_VERIFIED: string; 21 SERVICE_TYPE: string; 22 SERVICE_CP_BZ_URI: string; 23 SERVICE_CP_MNG_URI: string; 24 SERVICE_DESCRIPTION: string; 25 SERVICE_MIN_VERSION: string; 26} 27 28/** 29 * the const of table Events 30 * 31 * @since 2022-05-28 32 */ 33export class EventColumns { 34 public static TABLE_NAME = 'Events'; 35 public static ID = '_id'; 36 public static SYNC_ID = '_sync_id'; 37 public static DIRTY = 'dirty'; 38 public static MUTATORS = 'mutators'; 39 public static EVENT_CALENDAR_TYPE = 'event_calendar_type'; 40 public static UUID = 'uuid'; 41 public static EVENT_IMAGE_TYPE = 'event_image_type'; 42 public static LAST_SYNCED = 'lastSynced'; 43 public static CALENDAR_ID = 'calendar_id'; 44 public static TITLE = 'title'; 45 public static EVENT_LOCATION = 'eventLocation'; 46 public static LOCATION_LONGITUDE = 'location_longitude'; 47 public static LOCATION_LATITUDE = 'location_latitude'; 48 public static DESCRIPTION = 'description'; 49 public static EVENT_COLOR = 'eventColor'; 50 public static EVENT_COLOR_INDEX = 'eventColor_index'; 51 public static EVENT_STATUS = 'eventStatus'; 52 public static SELF_ATTENDEE_STATUS = 'selfAttendeeStatus'; 53 public static DTSTART = 'dtstart'; 54 public static DTEND = 'dtend'; 55 public static EVENT_TIMEZONE = 'eventTimezone'; 56 public static DURATION = 'duration'; 57 public static ALLDAY = 'allDay'; 58 public static ACCESS_LEVEL = 'accessLevel'; 59 public static AVAILABILITY = 'availability'; 60 public static HAS_ALARM = 'hasAlarm'; 61 public static HAS_EXTENDED_PROPERTIES = 'hasExtendedProperties'; 62 public static RRULE = 'rrule'; 63 public static RDATE = 'rdate'; 64 public static EXRULE = 'exrule'; 65 public static EXDATE = 'exdate'; 66 public static ORIGINAL_ID = 'original_id'; 67 public static ORIGINAL_SYNC_ID = 'original_sync_id'; 68 public static ORIGINAL_INSTANCE_TIME = 'originalInstanceTime'; 69 public static ORIGINAL_ALL_DAY = 'originalAllDay'; 70 public static LAST_DATE = 'lastDate'; 71 public static EVENT_TIME_STAMP = 'event_time_stamp'; 72 public static HAS_ATTENDEE_DATE = 'hasAttendeeData'; 73 public static GUESTS_CAN_MODIFY = 'guestsCanModify'; 74 public static GUESTS_CAN_INVITE_OTHERS = 'guestsCanInviteOthers'; 75 public static GUESTS_CAN_SEE_GUESTS = 'guestsCanSeeGuests'; 76 public static ORGANIZER = 'organizer'; 77 public static IS_ORGANIZER = 'isOrganizer'; 78 public static DELETED = 'deleted'; 79 public static EVENT_END_TIMEZONE = 'eventEndTimezone'; 80 public static CUSTOM_APP_PACKAGE = 'customAppPackage'; 81 public static CUSTOM_APP_URI = 'customAppUri'; 82 public static UID2445 = 'uid2445'; 83 public static VERSION = 'version'; 84 public static EVENT_UUID = 'event_uuid'; 85 public static HWEXT_ALERT_TYPE = 'hwext_alert_type'; 86 public static IMPORTANT_EVENT_TYPE = 'important_event_type'; 87 public static SYNC_DATA1 = 'sync_data1'; 88 public static SYNC_DATA2 = 'sync_data2'; 89 public static SYNC_DATA3 = 'sync_data3'; 90 public static SYNC_DATA4 = 'sync_data4'; 91 public static SYNC_DATA5 = 'sync_data5'; 92 public static SYNC_DATA6 = 'sync_data6'; 93 public static SYNC_DATA7 = 'sync_data7'; 94 public static SYNC_DATA8 = 'sync_data8'; 95 public static SYNC_DATA9 = 'sync_data9'; 96 public static SYNC_DATA10 = 'sync_data10'; 97 public static KV_SYNC = 'kv_synced'; 98 public static KV_SYNC_TIME = 'kv_sync_time'; 99 public static CREATOR = Constants.CREATOR; 100 public static IDENTIFIER = 'identifier'; 101 public static SERVICE: serviceType = { 102 SERVICE_VERIFIED: 'service_verified', // whether service uri legal, INTEGER 103 SERVICE_TYPE: 'service_type', // service type of event, TEXT 104 SERVICE_CP_BZ_URI: 'service_cp_bz_uri', // One click service uri passed in by applications, TEXT 105 SERVICE_CP_MNG_URI: 'service_cp_mng_uri', // One click service uri for management passed in by applications, TEXT 106 SERVICE_DESCRIPTION: 'service_description', // service description of event, TEXT 107 SERVICE_MIN_VERSION: 'service_support_min_version' // Minimum version of one click service, INTEGER 108 } 109} 110 111/** 112 * searchable Columns in Events table 113 */ 114export const SEARCH_COLUMNS = [EventColumns.TITLE, EventColumns.DESCRIPTION, EventColumns.EVENT_LOCATION]; 115 116export const UPDATE_INSTANCES_COLUMNS = [EventColumns.DTSTART, EventColumns.DTEND, EventColumns.DURATION, 117EventColumns.EVENT_TIMEZONE, EventColumns.RRULE, EventColumns.RDATE, EventColumns.EXRULE, EventColumns.EXDATE];