import { DataStructure } from "@/src/components/base/DataStructure";

export interface LocalChapter {
    id: number;
    chapter_name: string;
    chapter_code: string;
    address1: string;
    address2?: string;
    state: string;
    city?: string;
    country: string;
    charter_date: Date;
}

export const LocalChapterSchema: DataStructure[] = [
    {
        fieldId: "id",
        type: "number",
        displayName: "Local Chapter",
        hideFromCRUD: true
    },
    {
        fieldId: "chapter_name",
        type: "string",
        displayName: "Local Chapter Name",
        length: 200,
        required: true
    },
    {
        fieldId:"chapter_code",
        type: "string",
        displayName: "Local Chapter Code",
        length: 200,
        required: true
    },
    {
        fieldId: "address1",
        type: "string",
        displayName: "Address 1",
        length: 500,
        required: true,
        hideFromList: true
    },
    {
        fieldId: "address2",
        type: "string",
        displayName: "Address 2",
        length: 500,
        hideFromList: true
    },
    {
        fieldId: "state",
        type: "string",
        displayName: "State",
        length: 200,
        required: true,
        hideFromList: true
    },
    {
        fieldId: "city",
        type: "string",
        displayName: "City",
        length: 200,
        hideFromList: true
    },
    {
        fieldId: "country",
        type: "string",
        displayName: "Country",
        length: 500,
        required: true,
        hideFromList: true
    },
    {
        fieldId: "charter_date",
        type: "date",
        displayName: "Charter Date",
        required: true,
        defaultValue: () => new Date()
    }
]