Skip to content

Commit ecdb965

Browse files
author
Jeff Mataya
committed
Start modeling out the Phoenix interaction
1 parent 9f71e1b commit ecdb965

File tree

4 files changed

+45
-0
lines changed

4 files changed

+45
-0
lines changed

remote/models/phoenix/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Phoenix
2+
3+
Contains the models that exist in the Phoenix database.

remote/models/phoenix/channel.go

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package phoenix
2+
3+
import "time"
4+
5+
// Channel represents an avenue for purchasing on the Fox Platform. This could
6+
// be a website (theperfectgourmet.com), third-party (Amazon), or sale type (B2B).
7+
type Channel struct {
8+
ID int64
9+
Name string
10+
PurchaseLocation PurchaseLocation
11+
CreatedAt time.Time
12+
UpdatedAt time.Time
13+
}
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package phoenix
2+
3+
const (
4+
// PurchaseOnFox means that the channel's transactions happen on the platform.
5+
PurchaseOnFox = iota
6+
7+
// PurchaseOffFox means the channel's transactions happen off the platform.
8+
PurchaseOffFox
9+
)
10+
11+
// PurchaseLocation signifies whether a channel's transactions occur on the
12+
// platform, or whether they occur in a different location.
13+
type PurchaseLocation int64

remote/models/phoenix/site.go

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package phoenix
2+
3+
import "time"
4+
5+
// Site represents the web presence of a place where produts in a channel are
6+
// purchased. It also maintains the relationship between a channel and the
7+
// catalog that contains the products.
8+
type Site struct {
9+
ID int64
10+
Name string
11+
Host string
12+
CatalogID int64
13+
ChannelID int64
14+
CreatedAt time.Time
15+
UpdatedAt time.Time
16+
}

0 commit comments

Comments
 (0)