Skip to main content

windmill_api/models/
datatable_migration.rs

1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.752.0
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct DatatableMigration {
16    #[serde(rename = "datatable")]
17    pub datatable: String,
18    #[serde(rename = "timestamp")]
19    pub timestamp: i64,
20    #[serde(rename = "name")]
21    pub name: String,
22    #[serde(rename = "code_up")]
23    pub code_up: String,
24    #[serde(rename = "code_down", skip_serializing_if = "Option::is_none")]
25    pub code_down: Option<String>,
26}
27
28impl DatatableMigration {
29    pub fn new(datatable: String, timestamp: i64, name: String, code_up: String) -> DatatableMigration {
30        DatatableMigration {
31            datatable,
32            timestamp,
33            name,
34            code_up,
35            code_down: None,
36        }
37    }
38}
39