import { action, makeObservable } from "mobx";
// 档案
import BaseStore from "./baseStore";
import { TagDataType } from "@/model/userModel";
import baseHttp from "@/service/base";

class ArchivesConfig {
    static LIST: string = "archives/list"
    static ADD: string = "archives"
    static DELETE: string = "archives"
    static EDIT: string = "archives"
}
class ArchivesStore extends BaseStore<TagDataType> {
    constructor() {
        super(ArchivesConfig)
        makeObservable(this, {
            save: action
        })
    }

    async save(id: string, list: Array<any>) {
        return await baseHttp.post(ArchivesConfig.ADD +"/"+ id, {"list":list});
    }
}
export const archivesStore = new ArchivesStore()

