package models

import "odoo-go/pkg/orm"

// initResLang registers res.lang — Languages.
// Mirrors: odoo/addons/base/models/res_lang.py
func initResLang() {
	m := orm.NewModel("res.lang", orm.ModelOpts{
		Description: "Languages",
		RecName:     "name",
	})

	m.AddFields(
		orm.Char("name", orm.FieldOpts{String: "Name", Required: true}),
		orm.Char("code", orm.FieldOpts{String: "Locale Code", Required: true}),
		orm.Char("iso_code", orm.FieldOpts{String: "ISO Code"}),
		orm.Char("url_code", orm.FieldOpts{String: "URL Code"}),
		orm.Boolean("active", orm.FieldOpts{String: "Active", Default: true}),
		orm.Char("direction", orm.FieldOpts{String: "Direction", Default: "ltr"}),
		orm.Char("date_format", orm.FieldOpts{String: "Date Format", Default: "%m/%d/%Y"}),
		orm.Char("time_format", orm.FieldOpts{String: "Time Format", Default: "%H:%M:%S"}),
		orm.Char("week_start", orm.FieldOpts{String: "First Day of Week", Default: "7"}),
		orm.Char("decimal_point", orm.FieldOpts{String: "Decimal Separator", Default: "."}),
		orm.Char("thousands_sep", orm.FieldOpts{String: "Thousands Separator", Default: ","}),
		orm.Char("grouping", orm.FieldOpts{String: "Separator Format", Default: "[]"}),
	)
}
