@@ -23,8 +23,8 @@ const vendorOverviewPageQuery = graphql`
|
||||
id
|
||||
name
|
||||
description
|
||||
serviceStartDate
|
||||
serviceTerminationDate
|
||||
serviceStartAt
|
||||
serviceTerminationAt
|
||||
serviceCriticality
|
||||
riskTier
|
||||
statusPageUrl
|
||||
@@ -79,18 +79,18 @@ function VendorOverviewPageContent({
|
||||
<Label className="text-sm">Service Start Date</Label>
|
||||
</div>
|
||||
<p className="text-sm text-gray-600">
|
||||
{new Date(data.node.serviceStartDate).toLocaleDateString()}
|
||||
{new Date(data.node.serviceStartAt).toLocaleDateString()}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{data.node?.serviceTerminationDate && (
|
||||
{data.node?.serviceTerminationAt && (
|
||||
<div className="space-y-2">
|
||||
<div className="flex items-center gap-2">
|
||||
<HelpCircle className="h-4 w-4 text-gray-400" />
|
||||
<Label className="text-sm">Service Termination Date</Label>
|
||||
<Label className="text-sm">Service Termination At</Label>
|
||||
</div>
|
||||
<p className="text-sm text-gray-600">
|
||||
{new Date(data.node.serviceTerminationDate).toLocaleDateString()}
|
||||
{new Date(data.node.serviceTerminationAt).toLocaleDateString()}
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<7a271eaf4694d17694f97b2326dd865f>>
|
||||
* @generated SignedSource<<180daebbc0ea7b69991d7bad2005ea13>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -23,8 +23,8 @@ export type VendorOverviewPageQuery$data = {
|
||||
readonly privacyPolicyUrl?: string | null | undefined;
|
||||
readonly riskTier?: RiskTier;
|
||||
readonly serviceCriticality?: ServiceCriticality;
|
||||
readonly serviceStartDate?: any;
|
||||
readonly serviceTerminationDate?: any | null | undefined;
|
||||
readonly serviceStartAt?: any;
|
||||
readonly serviceTerminationAt?: any | null | undefined;
|
||||
readonly statusPageUrl?: string | null | undefined;
|
||||
readonly termsOfServiceUrl?: string | null | undefined;
|
||||
readonly updatedAt?: any;
|
||||
@@ -75,14 +75,14 @@ v5 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "serviceStartDate",
|
||||
"name": "serviceStartAt",
|
||||
"storageKey": null
|
||||
},
|
||||
v6 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "serviceTerminationDate",
|
||||
"name": "serviceTerminationAt",
|
||||
"storageKey": null
|
||||
},
|
||||
v7 = {
|
||||
@@ -221,16 +221,16 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "ad3e9f79ffd96f45f653bc45311f162e",
|
||||
"cacheID": "d732d532dc450d86b3e790500c59e0ee",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "VendorOverviewPageQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query VendorOverviewPageQuery(\n $vendorId: ID!\n) {\n node(id: $vendorId) {\n __typename\n ... on Vendor {\n id\n name\n description\n serviceStartDate\n serviceTerminationDate\n serviceCriticality\n riskTier\n statusPageUrl\n termsOfServiceUrl\n privacyPolicyUrl\n createdAt\n updatedAt\n }\n id\n }\n}\n"
|
||||
"text": "query VendorOverviewPageQuery(\n $vendorId: ID!\n) {\n node(id: $vendorId) {\n __typename\n ... on Vendor {\n id\n name\n description\n serviceStartAt\n serviceTerminationAt\n serviceCriticality\n riskTier\n statusPageUrl\n termsOfServiceUrl\n privacyPolicyUrl\n createdAt\n updatedAt\n }\n id\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "8fe48d1033182deff812f17769927ef2";
|
||||
(node as any).hash = "0b7427451e68a951e2eecbc3f5c59456";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -118,8 +118,8 @@ type Vendor implements Node {
|
||||
description: String!
|
||||
createdAt: Datetime!
|
||||
updatedAt: Datetime!
|
||||
serviceStartDate: Datetime!
|
||||
serviceTerminationDate: Datetime
|
||||
serviceStartAt: Datetime!
|
||||
serviceTerminationAt: Datetime
|
||||
serviceCriticality: ServiceCriticality!
|
||||
riskTier: RiskTier!
|
||||
statusPageUrl: String
|
||||
@@ -355,8 +355,8 @@ input UpdateVendorInput {
|
||||
id: ID!
|
||||
name: String
|
||||
description: String
|
||||
serviceStartDate: Datetime
|
||||
serviceTerminationDate: Datetime
|
||||
serviceStartAt: Datetime
|
||||
serviceTerminationAt: Datetime
|
||||
serviceCriticality: ServiceCriticality
|
||||
riskTier: RiskTier
|
||||
statusPageUrl: String
|
||||
|
||||
@@ -245,18 +245,18 @@ type ComplexityRoot struct {
|
||||
}
|
||||
|
||||
Vendor struct {
|
||||
CreatedAt func(childComplexity int) int
|
||||
Description func(childComplexity int) int
|
||||
ID func(childComplexity int) int
|
||||
Name func(childComplexity int) int
|
||||
PrivacyPolicyURL func(childComplexity int) int
|
||||
RiskTier func(childComplexity int) int
|
||||
ServiceCriticality func(childComplexity int) int
|
||||
ServiceStartDate func(childComplexity int) int
|
||||
ServiceTerminationDate func(childComplexity int) int
|
||||
StatusPageURL func(childComplexity int) int
|
||||
TermsOfServiceURL func(childComplexity int) int
|
||||
UpdatedAt func(childComplexity int) int
|
||||
CreatedAt func(childComplexity int) int
|
||||
Description func(childComplexity int) int
|
||||
ID func(childComplexity int) int
|
||||
Name func(childComplexity int) int
|
||||
PrivacyPolicyURL func(childComplexity int) int
|
||||
RiskTier func(childComplexity int) int
|
||||
ServiceCriticality func(childComplexity int) int
|
||||
ServiceStartAt func(childComplexity int) int
|
||||
ServiceTerminationAt func(childComplexity int) int
|
||||
StatusPageURL func(childComplexity int) int
|
||||
TermsOfServiceURL func(childComplexity int) int
|
||||
UpdatedAt func(childComplexity int) int
|
||||
}
|
||||
|
||||
VendorConnection struct {
|
||||
@@ -1172,19 +1172,19 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
||||
|
||||
return e.complexity.Vendor.ServiceCriticality(childComplexity), true
|
||||
|
||||
case "Vendor.serviceStartDate":
|
||||
if e.complexity.Vendor.ServiceStartDate == nil {
|
||||
case "Vendor.serviceStartAt":
|
||||
if e.complexity.Vendor.ServiceStartAt == nil {
|
||||
break
|
||||
}
|
||||
|
||||
return e.complexity.Vendor.ServiceStartDate(childComplexity), true
|
||||
return e.complexity.Vendor.ServiceStartAt(childComplexity), true
|
||||
|
||||
case "Vendor.serviceTerminationDate":
|
||||
if e.complexity.Vendor.ServiceTerminationDate == nil {
|
||||
case "Vendor.serviceTerminationAt":
|
||||
if e.complexity.Vendor.ServiceTerminationAt == nil {
|
||||
break
|
||||
}
|
||||
|
||||
return e.complexity.Vendor.ServiceTerminationDate(childComplexity), true
|
||||
return e.complexity.Vendor.ServiceTerminationAt(childComplexity), true
|
||||
|
||||
case "Vendor.statusPageUrl":
|
||||
if e.complexity.Vendor.StatusPageURL == nil {
|
||||
@@ -1465,8 +1465,8 @@ type Vendor implements Node {
|
||||
description: String!
|
||||
createdAt: Datetime!
|
||||
updatedAt: Datetime!
|
||||
serviceStartDate: Datetime!
|
||||
serviceTerminationDate: Datetime
|
||||
serviceStartAt: Datetime!
|
||||
serviceTerminationAt: Datetime
|
||||
serviceCriticality: ServiceCriticality!
|
||||
riskTier: RiskTier!
|
||||
statusPageUrl: String
|
||||
@@ -1702,8 +1702,8 @@ input UpdateVendorInput {
|
||||
id: ID!
|
||||
name: String
|
||||
description: String
|
||||
serviceStartDate: Datetime
|
||||
serviceTerminationDate: Datetime
|
||||
serviceStartAt: Datetime
|
||||
serviceTerminationAt: Datetime
|
||||
serviceCriticality: ServiceCriticality
|
||||
riskTier: RiskTier
|
||||
statusPageUrl: String
|
||||
@@ -4927,10 +4927,10 @@ func (ec *executionContext) fieldContext_Mutation_createVendor(ctx context.Conte
|
||||
return ec.fieldContext_Vendor_createdAt(ctx, field)
|
||||
case "updatedAt":
|
||||
return ec.fieldContext_Vendor_updatedAt(ctx, field)
|
||||
case "serviceStartDate":
|
||||
return ec.fieldContext_Vendor_serviceStartDate(ctx, field)
|
||||
case "serviceTerminationDate":
|
||||
return ec.fieldContext_Vendor_serviceTerminationDate(ctx, field)
|
||||
case "serviceStartAt":
|
||||
return ec.fieldContext_Vendor_serviceStartAt(ctx, field)
|
||||
case "serviceTerminationAt":
|
||||
return ec.fieldContext_Vendor_serviceTerminationAt(ctx, field)
|
||||
case "serviceCriticality":
|
||||
return ec.fieldContext_Vendor_serviceCriticality(ctx, field)
|
||||
case "riskTier":
|
||||
@@ -7291,15 +7291,15 @@ func (ec *executionContext) fieldContext_Vendor_updatedAt(_ context.Context, fie
|
||||
return fc, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) _Vendor_serviceStartDate(ctx context.Context, field graphql.CollectedField, obj *types.Vendor) (ret graphql.Marshaler) {
|
||||
fc, err := ec.fieldContext_Vendor_serviceStartDate(ctx, field)
|
||||
func (ec *executionContext) _Vendor_serviceStartAt(ctx context.Context, field graphql.CollectedField, obj *types.Vendor) (ret graphql.Marshaler) {
|
||||
fc, err := ec.fieldContext_Vendor_serviceStartAt(ctx, field)
|
||||
if err != nil {
|
||||
return graphql.Null
|
||||
}
|
||||
ctx = graphql.WithFieldContext(ctx, fc)
|
||||
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
|
||||
ctx = rctx // use context from middleware stack in children
|
||||
return obj.ServiceStartDate, nil
|
||||
return obj.ServiceStartAt, nil
|
||||
})
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
@@ -7316,7 +7316,7 @@ func (ec *executionContext) _Vendor_serviceStartDate(ctx context.Context, field
|
||||
return ec.marshalNDatetime2timeᚐTime(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) fieldContext_Vendor_serviceStartDate(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
func (ec *executionContext) fieldContext_Vendor_serviceStartAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
fc = &graphql.FieldContext{
|
||||
Object: "Vendor",
|
||||
Field: field,
|
||||
@@ -7329,15 +7329,15 @@ func (ec *executionContext) fieldContext_Vendor_serviceStartDate(_ context.Conte
|
||||
return fc, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) _Vendor_serviceTerminationDate(ctx context.Context, field graphql.CollectedField, obj *types.Vendor) (ret graphql.Marshaler) {
|
||||
fc, err := ec.fieldContext_Vendor_serviceTerminationDate(ctx, field)
|
||||
func (ec *executionContext) _Vendor_serviceTerminationAt(ctx context.Context, field graphql.CollectedField, obj *types.Vendor) (ret graphql.Marshaler) {
|
||||
fc, err := ec.fieldContext_Vendor_serviceTerminationAt(ctx, field)
|
||||
if err != nil {
|
||||
return graphql.Null
|
||||
}
|
||||
ctx = graphql.WithFieldContext(ctx, fc)
|
||||
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
|
||||
ctx = rctx // use context from middleware stack in children
|
||||
return obj.ServiceTerminationDate, nil
|
||||
return obj.ServiceTerminationAt, nil
|
||||
})
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
@@ -7351,7 +7351,7 @@ func (ec *executionContext) _Vendor_serviceTerminationDate(ctx context.Context,
|
||||
return ec.marshalODatetime2ᚖtimeᚐTime(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) fieldContext_Vendor_serviceTerminationDate(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
func (ec *executionContext) fieldContext_Vendor_serviceTerminationAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
fc = &graphql.FieldContext{
|
||||
Object: "Vendor",
|
||||
Field: field,
|
||||
@@ -7718,10 +7718,10 @@ func (ec *executionContext) fieldContext_VendorEdge_node(_ context.Context, fiel
|
||||
return ec.fieldContext_Vendor_createdAt(ctx, field)
|
||||
case "updatedAt":
|
||||
return ec.fieldContext_Vendor_updatedAt(ctx, field)
|
||||
case "serviceStartDate":
|
||||
return ec.fieldContext_Vendor_serviceStartDate(ctx, field)
|
||||
case "serviceTerminationDate":
|
||||
return ec.fieldContext_Vendor_serviceTerminationDate(ctx, field)
|
||||
case "serviceStartAt":
|
||||
return ec.fieldContext_Vendor_serviceStartAt(ctx, field)
|
||||
case "serviceTerminationAt":
|
||||
return ec.fieldContext_Vendor_serviceTerminationAt(ctx, field)
|
||||
case "serviceCriticality":
|
||||
return ec.fieldContext_Vendor_serviceCriticality(ctx, field)
|
||||
case "riskTier":
|
||||
@@ -9440,7 +9440,7 @@ func (ec *executionContext) unmarshalInputUpdateVendorInput(ctx context.Context,
|
||||
asMap[k] = v
|
||||
}
|
||||
|
||||
fieldsInOrder := [...]string{"id", "name", "description", "serviceStartDate", "serviceTerminationDate", "serviceCriticality", "riskTier", "statusPageUrl", "termsOfServiceUrl", "privacyPolicyUrl"}
|
||||
fieldsInOrder := [...]string{"id", "name", "description", "serviceStartAt", "serviceTerminationAt", "serviceCriticality", "riskTier", "statusPageUrl", "termsOfServiceUrl", "privacyPolicyUrl"}
|
||||
for _, k := range fieldsInOrder {
|
||||
v, ok := asMap[k]
|
||||
if !ok {
|
||||
@@ -9468,20 +9468,20 @@ func (ec *executionContext) unmarshalInputUpdateVendorInput(ctx context.Context,
|
||||
return it, err
|
||||
}
|
||||
it.Description = data
|
||||
case "serviceStartDate":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("serviceStartDate"))
|
||||
case "serviceStartAt":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("serviceStartAt"))
|
||||
data, err := ec.unmarshalODatetime2ᚖtimeᚐTime(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
it.ServiceStartDate = data
|
||||
case "serviceTerminationDate":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("serviceTerminationDate"))
|
||||
it.ServiceStartAt = data
|
||||
case "serviceTerminationAt":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("serviceTerminationAt"))
|
||||
data, err := ec.unmarshalODatetime2ᚖtimeᚐTime(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
it.ServiceTerminationDate = data
|
||||
it.ServiceTerminationAt = data
|
||||
case "serviceCriticality":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("serviceCriticality"))
|
||||
data, err := ec.unmarshalOServiceCriticality2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋproboᚋcoredataᚐServiceCriticality(ctx, v)
|
||||
@@ -11356,13 +11356,13 @@ func (ec *executionContext) _Vendor(ctx context.Context, sel ast.SelectionSet, o
|
||||
if out.Values[i] == graphql.Null {
|
||||
out.Invalids++
|
||||
}
|
||||
case "serviceStartDate":
|
||||
out.Values[i] = ec._Vendor_serviceStartDate(ctx, field, obj)
|
||||
case "serviceStartAt":
|
||||
out.Values[i] = ec._Vendor_serviceStartAt(ctx, field, obj)
|
||||
if out.Values[i] == graphql.Null {
|
||||
out.Invalids++
|
||||
}
|
||||
case "serviceTerminationDate":
|
||||
out.Values[i] = ec._Vendor_serviceTerminationDate(ctx, field, obj)
|
||||
case "serviceTerminationAt":
|
||||
out.Values[i] = ec._Vendor_serviceTerminationAt(ctx, field, obj)
|
||||
case "serviceCriticality":
|
||||
out.Values[i] = ec._Vendor_serviceCriticality(ctx, field, obj)
|
||||
if out.Values[i] == graphql.Null {
|
||||
|
||||
@@ -239,31 +239,31 @@ type TaskStateTransitionEdge struct {
|
||||
}
|
||||
|
||||
type UpdateVendorInput struct {
|
||||
ID gid.GID `json:"id"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
ServiceStartDate *time.Time `json:"serviceStartDate,omitempty"`
|
||||
ServiceTerminationDate *time.Time `json:"serviceTerminationDate,omitempty"`
|
||||
ServiceCriticality *coredata.ServiceCriticality `json:"serviceCriticality,omitempty"`
|
||||
RiskTier *coredata.RiskTier `json:"riskTier,omitempty"`
|
||||
StatusPageURL *string `json:"statusPageUrl,omitempty"`
|
||||
TermsOfServiceURL *string `json:"termsOfServiceUrl,omitempty"`
|
||||
PrivacyPolicyURL *string `json:"privacyPolicyUrl,omitempty"`
|
||||
ID gid.GID `json:"id"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
ServiceStartAt *time.Time `json:"serviceStartAt,omitempty"`
|
||||
ServiceTerminationAt *time.Time `json:"serviceTerminationAt,omitempty"`
|
||||
ServiceCriticality *coredata.ServiceCriticality `json:"serviceCriticality,omitempty"`
|
||||
RiskTier *coredata.RiskTier `json:"riskTier,omitempty"`
|
||||
StatusPageURL *string `json:"statusPageUrl,omitempty"`
|
||||
TermsOfServiceURL *string `json:"termsOfServiceUrl,omitempty"`
|
||||
PrivacyPolicyURL *string `json:"privacyPolicyUrl,omitempty"`
|
||||
}
|
||||
|
||||
type Vendor struct {
|
||||
ID gid.GID `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
ServiceStartDate time.Time `json:"serviceStartDate"`
|
||||
ServiceTerminationDate *time.Time `json:"serviceTerminationDate,omitempty"`
|
||||
ServiceCriticality coredata.ServiceCriticality `json:"serviceCriticality"`
|
||||
RiskTier coredata.RiskTier `json:"riskTier"`
|
||||
StatusPageURL *string `json:"statusPageUrl,omitempty"`
|
||||
TermsOfServiceURL *string `json:"termsOfServiceUrl,omitempty"`
|
||||
PrivacyPolicyURL *string `json:"privacyPolicyUrl,omitempty"`
|
||||
ID gid.GID `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
ServiceStartAt time.Time `json:"serviceStartAt"`
|
||||
ServiceTerminationAt *time.Time `json:"serviceTerminationAt,omitempty"`
|
||||
ServiceCriticality coredata.ServiceCriticality `json:"serviceCriticality"`
|
||||
RiskTier coredata.RiskTier `json:"riskTier"`
|
||||
StatusPageURL *string `json:"statusPageUrl,omitempty"`
|
||||
TermsOfServiceURL *string `json:"termsOfServiceUrl,omitempty"`
|
||||
PrivacyPolicyURL *string `json:"privacyPolicyUrl,omitempty"`
|
||||
}
|
||||
|
||||
func (Vendor) IsNode() {}
|
||||
|
||||
@@ -41,17 +41,17 @@ func NewVendorEdge(v *coredata.Vendor) *VendorEdge {
|
||||
|
||||
func NewVendor(v *coredata.Vendor) *Vendor {
|
||||
return &Vendor{
|
||||
ID: v.ID,
|
||||
Name: v.Name,
|
||||
Description: v.Description,
|
||||
CreatedAt: v.CreatedAt,
|
||||
UpdatedAt: v.UpdatedAt,
|
||||
ServiceStartDate: v.ServiceStartDate,
|
||||
ServiceTerminationDate: v.ServiceTerminationDate,
|
||||
ServiceCriticality: v.ServiceCriticality,
|
||||
RiskTier: v.RiskTier,
|
||||
StatusPageURL: v.StatusPageURL,
|
||||
TermsOfServiceURL: v.TermsOfServiceURL,
|
||||
PrivacyPolicyURL: v.PrivacyPolicyURL,
|
||||
ID: v.ID,
|
||||
Name: v.Name,
|
||||
Description: v.Description,
|
||||
CreatedAt: v.CreatedAt,
|
||||
UpdatedAt: v.UpdatedAt,
|
||||
ServiceStartAt: v.ServiceStartAt,
|
||||
ServiceTerminationAt: v.ServiceTerminationAt,
|
||||
ServiceCriticality: v.ServiceCriticality,
|
||||
RiskTier: v.RiskTier,
|
||||
StatusPageURL: v.StatusPageURL,
|
||||
TermsOfServiceURL: v.TermsOfServiceURL,
|
||||
PrivacyPolicyURL: v.PrivacyPolicyURL,
|
||||
}
|
||||
}
|
||||
|
||||
2
pkg/probo/coredata/migrations/20250218T120000Z.sql
Normal file
2
pkg/probo/coredata/migrations/20250218T120000Z.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE vendors RENAME COLUMN service_start_date TO service_start_at;
|
||||
ALTER TABLE vendors RENAME COLUMN service_termination_date TO service_termination_at;
|
||||
@@ -28,19 +28,19 @@ import (
|
||||
|
||||
type (
|
||||
Vendor struct {
|
||||
ID gid.GID
|
||||
OrganizationID gid.GID
|
||||
Name string
|
||||
Description string
|
||||
ServiceStartDate time.Time
|
||||
ServiceTerminationDate *time.Time
|
||||
ServiceCriticality ServiceCriticality
|
||||
RiskTier RiskTier
|
||||
StatusPageURL *string
|
||||
TermsOfServiceURL *string
|
||||
PrivacyPolicyURL *string
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
ID gid.GID
|
||||
OrganizationID gid.GID
|
||||
Name string
|
||||
Description string
|
||||
ServiceStartAt time.Time
|
||||
ServiceTerminationAt *time.Time
|
||||
ServiceCriticality ServiceCriticality
|
||||
RiskTier RiskTier
|
||||
StatusPageURL *string
|
||||
TermsOfServiceURL *string
|
||||
PrivacyPolicyURL *string
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
Vendors []*Vendor
|
||||
@@ -56,8 +56,8 @@ func (v *Vendor) scan(r pgx.Row) error {
|
||||
&v.OrganizationID,
|
||||
&v.Name,
|
||||
&v.Description,
|
||||
&v.ServiceStartDate,
|
||||
&v.ServiceTerminationDate,
|
||||
&v.ServiceStartAt,
|
||||
&v.ServiceTerminationAt,
|
||||
&v.ServiceCriticality,
|
||||
&v.RiskTier,
|
||||
&v.StatusPageURL,
|
||||
@@ -80,8 +80,8 @@ SELECT
|
||||
organization_id,
|
||||
name,
|
||||
description,
|
||||
service_start_date,
|
||||
service_termination_date,
|
||||
service_start_at,
|
||||
service_termination_at,
|
||||
service_criticality,
|
||||
risk_tier,
|
||||
status_page_url,
|
||||
@@ -125,8 +125,8 @@ INSERT INTO
|
||||
organization_id,
|
||||
name,
|
||||
description,
|
||||
service_start_date,
|
||||
service_termination_date,
|
||||
service_start_at,
|
||||
service_termination_at,
|
||||
service_criticality,
|
||||
risk_tier,
|
||||
status_page_url,
|
||||
@@ -140,8 +140,8 @@ VALUES (
|
||||
@organization_id,
|
||||
@name,
|
||||
@description,
|
||||
@service_start_date,
|
||||
@service_termination_date,
|
||||
@service_start_at,
|
||||
@service_termination_at,
|
||||
@service_criticality,
|
||||
@risk_tier,
|
||||
@status_page_url,
|
||||
@@ -153,19 +153,19 @@ VALUES (
|
||||
`
|
||||
|
||||
args := pgx.NamedArgs{
|
||||
"vendor_id": v.ID,
|
||||
"organization_id": v.OrganizationID,
|
||||
"name": v.Name,
|
||||
"description": v.Description,
|
||||
"service_start_date": v.ServiceStartDate,
|
||||
"service_termination_date": v.ServiceTerminationDate,
|
||||
"service_criticality": v.ServiceCriticality,
|
||||
"risk_tier": v.RiskTier,
|
||||
"status_page_url": v.StatusPageURL,
|
||||
"terms_of_service_url": v.TermsOfServiceURL,
|
||||
"privacy_policy_url": v.PrivacyPolicyURL,
|
||||
"created_at": v.CreatedAt,
|
||||
"updated_at": v.UpdatedAt,
|
||||
"vendor_id": v.ID,
|
||||
"organization_id": v.OrganizationID,
|
||||
"name": v.Name,
|
||||
"description": v.Description,
|
||||
"service_start_at": v.ServiceStartAt,
|
||||
"service_termination_at": v.ServiceTerminationAt,
|
||||
"service_criticality": v.ServiceCriticality,
|
||||
"risk_tier": v.RiskTier,
|
||||
"status_page_url": v.StatusPageURL,
|
||||
"terms_of_service_url": v.TermsOfServiceURL,
|
||||
"privacy_policy_url": v.PrivacyPolicyURL,
|
||||
"created_at": v.CreatedAt,
|
||||
"updated_at": v.UpdatedAt,
|
||||
}
|
||||
_, err := conn.Exec(ctx, q, args)
|
||||
return err
|
||||
@@ -202,8 +202,8 @@ SELECT
|
||||
organization_id,
|
||||
name,
|
||||
description,
|
||||
service_start_date,
|
||||
service_termination_date,
|
||||
service_start_at,
|
||||
service_termination_at,
|
||||
service_criticality,
|
||||
risk_tier,
|
||||
status_page_url,
|
||||
|
||||
Reference in New Issue
Block a user