Skip to content

Commit

Permalink
Remove PLAN_TAG_REVISION_STATE from planTag
Browse files Browse the repository at this point in the history
  • Loading branch information
manelcecs committed Sep 14, 2023
1 parent 9df1cdc commit fffe911
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/db/models/plan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export type PlanId = Brand<number, { readonly s: unique symbol }, 'plan.id'>;

export const PLAN_ID = brandedType<number, PlanId>(t.number);

const PLAN_REVISION_STATE = t.keyof({
export const PLAN_REVISION_STATE = t.keyof({
projectsOnly: null,
none: null,
planDataAndProjects: null,
Expand Down
10 changes: 2 additions & 8 deletions src/db/models/planTag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { brandedType } from '../../util/io-ts';
import type { Brand } from '../../util/types';
import { defineIDModel } from '../util/id-model';
import { PLAN_ID } from './plan';
import { PLAN_REVISION_STATE } from './plan';

export type PlanTagId = Brand<
number,
Expand All @@ -19,13 +20,6 @@ const PLAN_TAG_PUBLISH_TYPE = t.keyof({
custom: null,
});

export const PLAN_TAG_REVISION_STATE = t.keyof({
none: null,
planDataAndProjects: null,
planDataOnly: null,
projectsOnly: null,
});

export default defineIDModel({
tableName: 'planTag',
fields: {
Expand All @@ -42,7 +36,7 @@ export default defineIDModel({
},
optional: {
comment: { kind: 'checked', type: t.string },
revisionState: { kind: 'checked', type: PLAN_TAG_REVISION_STATE },
revisionState: { kind: 'checked', type: PLAN_REVISION_STATE },
type: { kind: 'checked', type: PLAN_TAG_PUBLISH_TYPE },
},
},
Expand Down

0 comments on commit fffe911

Please sign in to comment.