แก้ไขสิทธิ์

This commit is contained in:
kittapath 2024-09-13 15:34:01 +07:00
parent 4641362b95
commit 0024ed9414
9 changed files with 154 additions and 27 deletions

View file

@ -1,20 +1,11 @@
import { Entity, Column, JoinColumn, ManyToOne } from "typeorm";
import { Entity, Column, JoinColumn, ManyToOne, OneToMany } from "typeorm";
import { EntityBase } from "./base/Base";
import { Command } from "./Command";
import { Profile } from "./Profile";
import { CommandSendCC } from "./CommandSendCC";
@Entity("commandSend")
export class CommandSend extends EntityBase {
// EMAIL = อีเมล
// INBOX = กล่องข้อความ
@Column({
nullable: true,
comment: "ช่องทางการส่งสำเนา",
length: 20,
default: null,
})
sendCC: string;
@Column({
nullable: true,
comment: "เลขประจำตัวประชาชน",
@ -82,6 +73,9 @@ export class CommandSend extends EntityBase {
@ManyToOne(() => Profile, (profile) => profile.commandSends)
@JoinColumn({ name: "profileId" })
profile: Profile;
@OneToMany(() => CommandSendCC, (commandSendCC) => commandSendCC.commandSend)
commandSendCCs: CommandSendCC[];
}
export class CreateCommandSend {