feat(#194): module Cartes SYSTEM
Closes #194 Co-authored-by: Julien Martin <julien.martin@ptits-pas.fr>
This commit was merged in pull request #203.
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import {
|
||||
Column,
|
||||
Entity,
|
||||
JoinColumn,
|
||||
ManyToOne,
|
||||
PrimaryGeneratedColumn,
|
||||
} from 'typeorm';
|
||||
import { CardInstance } from './card_instances.entity';
|
||||
import { Users } from './users.entity';
|
||||
|
||||
@Entity('card_audience_members', { schema: 'public' })
|
||||
export class CardAudienceMember {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id: string;
|
||||
|
||||
@Column({ name: 'id_card', type: 'uuid' })
|
||||
id_card: string;
|
||||
|
||||
@ManyToOne(() => CardInstance, (c) => c.audience, { onDelete: 'CASCADE' })
|
||||
@JoinColumn({ name: 'id_card', referencedColumnName: 'id' })
|
||||
card: CardInstance;
|
||||
|
||||
@Column({ name: 'id_utilisateur', type: 'uuid' })
|
||||
id_utilisateur: string;
|
||||
|
||||
@ManyToOne(() => Users, { onDelete: 'CASCADE' })
|
||||
@JoinColumn({ name: 'id_utilisateur', referencedColumnName: 'id' })
|
||||
user: Users;
|
||||
|
||||
@Column({ name: 'role_snapshot', type: 'varchar', length: 64 })
|
||||
role_snapshot: string;
|
||||
|
||||
@Column({ name: 'is_creator', type: 'boolean', default: false })
|
||||
is_creator: boolean;
|
||||
}
|
||||
Reference in New Issue
Block a user