import { Page } from "./Page";
import { Community } from "./Community";

export class User {
    username: string = "";
    name: string = "";
    surname: string = "";
    organization: string = "";
    address: string = "";
    phone: string = "";
    newUser: boolean = false;
    pages: Page[] = [];
    usercommunities: Community[] = [];
    authorities: Aurotithy[] = []
    userroles: Role[] = [];
    token: Token[] = [];

    public constructor(init?:Partial<User>) {
        Object.assign(this, init);
    }
}

export class Aurotithy{
    authority: string = "";
}

export class Role{
    roleID : Number = 0;
    communityID : Number = 0;
    description: String = "";
    roleName : String = "";
    role: Role = new Role();
}

export class Token {
    creation? : string ="";
    expiration?: string = "";
    value?: string = "";
}