Untitled

mail@pastecode.io avatar
unknown
python
2 years ago
1.0 kB
3
Indexable
Never
import datetime
import enum
import uuid
from enum import Enum
from datetime import date

class NoteValue(Enum):

    TWO_ZERO = '2.0'
    TWO_HALF = '2.5'
    THREE_ZERO = '3.0'
    THREE_HALF = '3.5'
    FOUR_ZERO = '4.0'
    FOUR_HALF = '4.5'
    FIVE_ZERO = '5.0'

class ExamType(Enum):

    TEST = 'TEST'
    EXAM = 'EXAM'
    PASS = 'PASS'
    PROJECT = 'PROJECT'


class Term(Enum):

    FIRST = 1
    SECOND = 2
    THIRD = 3
    BOARD_EXAM = 4


class Note:

    def __init__(self, note_value: enum, exam_type: enum, term: enum, uuid: object, date: object):

        self.note_value = note_value
        self.exam_type = exam_type
        self.term = term
        self.uuid = uuid
        self.date = date

    def __repr__(self):

        return f"Note: UUID({uuid.uuid4()}), value: {self.note_value.value}, type of exam: {self.exam_type.value}, " \
               f"term: {self.term.name}, date: {date.today()}"


objNote = Note(NoteValue.FIVE_ZERO, ExamType.TEST, Term.FIRST, uuid, date)

print(objNote.__repr__())