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

editoast: create STDCM search env data model and CRUD #8168

Closed
Castavo opened this issue Jul 24, 2024 · 0 comments · Fixed by #8257
Closed

editoast: create STDCM search env data model and CRUD #8168

Castavo opened this issue Jul 24, 2024 · 0 comments · Fixed by #8257
Assignees
Labels
area:editoast Work on Editoast Service kind:enabler-task Enabler Story

Comments

@Castavo
Copy link
Contributor

Castavo commented Jul 24, 2024

Data Model

struct StdcmSearchEnvironment{
    infra_id: i64,
    electrical_profile_set_id: Option<i64>,
    work_schedule_group_id: Option<i64>,
    timetable_id: i64,
    simulation_window_begin: NaiveDateTime,
    simulation_window_end: NaiveDateTime
}

CRUD

  • POST, for creation, delete existing envs.
  • GET, no id, returns the latest object that exists, based on simulation_window_begin and end.
    If no object exists, returns a 500

We add a CLI to create an environment, and we add scripts like for railjson import and such.

How do we handle the fact that the env references other objects?

In the DB: forbid the deletion of the infra and timetable that are associated.
People will get 500s, it's okay, in the end it will be prevented by permissions added on objects if all goes well.

@Castavo Castavo self-assigned this Jul 24, 2024
@Castavo Castavo added area:editoast Work on Editoast Service kind:enabler-task Enabler Story labels Jul 24, 2024
@Castavo Castavo changed the title editoast: create STDCM env data model and CRUD editoast: create STDCM search env data model and CRUD Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:editoast Work on Editoast Service kind:enabler-task Enabler Story
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant