• 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
17interface EventsType {
18  id: number;
19  syncId: string;
20  dirty: number;
21  mutators: string;
22  calendarType: number;
23  imageType: string;
24  lastSynced: number;
25  calendarId: number;
26  title: string;
27  eventLocation: string;
28  longitude: string;
29  latitude: string;
30  description: string;
31  eventColor: number;
32  eventColorIndex: string;
33  eventStatus: number;
34  selfAttendeeStatus: number;
35  dtStart: number;
36  dtEnd: number;
37  eventTimeZone: string;
38  duration: string;
39  allDay: number;
40  accessLevel: number;
41  availability: number;
42  hasAlarm: number;
43  hasExtendedProperties: number;
44  rRule: string;
45  rDate: string;
46  exRule: string;
47  exDate: string;
48  originalId: number;
49  originalSyncId: string;
50  originalInstanceTime: number;
51  originalAllDay: number;
52  lastDate: number;
53  eventTimeStamp: number;
54  hasAttendeeData: number;
55  guestsCanModify: number;
56  guestsCanInviteOthers: number;
57  guestsCanSeeGuests: number;
58  organizer: string;
59  isOrganizer: number;
60  deleted: number;
61  eventEndTimezone: string;
62  customAppPackage: string;
63  customAppUri: string;
64  uid2445: string;
65  version: number;
66  eventUuid: string;
67  hwExtAlertType: number;
68  importantEventType: number;
69  // event service
70  serviceVerified: number;
71  serviceType: string;
72  serviceCpBzUri: string;
73  serviceCpMngUri: string;
74  serviceDescription: string;
75  serviceSupportMinVersion: number;
76  // birthdayKind
77  syncData1: string;
78  syncData2: string;
79  syncData3: string;
80  syncData4: string;
81  syncData5: string;
82  syncData6: string;
83  syncData7: string;
84  syncData8: string;
85  syncData9: string;
86  syncData10: string;
87  kvSynced: number;
88  kvSyncTime: number;
89  creator: string;
90}
91
92/**
93 * the structure of table Events
94 *
95 * @since 2022-05-28
96 */
97export class Events implements EventsType {
98  id = 0;
99  syncId = '';
100  dirty = 0;
101  mutators = '';
102  calendarType = 0;
103  imageType = '';
104  lastSynced = 0;
105  calendarId = 0;
106  title = '';
107  eventLocation = '';
108  longitude = '';
109  latitude = '';
110  description = '';
111  eventColor = 0;
112  eventColorIndex = '';
113  eventStatus = 0;
114  selfAttendeeStatus = 0;
115  dtStart = 0;
116  dtEnd = 0;
117  eventTimeZone = '';
118  duration = '';
119  allDay = 0;
120  accessLevel = 0;
121  availability = 0;
122  hasAlarm = 0;
123  hasExtendedProperties = 0;
124  rRule = '';
125  rDate = '';
126  exRule = '';
127  exDate = '';
128  originalId = 0;
129  originalSyncId = '';
130  originalInstanceTime = 0;
131  originalAllDay = 0;
132  lastDate = 0;
133  eventTimeStamp = 0;
134  hasAttendeeData = 0;
135  guestsCanModify = 0;
136  guestsCanInviteOthers = 0;
137  guestsCanSeeGuests = 0;
138  organizer = '';
139  isOrganizer = 0;
140  deleted = 0;
141  eventEndTimezone = '';
142  customAppPackage = '';
143  customAppUri = '';
144  uid2445 = '';
145  version = 0;
146  eventUuid = '';
147  hwExtAlertType = 0;
148  importantEventType = 0;
149  // event service
150  serviceVerified = 0;
151  serviceType = '';
152  serviceCpBzUri = '';
153  serviceCpMngUri = '';
154  serviceDescription = '';
155  serviceSupportMinVersion = 0;
156  // birthdayKind
157  syncData1 = '';
158  syncData2 = '';
159  syncData3 = '';
160  syncData4 = '';
161  syncData5 = '';
162  syncData6 = '';
163  syncData7 = '';
164  syncData8 = '';
165  syncData9 = '';
166  syncData10 = '';
167  kvSynced = 0;
168  kvSyncTime = 0;
169  creator = '';
170
171  /**
172   * 判断是否全天日程
173   *
174   * @return true 全天日程 false 非全天日程
175   */
176  public isAllDay(): boolean {
177    return this.allDay === 1;
178  }
179}