casdoor_sdk_rust/cert/
models.rs

1use serde::{Deserialize, Serialize};
2
3use crate::Model;
4
5#[derive(Debug, Clone, Serialize, Deserialize, Default, PartialEq, Eq)]
6#[serde(rename_all = "camelCase", default)]
7pub struct Cert {
8    owner: String,
9    name: String,
10    created_time: String,
11
12    display_name: String,
13    scope: String,
14    type_: String,
15    crypto_algorithm: String,
16    bit_size: i32,
17    expire_in_years: i32,
18
19    certificate: String,
20    private_key: String,
21    authority_public_key: String,
22    authority_root_public_key: String,
23}
24
25impl Model for Cert {
26    fn ident() -> &'static str {
27        "cert"
28    }
29    fn plural_ident() -> &'static str {
30        "certs"
31    }
32    fn support_update_columns() -> bool {
33        false
34    }
35    fn owner(&self) -> &str {
36        &self.owner
37    }
38    fn name(&self) -> &str {
39        &self.name
40    }
41}