• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

doitsu2014 / my-cms / 14187034714

01 Apr 2025 04:12AM UTC coverage: 59.597% (+20.5%) from 39.058%
14187034714

push

github

web-flow
Feature/support multi language (#19)

* Enhance entity structure: add category and post translations, update migration dependencies, and improve README guidelines

* Add support for category translations: update create and modify handlers, requests, and tests

add TODO

* Add category translations support: update create, modify, and read handlers, and adjust request structures

* Refactor category translation requests: remove slug field and update handlers to set category ID for translations

* Add support for post translations: update create and modify requests, handlers, and models

* Update CI configuration and scripts for improved coverage reporting and toolchain management

* Update coverage configuration and scripts for improved reporting and toolchain management

* Update CI and coverage configurations for improved reporting and ignore patterns

* Update CI configuration and coverage scripts for improved reporting and cleanup

* Remove unused coverage step from CI configuration

* Update CI configuration to use fixed lcov report paths for coverage uploads

197 of 396 new or added lines in 19 files covered. (49.75%)

71 existing lines in 11 files now uncovered.

975 of 1636 relevant lines covered (59.6%)

26.2 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

16.67
/application_core/src/entities/post_translations.rs
1
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.15
2

3
use sea_orm::entity::prelude::*;
4
use serde::{Deserialize, Serialize};
5

6
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)]
45✔
7
#[sea_orm(table_name = "post_translations")]
8
#[serde(rename_all = "camelCase")]
9
pub struct Model {
10
    #[sea_orm(primary_key, auto_increment = false)]
11
    pub id: Uuid,
12
    pub post_id: Uuid,
13
    pub language_code: String,
14
    pub title: String,
15
    pub slug: String,
16
    #[sea_orm(column_type = "Text")]
17
    pub preview_content: String,
18
    #[sea_orm(column_type = "Text")]
19
    pub content: String,
20
}
21

NEW
22
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
×
23
pub enum Relation {
24
    #[sea_orm(
25
        belongs_to = "super::posts::Entity",
26
        from = "Column::PostId",
27
        to = "super::posts::Column::Id",
28
        on_update = "NoAction",
29
        on_delete = "Cascade"
30
    )]
31
    Posts,
32
}
33

34
impl Related<super::posts::Entity> for Entity {
NEW
35
    fn to() -> RelationDef {
×
NEW
36
        Relation::Posts.def()
×
NEW
37
    }
×
38
}
39

40
impl ActiveModelBehavior for ActiveModel {}
41

NEW
42
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelatedEntity)]
×
43
pub enum RelatedEntity {
44
    #[sea_orm(entity = "super::posts::Entity")]
45
    Posts,
46
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc