veloren_server/persistence/
models.rs

1pub struct Character {
2    pub character_id: i64,
3    #[expect(dead_code)]
4    pub player_uuid: String,
5    pub alias: String,
6    pub waypoint: Option<String>,
7    pub hardcore: i64,
8}
9
10#[derive(Debug)]
11pub struct Item {
12    pub item_id: i64,
13    pub parent_container_item_id: i64,
14    pub item_definition_id: String,
15    /// `u32::MAX` must fit inside this type
16    pub stack_size: i64,
17    pub position: String,
18    pub properties: String,
19}
20
21pub struct Body {
22    #[expect(dead_code)]
23    pub body_id: i64,
24    pub variant: String,
25    pub body_data: String,
26}
27
28pub struct SkillGroup {
29    pub entity_id: i64,
30    pub skill_group_kind: String,
31    pub earned_exp: i64,
32    pub spent_exp: i64,
33    pub skills: String,
34    pub hash_val: Vec<u8>,
35}
36
37pub struct Pet {
38    pub database_id: i64,
39    // TODO: add ability to store and change pet names
40    //
41    // Originally we just stored hardcoded English names here, but that is a bit
42    // impossible now that we translate names.
43    //
44    // If we do implement such functionality, we probably want to use something
45    // similar to current npcs that have both translated and hardcoded names
46    // using `name-misc-with-alias-template`.
47    // Or even some better system for displaying complex names such as this.
48    #[expect(unused)]
49    pub name: String,
50    pub body_variant: String,
51    pub body_data: String,
52}
53
54pub struct AbilitySets {
55    #[expect(dead_code)]
56    pub entity_id: i64,
57    pub ability_sets: String,
58}