Commit 3e413378 authored by nanahira's avatar nanahira

add BooleanColumn and fix things

parent 2707ab0f
......@@ -82,7 +82,7 @@ export const StringColumn = (
export const IntColumn = (
type: WithWidthColumnType,
options: PropertyOptions<string, ColumnWithWidthOptions> & {
options: PropertyOptions<number, ColumnWithWidthOptions> & {
unsigned?: boolean;
} = {},
): PropertyDecorator => {
......@@ -108,7 +108,7 @@ export const IntColumn = (
export const FloatColumn = (
type: WithPrecisionColumnType,
options: PropertyOptions<string, ColumnNumericOptions> & {
options: PropertyOptions<number, ColumnNumericOptions> & {
unsigned?: boolean;
} = {},
): PropertyDecorator => {
......@@ -158,6 +158,13 @@ export const EnumColumn = <T>(
]);
};
export const BoolColumn = (options: PropertyOptions<boolean> = {}): PropertyDecorator => MergePropertyDecorators([
Index(),
Column('boolean', columnDecoratorOptions(options)),
validatorDecorator(options),
swaggerDecorator(options, { type: Boolean }),
])
export const NotColumn = (
options: OpenAPIOptions<any> = {},
): PropertyDecorator =>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment