Skip to content

Instantly share code, notes, and snippets.

@rikuTanide
Created October 14, 2017 13:47
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