protocol tables
This commit is contained in:
parent
edc35f2f87
commit
dd74005043
6 changed files with 262 additions and 0 deletions
21
src/entity/protocolAgenda.ts
Normal file
21
src/entity/protocolAgenda.ts
Normal file
|
@ -0,0 +1,21 @@
|
|||
import { Column, Entity, ManyToOne, PrimaryGeneratedColumn } from "typeorm";
|
||||
import { protocol } from "./protocol";
|
||||
|
||||
@Entity()
|
||||
export class protocolAgenda {
|
||||
@PrimaryGeneratedColumn("increment")
|
||||
id: string;
|
||||
|
||||
@Column({ type: "varchar", length: 255 })
|
||||
topic: string;
|
||||
|
||||
@Column({ type: "varchar", length: 255, default: "" })
|
||||
context: string;
|
||||
|
||||
@ManyToOne(() => protocol, {
|
||||
nullable: false,
|
||||
onDelete: "CASCADE",
|
||||
onUpdate: "RESTRICT",
|
||||
})
|
||||
protocol: protocol;
|
||||
}
|
21
src/entity/protocolDecisions.ts
Normal file
21
src/entity/protocolDecisions.ts
Normal file
|
@ -0,0 +1,21 @@
|
|||
import { Column, Entity, ManyToOne, PrimaryGeneratedColumn } from "typeorm";
|
||||
import { protocol } from "./protocol";
|
||||
|
||||
@Entity()
|
||||
export class protocolDecisions {
|
||||
@PrimaryGeneratedColumn("increment")
|
||||
id: string;
|
||||
|
||||
@Column({ type: "varchar", length: 255 })
|
||||
topic: string;
|
||||
|
||||
@Column({ type: "varchar", length: 255, default: "" })
|
||||
context: string;
|
||||
|
||||
@ManyToOne(() => protocol, {
|
||||
nullable: false,
|
||||
onDelete: "CASCADE",
|
||||
onUpdate: "RESTRICT",
|
||||
})
|
||||
protocol: protocol;
|
||||
}
|
26
src/entity/protocolPresence.ts
Normal file
26
src/entity/protocolPresence.ts
Normal file
|
@ -0,0 +1,26 @@
|
|||
import { Column, Entity, ManyToOne, PrimaryColumn } from "typeorm";
|
||||
import { protocol } from "./protocol";
|
||||
import { member } from "./member";
|
||||
|
||||
@Entity()
|
||||
export class protocolPresence {
|
||||
@PrimaryColumn()
|
||||
memberId: string;
|
||||
|
||||
@PrimaryColumn()
|
||||
protocolId: string;
|
||||
|
||||
@ManyToOne(() => member, {
|
||||
nullable: false,
|
||||
onDelete: "CASCADE",
|
||||
onUpdate: "RESTRICT",
|
||||
})
|
||||
member: member;
|
||||
|
||||
@ManyToOne(() => protocol, {
|
||||
nullable: false,
|
||||
onDelete: "CASCADE",
|
||||
onUpdate: "RESTRICT",
|
||||
})
|
||||
protocol: protocol;
|
||||
}
|
30
src/entity/protocolVotings.ts
Normal file
30
src/entity/protocolVotings.ts
Normal file
|
@ -0,0 +1,30 @@
|
|||
import { Column, Entity, ManyToOne, PrimaryGeneratedColumn } from "typeorm";
|
||||
import { protocol } from "./protocol";
|
||||
|
||||
@Entity()
|
||||
export class protocolVotings {
|
||||
@PrimaryGeneratedColumn("increment")
|
||||
id: string;
|
||||
|
||||
@Column({ type: "varchar", length: 255 })
|
||||
topic: string;
|
||||
|
||||
@Column({ type: "varchar", length: 255, default: "" })
|
||||
context: string;
|
||||
|
||||
@Column({ type: "int", default: 0 })
|
||||
favour: number;
|
||||
|
||||
@Column({ type: "int", default: 0 })
|
||||
abstain: number;
|
||||
|
||||
@Column({ type: "int", default: 0 })
|
||||
against: number;
|
||||
|
||||
@ManyToOne(() => protocol, {
|
||||
nullable: false,
|
||||
onDelete: "CASCADE",
|
||||
onUpdate: "RESTRICT",
|
||||
})
|
||||
protocol: protocol;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue