backend/model/entity/base_layer_images.rs
1use diesel::AsChangeset;
2use diesel::{Identifiable, Insertable, Queryable};
3use uuid::Uuid;
4
5use crate::schema::base_layer_images;
6
7/// The `BaseLayerImages` entity.
8#[derive(Identifiable, Queryable, Insertable, AsChangeset)]
9#[diesel(table_name = base_layer_images)]
10pub struct BaseLayerImages {
11 /// The id of the image.
12 pub id: Uuid,
13 /// The path to the image on Nextcloud.
14 pub path: String,
15 /// The rotation in degrees (0-360) of the image on the map.
16 pub rotation: f32,
17 /// The scale of the image on the map.
18 pub scale: f32,
19 /// The layer the image is on.
20 pub layer_id: Uuid,
21 /// The x offset from the center of the map.
22 pub x: i32,
23 /// The y offset from the center of the map.
24 pub y: i32,
25}