import { VisibleOption, EventId, UserId, OrganizationId, ProjectId, TagId, ExecutorOrCreator, ScenarioFieldConfigId, CustomFieldValue } from 'teambition-types'; export interface EventSchema { _id: EventId; _creatorId: UserId; attachmentsCount: number; title: string; creator: ExecutorOrCreator; involvers: ExecutorOrCreator[]; content: string; commentsCount: number; location: string; startDate: string; endDate: string; untilDate: string; isAllDay: boolean; involveMembers: UserId[]; /** * todo(dingwen): 定义为 _organizationId?: OrganizationId 更准确, * 因为目前并没有 null 值的情况。目前的写法是为了保持与 TaskSchema 一致, * 之后一起修改。 */ _organizationId: OrganizationId | null; _projectId: ProjectId | null; _scenariofieldconfigId?: ScenarioFieldConfigId; _sourceId: EventId; sourceDate: string; source?: string; customfields?: CustomFieldValue[]; shareStatus: number; recurrence: string[]; reminders: string[]; isArchived: boolean; visible: VisibleOption; isDeleted: boolean; created: string; updated: string; tagIds: TagId[]; status: string; isFavorite: boolean; objectlinksCount: number; likesCount: number; project?: { _id: ProjectId; name: string; }; objectType: 'event'; type: 'event'; url: string; } export interface AllDayEventSchema extends EventSchema { allDayStart?: string; allDayEnd?: string; }