WorkFerret/tables/session: Difference between revisions
< WorkFerret | tables
Jump to navigation
Jump to search
(ok, that's the rest of the fields) |
(ID_Prev -> Seq) |
||
Line 2: | Line 2: | ||
* '''History''': | * '''History''': | ||
** '''2010-01-28''' Adapted from MS Access version | ** '''2010-01-28''' Adapted from MS Access version | ||
** '''2010-01-29''' Changed ID_Prev to Seq; moved next to Sort | |||
* '''Fields''': | * '''Fields''': | ||
** '''TimeAdd''': time added to (finish-start), typically an approximation for when start/finish times aren't known | ** '''TimeAdd''': time added to (finish-start), typically an approximation for when start/finish times aren't known | ||
Line 14: | Line 15: | ||
`WhenFinish` DATETIME DEFAULT NULL COMMENT "when Session finished (optional)", | `WhenFinish` DATETIME DEFAULT NULL COMMENT "when Session finished (optional)", | ||
`Sort` DECIMAL(7,4) DEFAULT NULL COMMENT "when there's no specific time, use this to sort sessions", | `Sort` DECIMAL(7,4) DEFAULT NULL COMMENT "when there's no specific time, use this to sort sessions", | ||
`Seq` INT(4) NOT NULL COMMENT "order in which this line was added (within a Project)", | |||
`TimeAdd` INT(4) DEFAULT NULL COMMENT "time to add, in minutes", | `TimeAdd` INT(4) DEFAULT NULL COMMENT "time to add, in minutes", | ||
`TimeSub` INT(4) DEFAULT NULL COMMENT "time to subtract, in minutes", | `TimeSub` INT(4) DEFAULT NULL COMMENT "time to subtract, in minutes", | ||
Line 21: | Line 23: | ||
`CostLine` DECIMAL(9,2) NOT NULL COMMENT "final cost for this line", | `CostLine` DECIMAL(9,2) NOT NULL COMMENT "final cost for this line", | ||
`CostBal` DECIMAL(9,2) DEFAULT NULL COMMENT "cost balance after this line is added in", | `CostBal` DECIMAL(9,2) DEFAULT NULL COMMENT "cost balance after this line is added in", | ||
`Descr` VARCHAR(127) DEFAULT NULL COMMENT "session summary, for invoices", | `Descr` VARCHAR(127) DEFAULT NULL COMMENT "session summary, for invoices", | ||
`Notes` VARCHAR(255) DEFAULT NULL COMMENT "longer notes, for reference", | `Notes` VARCHAR(255) DEFAULT NULL COMMENT "longer notes, for reference", |
Revision as of 11:55, 29 January 2010
About
- History:
- 2010-01-28 Adapted from MS Access version
- 2010-01-29 Changed ID_Prev to Seq; moved next to Sort
- Fields:
- TimeAdd: time added to (finish-start), typically an approximation for when start/finish times aren't known
- TimeSub: time subtracted from (finish-start), typically for distractions in the middle of a work session
- TimeTotal = WhenFinish - WhenStart + TimeAdd - TimeSub
SQL
<mysql>DROP TABLE IF EXISTS `session`; CREATE TABLE `session` (
`ID` INT(4) NOT NULL AUTO_INCREMENT, `ID_Proj` INT(4) NOT NULL COMMENT "Project to which this session applies", `WhenStart` DATETIME DEFAULT NULL COMMENT "when Session started (optional)", `WhenFinish` DATETIME DEFAULT NULL COMMENT "when Session finished (optional)", `Sort` DECIMAL(7,4) DEFAULT NULL COMMENT "when there's no specific time, use this to sort sessions", `Seq` INT(4) NOT NULL COMMENT "order in which this line was added (within a Project)", `TimeAdd` INT(4) DEFAULT NULL COMMENT "time to add, in minutes", `TimeSub` INT(4) DEFAULT NULL COMMENT "time to subtract, in minutes", `TimeTotal` INT(4) DEFAULT NULL COMMENT "calculated total time for this session", `ID_Rate` INT(4) DEFAULT NULL COMMENT "rate ID, for tracking usage -- ignored by billing", `BillRate` DECIMAL(9,2) DEFAULT NULL COMMENT "rate, if using time", `CostLine` DECIMAL(9,2) NOT NULL COMMENT "final cost for this line", `CostBal` DECIMAL(9,2) DEFAULT NULL COMMENT "cost balance after this line is added in", `Descr` VARCHAR(127) DEFAULT NULL COMMENT "session summary, for invoices", `Notes` VARCHAR(255) DEFAULT NULL COMMENT "longer notes, for reference", `WhenEntered` DATETIME NOT NULL COMMENT "when this record was first created", `WhenEdited` DATETIME DEFAULT NULL COMMENT "when an existing record was modified by hand", `WhenFigured` DATETIME DEFAULT NULL COMMENT "when the balance was last calculated", PRIMARY KEY(`ID`)
) ENGINE=MyISAM;</mysql>