[Workman-svn] SF.net SVN: workman:[28] trunk/src/types.py
An unobtrusive time-tracking program for self-employed people
Status: Pre-Alpha
Brought to you by:
jmsilva
|
From: <jm...@us...> - 2011-10-21 00:50:51
|
Revision: 28
http://workman.svn.sourceforge.net/workman/?rev=28&view=rev
Author: jmsilva
Date: 2011-10-21 00:50:45 +0000 (Fri, 21 Oct 2011)
Log Message:
-----------
Some basic data types.
Added Paths:
-----------
trunk/src/types.py
Added: trunk/src/types.py
===================================================================
--- trunk/src/types.py (rev 0)
+++ trunk/src/types.py 2011-10-21 00:50:45 UTC (rev 28)
@@ -0,0 +1,62 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Workman - A time tracking program for self-employed people
+# Copyright (C) 2009 João Miguel Ferreira da Silva
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+'''
+
+Created on 2009/12/08
+
+@author: jms
+'''
+
+from datetime import datetime
+
+class Employer:
+ '''
+ Specifies an employer
+ '''
+ def __init__(self, name = '', rate = 0.0,
+ description = '', startDate = ''):
+ self.name = name
+ self.rate = rate
+ self.description = description
+ self.startDate = startDate
+
+
+class Project:
+ def __init__(self, name = '', employer = None, description = ''):
+ self.name = name
+ self.employer = employer
+ self.description = description
+
+class Session:
+ def __init__(self, project = None,
+ startTime = datetime.now(), endTime = None, message = ''):
+ self.project = project
+ self.startTime = startTime
+ self.endTime = endTime
+
+
+class Break:
+
+ def __init__(self, session = None,
+ startTime = datetime.now(), endTime = None, reason = ''):
+ self.session = session
+ self.startTime = startTime
+ self.endTime = endTime
+ self.reason = reason
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|