Skip to content

Other Types

Andrey edited this page Oct 4, 2023 · 1 revision

DateTime as Microseconds

Can be in form of bigint or timespan in database

#[derive(SelectDbEntity)]
pub struct HistoryDtoModel {
    #[sql_type(bigint)]
    pub date_time: DateTimeAsMicroseconds,
}
#[derive(SelectDbEntity)]
pub struct HistoryDtoModel {
    #[sql_type(timestamp)]
    pub date_time: DateTimeAsMicroseconds,
}
Clone this wiki locally