aboutsummaryrefslogtreecommitdiff
path: root/lib/models/snowflake.ml
blob: ed80b62699408df28b2d2ec0456d3230b8e062bb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
type t = {
    id: int;
    as_string: string;
}

let to_int t = t.id
let to_string t = t.as_string

let from_int i = {
    id = i;
    as_string = string_of_int i;
}
let from_string s = {
    id = int_of_string s;
    as_string = s;
}