Shun Miyazawa 3 年之前
父节点
当前提交
8d7ac597f3
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      packages/app/src/interfaces/activity.ts

+ 2 - 2
packages/app/src/interfaces/activity.ts

@@ -66,7 +66,7 @@ export type SupportedTargetModelType = typeof SUPPORTED_TARGET_MODEL_TYPE[keyof
 export type SupportedActionType = typeof SUPPORTED_ACTION_TYPE[keyof typeof SUPPORTED_ACTION_TYPE];
 export type SupportedActionType = typeof SUPPORTED_ACTION_TYPE[keyof typeof SUPPORTED_ACTION_TYPE];
 
 
 
 
-export type ISnapshot =  Pick<IUser, 'username'>
+export type ISnapshot =  Partial<Pick<IUser, 'username'>>
 
 
 export type IActivity = {
 export type IActivity = {
   user?: IUser
   user?: IUser
@@ -74,7 +74,7 @@ export type IActivity = {
   target: string
   target: string
   action: SupportedActionType
   action: SupportedActionType
   createdAt: Date
   createdAt: Date
-  snapshot: ISnapshot
+  snapshot?: ISnapshot
 }
 }
 
 
 export type IActivityHasId = IActivity & HasObjectId;
 export type IActivityHasId = IActivity & HasObjectId;