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 {
98  public id: number = 0;
99  // 邮箱账户的有值 9FTElLYEtUOcwfc25Ut5DgAAAAABDfRUxJS2BLVDnMH3NuVLeQ4AAj21rqg1
100  public syncId: string = '';
101  public dirty: number = 0;
102  public mutators: string = '';
103  // 日程是否是农历日程 1 true
104  public calendarType: number = 0;
105  public uuid: string = '';
106  public imageType: string = '';
107  public lastSynced: number = 0;
108  public calendarId: number = 0;
109  public title: string = '';
110  public eventLocation: string = '';
111  public longitude: string = '';
112  public latitude: string = '';
113  public description: string = '';
114  public eventColor: number = 0;
115  public eventColorIndex: string = '';
116  public eventStatus: number = 0;
117  public selfAttendeeStatus: number = 0;
118  public dtStart: number = 0;
119  public dtEnd: number = 0;
120  public eventTimeZone: string = '';
121  public duration: string = '';
122  public allDay: number = 0;
123  public accessLevel: number = 0;
124  public availability: number = 0;
125  public hasAlarm: number = 0;
126  public hasExtendedProperties: number = 0;
127  public rRule: string = '';
128  public rDate: string = '';
129  public exRule: string = '';
130  public exDate: string = '';
131  public originalId: number = 0;
132  public originalSyncId: string = '';
133  public originalInstanceTime: number = 0;
134  public originalAllDay: number = 0;
135  public lastDate: number = 0;
136  public eventTimeStamp: number = 0;
137  public hasAttendeeData: number = 0;
138  public guestsCanModify: number = 0;
139  public guestsCanInviteOthers: number = 0;
140  public guestsCanSeeGuests: number = 0;
141  public organizer: string = '';
142  public isOrganizer: number = 0;
143  public deleted: number = 0;
144  public eventEndTimezone: string = '';
145  public customAppPackage: string = '';
146  public customAppUri: string = '';
147  public uid2445: string = '';
148  public version: number = 0;
149  public eventUuid: string = '';
150  public hwExtAlertType: number = 0;
151  public importantEventType: number = 0;
152  //一键入会相关
153  public serviceVerified: number = 0;
154  public serviceType: string = '';
155  public serviceCpBzUri: string = '';
156  public serviceCpMngUri: string = '';
157  public serviceDescription: string = '';
158  public serviceSupportMinVersion: number = 0;
159  // birthdayKind 日程如果是属于联系人生日账户,该值表示日程的类型 10 太阳历, 11 农历
160  public syncData1: string = '';
161  // SYNC_DATA2 表示联系人id
162  public syncData2: string = '';
163  // 联系人日程有值,代码没搜到相关含义
164  public syncData3: string = '';
165  // 联系人日程有值,com.android.huawei.phone 联系人应用的包名
166  public syncData4: string = '';
167  public syncData5: string = '';
168  public syncData6: string = '';
169  public syncData7: string = '';
170  public syncData8: string = '';
171  public syncData9: string = '';
172  public syncData10: string = '';
173  public kvSynced: number = 0;
174  public kvSyncTime: number = 0;
175  public creator: string = '';
176  // 双升单,提升性能,需要批量插入,oldEventId 记录原来event 主键id,
177  public oldEventId: number = 0;
178
179  // 日程唯一标识,三方写入可指定
180  public identifier: string = '';
181
182  constructor() {
183  }
184
185  /**
186   * 判断是否全天日程
187   *
188   * @return true 全天日程 false 非全天日程
189   */
190  public isAllDay(): boolean {
191    return this.allDay === 1;
192  }
193}