import { Entity, Property, ManyToOne } from '@mikro-orm/core';
import { BaseEntity } from '../../_app/entities/_BaseEntity';
import { User } from '../../_app/entities/user/_User';

@Entity({ tableName: 'canvas_api_endpoints' })
export class CanvasApiEndpoint extends BaseEntity {
    @Property()
    name!: string;

    @Property()
    method!: string;

    @Property()
    path!: string;

    @Property({ nullable: true })
    description?: string;

    @ManyToOne(() => User, { nullable: true })
    user?: User;

    @Property({ nullable: true })
    publicPath?: string;
} 