Model from inline to class