aboutsummaryrefslogtreecommitdiff
path: root/crates/whirl_db/src/models.rs
blob: dcef381db84512b7eb213f627d0d77c7074c7eb1 (plain) (blame)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// Copyright (C) 2021-2021 The Whirlsplash Collective
// SPDX-License-Identifier: GPL-3.0-only

//! Much of the documentation that you will see within this module is quoted
//! from
//! [this](http://dev.worlds.net/private/GammaDocs/WorldServer.html#RoomServer)
//! section from the Gamma Documents.

// use crate::db::schema::*;

// --------------
// | Queryables |
// --------------

#[derive(Queryable, Debug)]
pub struct SerialNumber {
  pub serial_number: String,
  pub user_name:     String,
  pub serial_status: i32,
}

#[derive(Queryable, Debug)]
pub struct UserRegistration {
  pub user_name_lower:   String,
  pub user_name:         String,
  pub serial_number:     String,
  pub password:          String,
  pub client_version:    String,
  pub account_status:    i32,
  pub registration_date: String,
  pub times_on:          i32,
  pub total_minutes:     i32,
  pub user_privileges:   i32,
}

#[derive(Queryable, Debug)]
pub struct UserProperty {
  pub user_name:             String,
  pub property_id:           i32,
  pub property_flags:        i32,
  pub property_access:       i32,
  pub property_string_value: String,
  pub property_binary_value: String,
}

// ---------------
// | Insertables |
// ---------------

// --------------
// | Updatables |
// --------------