| /trunk/opportunities/src/com/tearaway_tea/opportunities/model/OpportunityVO.as r3 | /trunk/opportunities/src/com/tearaway_tea/opportunities/model/OpportunityVO.as r11 | ||
| 1 | package com.tearaway_tea.opportunities.model | 1 | package com.tearaway_tea.opportunities.model |
|---|---|---|---|
| 2 | { | 2 | { |
| 3 | import mx.collections.ArrayCollection; | 3 | import mx.collections.ArrayCollection; |
| 4 | 4 | ||
| 5 | [Bindable] | 5 | [Bindable] |
| 6 | public class OpportunityVO | 6 | public class OpportunityVO |
| 7 | { | 7 | { |
| 8 | public static function createOpportunity(id : Number, name : String, | 8 | public static function createOpportunity(id : Number, name : String, |
| 9 | startDate : Date, endDate : Date, items : Array) : OpportunityVO | 9 | startDate : Date, endDate : Date) : OpportunityVO |
| 10 | { | 10 | { |
| 11 | var result : OpportunityVO = new OpportunityVO(); | 11 | var result : OpportunityVO = new OpportunityVO(); |
| 12 | result.id = id; | 12 | result.id = id; |
| 13 | result.name = name; | 13 | result.name = name; |
| 14 | result.startDate = startDate; | 14 | result.startDate = startDate; |
| 15 | result.endDate = endDate; | 15 | result.endDate = endDate; |
| 16 | result.items = new ArrayCollection(items); | 16 | result.lastUpdate = new Date(); |
| 17 | return result; | 17 | return result; |
| 18 | } | 18 | } |
| 19 | 19 | ||
| 20 | public var id : Number; | 20 | public var id : Number; |
| 21 | 21 | ||
| 22 | public var name : String; | 22 | public var name : String; |
| 23 | 23 | ||
| 24 | public var startDate : Date; | 24 | public var startDate : Date; |
| 25 | 25 | ||
| 26 | public var endDate : Date; | 26 | public var endDate : Date; |
| 27 | 27 | ||
| 28 | public var items : ArrayCollection; | 28 | public var lastUpdate : Date; |
| 29 | 29 | ||
| 30 | } | 30 | } |
| 31 | } | 31 | } |