Skip to content

Commit

Permalink
Add #[serde(rename_all)] directives.
Browse files Browse the repository at this point in the history
  • Loading branch information
emmiegit committed Sep 30, 2023
1 parent da5f9ba commit c3c9514
Show file tree
Hide file tree
Showing 22 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions deepwell/src/models/alias.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
#[sea_orm(table_name = "alias")]
pub struct Model {
#[sea_orm(primary_key)]
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/models/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
#[sea_orm(table_name = "file")]
pub struct Model {
#[sea_orm(primary_key)]
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/models/file_revision.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
#[sea_orm(table_name = "file_revision")]
pub struct Model {
#[sea_orm(primary_key)]
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/models/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
#[sea_orm(table_name = "filter")]
pub struct Model {
#[sea_orm(primary_key)]
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/models/page.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
#[sea_orm(table_name = "page")]
pub struct Model {
#[sea_orm(primary_key)]
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/models/page_attribution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
#[sea_orm(table_name = "page_attribution")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/models/page_category.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
#[sea_orm(table_name = "page_category")]
pub struct Model {
#[sea_orm(primary_key)]
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/models/page_connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
#[sea_orm(table_name = "page_connection")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/models/page_connection_missing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
#[sea_orm(table_name = "page_connection_missing")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/models/page_link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
#[sea_orm(table_name = "page_link")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/models/page_lock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
#[sea_orm(table_name = "page_lock")]
pub struct Model {
#[sea_orm(primary_key)]
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/models/page_parent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
#[sea_orm(table_name = "page_parent")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/models/page_revision.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
#[sea_orm(table_name = "page_revision")]
pub struct Model {
#[sea_orm(primary_key)]
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/models/page_vote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
#[sea_orm(table_name = "page_vote")]
pub struct Model {
#[sea_orm(primary_key)]
Expand Down
4 changes: 4 additions & 0 deletions deepwell/src/models/sea_orm_active_enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use serde::{Deserialize, Serialize};
#[derive(
Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Copy, Serialize, Deserialize,
)]
#[serde(rename_all = "kebab-case")]
#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "alias_type")]
pub enum AliasType {
#[sea_orm(string_value = "site")]
Expand All @@ -16,6 +17,7 @@ pub enum AliasType {
#[derive(
Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Copy, Serialize, Deserialize,
)]
#[serde(rename_all = "kebab-case")]
#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "file_revision_type")]
pub enum FileRevisionType {
#[sea_orm(string_value = "create")]
Expand All @@ -30,6 +32,7 @@ pub enum FileRevisionType {
#[derive(
Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Copy, Serialize, Deserialize,
)]
#[serde(rename_all = "kebab-case")]
#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "page_revision_type")]
pub enum PageRevisionType {
#[sea_orm(string_value = "create")]
Expand All @@ -46,6 +49,7 @@ pub enum PageRevisionType {
#[derive(
Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Copy, Serialize, Deserialize,
)]
#[serde(rename_all = "kebab-case")]
#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "user_type")]
pub enum UserType {
#[sea_orm(string_value = "bot")]
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/models/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
#[sea_orm(table_name = "session")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false, column_type = "Text")]
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/models/site.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
#[sea_orm(table_name = "site")]
pub struct Model {
#[sea_orm(primary_key)]
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/models/site_domain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
#[sea_orm(table_name = "site_domain")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false, column_type = "Text")]
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/models/site_member.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
#[sea_orm(table_name = "site_member")]
pub struct Model {
#[sea_orm(primary_key)]
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/models/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
#[sea_orm(table_name = "text")]
pub struct Model {
#[sea_orm(
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/models/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
#[sea_orm(table_name = "user")]
pub struct Model {
#[sea_orm(primary_key)]
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/models/user_bot_owner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
#[sea_orm(table_name = "user_bot_owner")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
Expand Down

0 comments on commit c3c9514

Please sign in to comment.