60 lines
1.8 KiB
Go
60 lines
1.8 KiB
Go
package domain
|
|
|
|
import "time"
|
|
|
|
type Customer struct {
|
|
ID int64 `json:"id"`
|
|
Name string `json:"name"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
type Project struct {
|
|
ID int64 `json:"id"`
|
|
CustomerID int64 `json:"customer_id"`
|
|
Name string `json:"name"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
type Location struct {
|
|
ID int64 `json:"id"`
|
|
CustomerID int64 `json:"customer_id"`
|
|
Name string `json:"name"`
|
|
Kind *string `json:"kind,omitempty"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
type Lot struct {
|
|
ID int64 `json:"id"`
|
|
Code string `json:"code"`
|
|
Description *string `json:"description,omitempty"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
type Asset struct {
|
|
ID int64 `json:"id"`
|
|
ProjectID int64 `json:"project_id"`
|
|
LocationID *int64 `json:"location_id,omitempty"`
|
|
Name string `json:"name"`
|
|
Vendor *string `json:"vendor,omitempty"`
|
|
Model *string `json:"model,omitempty"`
|
|
VendorSerial string `json:"vendor_serial"`
|
|
AssetTag *string `json:"asset_tag,omitempty"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
type Component struct {
|
|
ID int64 `json:"id"`
|
|
LotID *int64 `json:"lot_id,omitempty"`
|
|
Vendor *string `json:"vendor,omitempty"`
|
|
Model *string `json:"model,omitempty"`
|
|
VendorSerial string `json:"vendor_serial"`
|
|
FirstSeenAt *time.Time `json:"first_seen_at,omitempty"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|