mirror of https://gitlab.com/pamhyr/pamhyr2
34 lines
754 B
Python
34 lines
754 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
import os
|
|
from datetime import datetime
|
|
from Model.Serializable import Serializable
|
|
|
|
class Study(Serializable):
|
|
def __init__(self):
|
|
# Serialization information
|
|
super(Study, self).__init__("")
|
|
self.filename = ""
|
|
|
|
# Study general information
|
|
self.name = ""
|
|
self.description = ""
|
|
|
|
self.creation_date = datetime.now()
|
|
self.last_modification_date = datetime.now()
|
|
self.last_save_date = datetime.now()
|
|
|
|
# Study data
|
|
self.river = None
|
|
|
|
@classmethod
|
|
def new(cls):
|
|
return cls()
|
|
|
|
@classmethod
|
|
def new(cls, name, description):
|
|
me = cls()
|
|
me.name = name
|
|
me.description = description
|
|
return me
|