export class ProductOptionEntity extends Schema.TaggedClass<ProductOptionEntity>(
"ProductOptionEntity",
)(
"ProductOptionEntity",
Schema.Struct({
...Struct.omit(ProductOption.fields, "id", "values"),
id: Schema.optionalWith(ProductOptionId, {
default: () => ProductOptionId.make(generateId()),
}),
values: Schema.Array(Schema.string),
// ^^^ For example, how can I make sure here these strings are not ""
}),
) {}
export class ProductOptionEntity extends Schema.TaggedClass<ProductOptionEntity>(
"ProductOptionEntity",
)(
"ProductOptionEntity",
Schema.Struct({
...Struct.omit(ProductOption.fields, "id", "values"),
id: Schema.optionalWith(ProductOptionId, {
default: () => ProductOptionId.make(generateId()),
}),
values: Schema.Array(Schema.string),
// ^^^ For example, how can I make sure here these strings are not ""
}),
) {}