backend/model/entity/
base_layer_images.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
use diesel::AsChangeset;
use diesel::{Identifiable, Insertable, Queryable};
use uuid::Uuid;

use crate::schema::base_layer_images;

/// The `BaseLayerImages` entity.
#[derive(Identifiable, Queryable, Insertable, AsChangeset)]
#[diesel(table_name = base_layer_images)]
pub struct BaseLayerImages {
    /// The id of the image.
    pub id: Uuid,
    /// The path to the image on Nextcloud.
    pub path: String,
    /// The rotation in degrees (0-360) of the image on the map.
    pub rotation: f32,
    /// The scale of the image on the map.
    pub scale: f32,
    /// The layer the image is on.
    pub layer_id: Uuid,
    /// The x offset from the center of the map.
    pub x: i32,
    /// The y offset from the center of the map.
    pub y: i32,
}