40 lines
620 B
Go
40 lines
620 B
Go
package accounts
|
|
|
|
type (
|
|
AccountIDs struct {
|
|
AccountID int64
|
|
}
|
|
|
|
AccountShopIDs struct {
|
|
AccountIDs
|
|
Platform Platform
|
|
ShopID string
|
|
}
|
|
|
|
AccountShopListingIDs struct {
|
|
AccountShopIDs
|
|
ListingID string
|
|
}
|
|
)
|
|
|
|
func NewAccountIDs(acctID int64) AccountIDs {
|
|
return AccountIDs{
|
|
AccountID: acctID,
|
|
}
|
|
}
|
|
|
|
func (ids AccountIDs) ShopID(p Platform, id string) AccountShopIDs {
|
|
return AccountShopIDs{
|
|
AccountIDs: ids,
|
|
Platform: p,
|
|
ShopID: id,
|
|
}
|
|
}
|
|
|
|
func (ids AccountShopIDs) ListingID(id string) AccountShopListingIDs {
|
|
return AccountShopListingIDs{
|
|
AccountShopIDs: ids,
|
|
ListingID: id,
|
|
}
|
|
}
|