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

class ArchivesConfig {
    static LIST: string = "/v1/archives/list"
    static ADD: string = "/v1/archives"
    static DELETE: string = "/v1/archives"
    static EDIT: string = "/v1/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()

