Rating
Ratings on machinery.
Rating
dataclass
Bases: BaseMixin
A person's rating on a machine.
Attributes:
| Name | Type | Description |
|---|---|---|
person_id |
str
|
person identifier (in persons) |
machine_id |
str
|
machine identifier (in machines) |
certified |
bool
|
whether person is certified on machine |
Source code in src/snailz/rating.py
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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | |
make(params, persons, machines)
classmethod
Construct multiple ratings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
params
|
Parameters
|
Data generation parameters. |
required |
persons
|
list[Person]
|
list of people who have ratings. |
required |
machines
|
list[Machine]
|
list of machines that people are rated for. |
required |
Returns:
| Type | Description |
|---|---|
list[Rating]
|
List of ratings. |
Source code in src/snailz/rating.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | |
table_name()
classmethod
Database table name.
Source code in src/snailz/rating.py
62 63 64 65 66 | |