@wearesage/schema
Version:
A flexible schema definition and validation system for TypeScript with multi-database support
37 lines (29 loc) • 899 B
text/typescript
import { Entity, Property, Id, ManyToMany, OneToMany, Index, Timestamp, Auth , Labels } from '../core/decorators';
;
import { Space } from './Space';
import { User } from './User';
// Users can access teams they belong to
export class Team {
id!: string;
name!: string;
description?: string;
// Users who own this team (have admin permissions)
owners!: User[];
// Users who are members of this team
members!: User[];
// Spaces belonging to this team
spaces!: Space[];
createdAt!: Date;
updatedAt!: Date;
}