-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
post_answer関数で複数回答のbulk insertをできるようにする
- Loading branch information
Showing
7 changed files
with
106 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.1 | ||
pub use super::{ | ||
answers::Entity as Answers, default_answer_titles::Entity as DefaultAnswerTitles, | ||
form_choices::Entity as FormChoices, form_meta_data::Entity as FormMetaData, | ||
form_questions::Entity as FormQuestions, form_webhooks::Entity as FormWebhooks, | ||
real_answers::Entity as RealAnswers, response_period::Entity as ResponsePeriod, | ||
}; | ||
pub use super::answers::Entity as Answers; | ||
pub use super::default_answer_titles::Entity as DefaultAnswerTitles; | ||
pub use super::form_choices::Entity as FormChoices; | ||
pub use super::form_meta_data::Entity as FormMetaData; | ||
pub use super::form_questions::Entity as FormQuestions; | ||
pub use super::form_webhooks::Entity as FormWebhooks; | ||
pub use super::real_answers::Entity as RealAnswers; | ||
pub use super::response_period::Entity as ResponsePeriod; | ||
pub use super::users::Entity as Users; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.1 | ||
use sea_orm::entity::prelude::*; | ||
|
||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] | ||
#[sea_orm(table_name = "users")] | ||
pub struct Model { | ||
#[sea_orm(primary_key)] | ||
pub id: i32, | ||
#[sea_orm(column_type = "Binary(BlobSize::Blob(Some(16)))")] | ||
pub uuid: Vec<u8>, | ||
pub name: String, | ||
} | ||
|
||
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] | ||
pub enum Relation { | ||
#[sea_orm(has_many = "super::answers::Entity")] | ||
Answers, | ||
} | ||
|
||
impl Related<super::answers::Entity> for Entity { | ||
fn to() -> RelationDef { | ||
Relation::Answers.def() | ||
} | ||
} | ||
|
||
impl ActiveModelBehavior for ActiveModel {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters