Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
正規化した
class Video {
String videoID;
}
class User {
String userID;
}
class PlayEvent {
String userID;
String videoID;
}
List<Video> videos = [];
List<User> users = [];
List<PlayEvent> playEvents = [];
// ユーザーが閲覧したvideoインスタンスの視聴ユーザーリストにユーザーを追加
void play(String userID, String videoID) {
playEvents.add(new PlayEvent()
..userID = userID
..videoID = videoID);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.