Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for mysql type DATE #213

Closed
efrain2007 opened this issue Sep 30, 2021 · 2 comments · Fixed by #207
Closed

Support for mysql type DATE #213

efrain2007 opened this issue Sep 30, 2021 · 2 comments · Fixed by #207
Assignees

Comments

@efrain2007
Copy link

use chrono::NaiveDate;
use sea_orm::entity::prelude::*;
use sea_orm::DeriveEntityModel;

#[derive(Debug, Clone, PartialEq, DeriveEntityModel)]
#[sea_orm(table_name = "currency_exchange_rate")]
pub struct Model {
#[sea_orm(primary_key)]
pub currency_exchange_rate_id: i64,
pub from_currency: String,
pub to_currency: String,
pub rate_date: NaiveDate,
pub rate: f64,
}

#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {}

impl ActiveModelBehavior for ActiveModel {}

@billy1624
Copy link
Member

billy1624 commented Sep 30, 2021

Hey @efrain2007, we are working on the support of chrono::Date at #207.

Duplicate of #206.

@billy1624 billy1624 self-assigned this Sep 30, 2021
@billy1624 billy1624 linked a pull request Sep 30, 2021 that will close this issue
@tyt2y3
Copy link
Member

tyt2y3 commented Oct 1, 2021

0.2.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants