hezean / sustc

Template for project 2 of SUSTech Principles of Database Systems (CS307 / CS213), 23 fall semester.
http://172.18.34.154
MIT License
22 stars 9 forks source link

[VideoService] A question about review and re-review #31

Closed dequeueing closed 9 months ago

dequeueing commented 9 months ago

Describe your question

Hello review. My question is about review in VideoService. The two descriptions below seem to be confusing.

From method updateVideoInfo

    /**
     * Updates the video's information.
     * Only the owner of the video can update the video's information.
     * If the video was reviewed before, a new review for the updated video is required.
     * .................................................
     * @return {@code true} if the video needs to be re-reviewed (was reviewed before), {@code false} otherwise

From method reviewVideo

/**
     * Reviews a video by a superuser.
     * If the video is already reviewed, do not modify the review info.
     * You may consider the following corner cases:
     *   .............................................
     *   the video is already reviewed
     * If any of the corner case happened, false shall be returned.

According to this account, if updateVideoInfo returns true, then we shall re-review the video. However, since it is already been reviewed (otherwise updateVideoInfo would have returned false), it doesn't need to be reviewed again. And there is no re-reviewVideo method.

Can you clarify this? Many thanks!

WhatWEat commented 9 months ago
  1. Still use the reviewVideo method when conducting a re-view.
  2. The meaning of the updateVideoInfo method is that if a video has not been reviewed, it returns false and if a video has been reviewed, it returns true, indicating that it needs to be reviewed again.
dequeueing commented 9 months ago
  1. Still use the reviewVideo method when conducting a re-view.

Do you mean that we do not modify the review infomation( reivewer, reviewTime) for those newly updated videos? Or we need to manually recognize this sitution(public boolean reviewVideo(AuthInfo auth, String bv), where bv is a video that is updated)?

Thanks.

WhatWEat commented 9 months ago

My meaning is, for the videos where updateVideo returns true, you don't need to record the original review and reviewTime. When using the reviewVideo method, the updated videos can be treated as if they are newly released videos.