mirror of
https://github.com/kuhyx/WUT_Computer_Science.git
synced 2026-11-20 09:52:24 +01:00
Remove "analitics"
This commit is contained in:
parent
b67849d045
commit
6cb0cfbe92
@ -1,24 +0,0 @@
|
|||||||
from User import User
|
|
||||||
from Ranting import Ranting
|
|
||||||
|
|
||||||
users = [
|
|
||||||
User(1, "Lola"),
|
|
||||||
User(2, "Tony"),
|
|
||||||
User(3, "Lorry"),
|
|
||||||
User(4, "Betty")
|
|
||||||
]
|
|
||||||
|
|
||||||
rantings = [
|
|
||||||
Ranting(1, 1, 1, 5, "15-06-2024 15:04:32"),
|
|
||||||
Ranting(2, 1, 2, 6, "15-06-2024 15:04:36"),
|
|
||||||
Ranting(3, 2, 1, 7, "15-06-2024 15:04:40"),
|
|
||||||
Ranting(4, 2, 2, 8, "15-06-2024 15:04:44"),
|
|
||||||
Ranting(5, 2, 3, 9, "15-06-2024 15:04:48"),
|
|
||||||
Ranting(6, 3, 1, 10, "15-06-2024 15:04:52"),
|
|
||||||
Ranting(7, 3, 2, 6, "15-06-2024 15:04:56"),
|
|
||||||
Ranting(8, 3, 3, 5, "15-06-2024 15:05:00"),
|
|
||||||
Ranting(9, 4, 1, 4, "15-06-2024 15:05:04"),
|
|
||||||
Ranting(10, 4, 2, 3, "15-06-2024 15:05:08"),
|
|
||||||
Ranting(11, 4, 3, 2, "15-06-2024 15:05:12"),
|
|
||||||
Ranting(12, 4, 4, 1, "15-06-2024 15:05:16")
|
|
||||||
]
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
class Ranting:
|
|
||||||
def __init__(self, id, movie_id, user_id, ranting, time):
|
|
||||||
self.id=id
|
|
||||||
self.movie_id=movie_id
|
|
||||||
self.user_id=user_id
|
|
||||||
self.ranting=ranting
|
|
||||||
self.time=time
|
|
||||||
@ -1,33 +0,0 @@
|
|||||||
from User import User
|
|
||||||
from Ranting import Ranting
|
|
||||||
from MockUps import users,rantings
|
|
||||||
|
|
||||||
|
|
||||||
def get_rantings():
|
|
||||||
return rantings
|
|
||||||
|
|
||||||
|
|
||||||
def get_number_of_ratings():
|
|
||||||
return get_rantings().__len__()
|
|
||||||
|
|
||||||
|
|
||||||
def get_rantings_in_time(begin_time, end_time):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def get_rantings_of_movie(movie_id):
|
|
||||||
results = []
|
|
||||||
for ranting in rantings:
|
|
||||||
if ranting.movie_id == movie_id:
|
|
||||||
results.append(ranting)
|
|
||||||
return results
|
|
||||||
|
|
||||||
|
|
||||||
def get_rantings_of_movie_numbers(movie_id):
|
|
||||||
return get_rantings_of_movie(movie_id).__len__()
|
|
||||||
|
|
||||||
|
|
||||||
def get_rantings_of_movie_in_time(movie_id, begin_time, end_time):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
|
|
||||||
class User:
|
|
||||||
def __init__(self,id,name):
|
|
||||||
self.id=id
|
|
||||||
self.name=name
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
from User import User
|
|
||||||
from Ranting import Ranting
|
|
||||||
from MockUps import users,rantings
|
|
||||||
|
|
||||||
|
|
||||||
def get_number_of_users():
|
|
||||||
return users.__len__()
|
|
||||||
|
|
||||||
|
|
||||||
def get_user_rantings(user_id):
|
|
||||||
results=[]
|
|
||||||
for ranting in rantings:
|
|
||||||
if ranting.user_id==user_id:
|
|
||||||
results.append(ranting)
|
|
||||||
return results
|
|
||||||
|
|
||||||
|
|
||||||
def get_user_rantings_number(user_id):
|
|
||||||
return get_user_rantings(user_id).__len__()
|
|
||||||
|
|
||||||
|
|
||||||
def get_user_rantings_in_time(user_id, begin, end):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,2 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user