Compare commits

..

No commits in common. "e4d5afbebe7179c926a0625fd11d17f5285e55a8" and "4a9fd57356132b2fce539724c2faecdc6f160e7f" have entirely different histories.

4 changed files with 6 additions and 92 deletions

View File

@ -1,37 +0,0 @@
import { PrimaryGeneratedColumn, Column, OneToMany, Entity } from "typeorm";
import {
IsInt,
IsNotEmpty,
IsOptional,
IsString,
} from "class-validator";
/**
* Defines the Permission interface.
*/
@Entity()
export abstract class Permission {
/**
* Autogenerated unique id (primary key).
*/
@PrimaryGeneratedColumn()
@IsOptional()
@IsInt()
id: number;
/**
* The target
*/
@Column()
@IsNotEmpty()
@IsString()
target: string;
/**
* The action type
*/
@Column()
@IsNotEmpty()
@IsString()
action: string;
}

View File

@ -1,7 +1,6 @@
import { Entity, Column, OneToMany, ManyToOne, PrimaryGeneratedColumn, Generated, Unique, JoinTable, ManyToMany } from "typeorm";
import { IsBoolean, IsEmail, IsInt, IsNotEmpty, IsOptional, IsString, isUUID, } from "class-validator";
import { UserGroup } from './UserGroup';
import { Permission } from './Permission';
/**
* Defines a admin user.
@ -65,11 +64,11 @@ export class User {
password: string;
/**
* permissions
* userpermissions
*/
// TODO: Permission implementation
// @OneToMany(() => Permission,userpermission=>)
// permissions: Permission[];
// TODO: UserPermission implementation
// @OneToMany(() => UserPermission,userpermission=>)
// userpermissions: UserPermission[];
/**
* groups

View File

@ -1,48 +0,0 @@
import { PrimaryGeneratedColumn, Column, OneToMany, Entity } from "typeorm";
import {
IsInt,
IsNotEmpty,
IsOptional,
IsString,
} from "class-validator";
/**
* Defines the UserAction interface.
*/
@Entity()
export class UserAction {
/**
* Autogenerated unique id (primary key).
*/
@PrimaryGeneratedColumn()
@IsOptional()
@IsInt()
id: number;
// TODO:
// user: relation
/**
* The actions's target (e.g. Track#2)
*/
@Column()
@IsNotEmpty()
@IsString()
target: string;
/**
* The actions's action (e.g. UPDATE)
*/
@Column()
@IsNotEmpty()
@IsString()
action: string;
/**
* The description of change (before-> after; e.g. distance:15->17)
*/
@Column()
@IsOptional()
@IsString()
changed: string;
}

View File

@ -5,7 +5,7 @@ import {
IsOptional,
IsString,
} from "class-validator";
import { Permission } from "./Permission";
import { User } from "./User";
/**
* Defines the UserGroup interface.
@ -40,5 +40,5 @@ export abstract class UserGroup {
* TODO: Something about permission stuff
*/
// TODO:
// grouppermissions: Permission[];
// grouppermissions: GroupPermissions[];
}