Converts the value of type T into the database-compatible type S
value
T
S
@override int? encode(DateTime? value) { return value?.millisecondsSinceEpoch; }