• 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

66.67
/application_core/src/entities/category_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)]
63✔
7
#[sea_orm(table_name = "category_translations")]
8
#[serde(rename_all = "camelCase")]
9
pub struct Model {
10
    #[sea_orm(primary_key, auto_increment = false)]
11
    pub id: Uuid,
12
    pub category_id: Uuid,
13
    pub language_code: String,
14
    pub display_name: String,
15
    #[sea_orm(unique)]
16
    pub slug: String,
17
}
18

NEW
19
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
×
20
pub enum Relation {
21
    #[sea_orm(
22
        belongs_to = "super::categories::Entity",
23
        from = "Column::CategoryId",
24
        to = "super::categories::Column::Id",
25
        on_update = "NoAction",
26
        on_delete = "Cascade"
27
    )]
28
    Categories,
29
}
30

31
impl Related<super::categories::Entity> for Entity {
32
    fn to() -> RelationDef {
9✔
33
        Relation::Categories.def()
9✔
34
    }
9✔
35
}
36

37
impl ActiveModelBehavior for ActiveModel {}
38

NEW
39
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelatedEntity)]
×
40
pub enum RelatedEntity {
41
    #[sea_orm(entity = "super::categories::Entity")]
42
    Categories,
43
}
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