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
//! Model for tracking user-uploaded s3 keys
//!
use Deserialize;
use Serialize;
/// ModelUserData
///
/// Representation in the db for a
/// user's s3-uploaded file
///
/// Each user can store many `users_data` record(s)
///
/// # DB table
///
/// `users_data`
///
/// # Arguments
///
/// * `user_id` - `i32` - user id in the db
/// * `data_id` - `i32` - users_data.id in the db
/// * `filename` - `String` - data filename
/// * `data_type` - `String` - v2 - data type for restricting
/// upload types
/// * `size_in_bytes` - `i64` - size of the uploaded file
/// * `comments` - `String` - HTTP header can add comments to
/// the file
/// * `encoding` - `String` - file encoding
/// * `sloc` - `String` - full s3 location path
/// * `created_at` - `String` - original upload time
/// * `updated_at` - `String` - most recent update time
/// * `msg` - `String` - message for
/// helping debug from the client
///