diff options
| author | Fuwn <[email protected]> | 2021-05-12 23:48:04 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-05-12 23:48:04 -0700 |
| commit | c7a282bd3f96c0e3cc0807aabd5b7104df6effc9 (patch) | |
| tree | 64818c0add5762ba1ae83c8d9e7aa7bdb605f6f2 /src/db/models.rs | |
| download | lime-main.tar.xz lime-main.zip | |
Diffstat (limited to 'src/db/models.rs')
| -rw-r--r-- | src/db/models.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/db/models.rs b/src/db/models.rs new file mode 100644 index 0000000..d77da1d --- /dev/null +++ b/src/db/models.rs @@ -0,0 +1,18 @@ +// Copyright (C) 2021-2021 Fuwn +// SPDX-License-Identifier: GPL-3.0-only + +#[derive(Queryable, Debug, Clone)] +pub struct Link { + pub long: String, + pub short: String, + pub disabled: bool, + pub ip: String, + pub uses: i32, +} + +#[derive(Deserialize, Debug)] +pub struct LinkForm<'a> { + pub long: &'a str, + pub short: &'a str, + pub ip: &'a str, +} |