28 lines
512 B
Crystal
28 lines
512 B
Crystal
|
class Backend::Templates::Assignments
|
||
|
struct User
|
||
|
property first_name
|
||
|
property last_name
|
||
|
|
||
|
def initialize(@first_name : String, @last_name : String)
|
||
|
end
|
||
|
end
|
||
|
|
||
|
alias Student = {user: User, class: String}
|
||
|
|
||
|
struct Assignment
|
||
|
property teacher
|
||
|
property students
|
||
|
|
||
|
def initialize(@teacher : User, @students : Array(Student))
|
||
|
end
|
||
|
end
|
||
|
|
||
|
def initialize(
|
||
|
@time : Time,
|
||
|
@assignments : Array(Assignment)
|
||
|
)
|
||
|
end
|
||
|
|
||
|
ECR.def_to_s "templates/html/assignments.min.html.ecr"
|
||
|
end
|