import CourseBookRepository = require ( './CourseBookRepository' ) ; import CourseBook from './model/CourseBook' ; export function getAll ( ) { return CourseBookRepository . findAll ( ) ; } export function getRecent ( ) { return CourseBookRepository . findRecent ( ) ; } export function get ( year , semester ) { return CourseBookRepository . findByYearAndSemester ( year , semester ) ; } export function add ( courseBook ) { return CourseBookRepository . insert ( courseBook ) ; } export function modifyUpdatedAt ( courseBook , updatedAt ) { courseBook . updated_at = updatedAt ; return CourseBookRepository . update ( courseBook ) ; }