forked from vieter-v/vieter
29 lines
546 B
Coq
29 lines
546 B
Coq
|
module models
|
||
|
|
||
|
import time
|
||
|
|
||
|
pub struct BuildLog {
|
||
|
pub:
|
||
|
id int [primary; sql: serial]
|
||
|
repo_id int [nonull]
|
||
|
start_time time.Time [nonull]
|
||
|
end_time time.Time [nonull]
|
||
|
arch string [nonull]
|
||
|
exit_code int [nonull]
|
||
|
}
|
||
|
|
||
|
// str returns a string representation.
|
||
|
pub fn (bl &BuildLog) str() string {
|
||
|
mut parts := [
|
||
|
'id: $bl.id',
|
||
|
'repo id: $bl.repo_id',
|
||
|
'start time: $bl.start_time',
|
||
|
'end time: $bl.end_time',
|
||
|
'arch: $bl.arch',
|
||
|
'exit code: $bl.exit_code',
|
||
|
]
|
||
|
str := parts.join('\n')
|
||
|
|
||
|
return str
|
||
|
}
|