add send none state to newsletter config
This commit is contained in:
parent
63f206cc6a
commit
f1395357c5
6 changed files with 21 additions and 23 deletions
|
@ -1,5 +1,5 @@
|
|||
import { Column, Entity, ManyToOne, PrimaryColumn } from "typeorm";
|
||||
import { NewsletterConfigType } from "../../enums/newsletterConfigType";
|
||||
import { NewsletterConfigEnum } from "../../enums/newsletterConfigEnum";
|
||||
import { communicationType } from "./communicationType";
|
||||
|
||||
@Entity()
|
||||
|
@ -11,15 +11,15 @@ export class newsletterConfig {
|
|||
type: "varchar",
|
||||
length: "255",
|
||||
transformer: {
|
||||
to(value: NewsletterConfigType) {
|
||||
to(value: NewsletterConfigEnum) {
|
||||
return value.toString();
|
||||
},
|
||||
from(value: string) {
|
||||
return NewsletterConfigType[value as keyof typeof NewsletterConfigType];
|
||||
return NewsletterConfigEnum[value as keyof typeof NewsletterConfigEnum];
|
||||
},
|
||||
},
|
||||
})
|
||||
config: NewsletterConfigType;
|
||||
config: NewsletterConfigEnum;
|
||||
|
||||
@ManyToOne(() => communicationType, {
|
||||
nullable: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue