package model

import (
	"iot_manager_service/app/device/dao"
)

const (
	RelationIdInvalid         = "该记录未关联策略无法查看，请关联策略！"
	RelationTypeInvalid       = "查询参数(关联类型)异常"
	RelationTypeLight         = 1 //关联类型 灯控
	RelationTypeLampPoleGroup = 2 //关联类型 灯杆分组

	IsYear   = 2 //全年设置2=是，1=否
	Sunshine = 2 //日出日落 设置 2=开启,1=不开启
)

type RspIntelligentLightDetail struct {
	LightControlList []dao.LightControl     `json:"lightControlList"`
	LampPoleName     string                 `json:"lampPoleName"`
	LightRelMap      IntelligentLightSimple `json:"lightRelMap"`
}

type RspIntelligentLightDetailByGroup struct {
	LightControlList  []dao.LightControl     `json:"lightControlList"`
	LampPoleGroupName string                 `json:"lampPoleGroupName"`
	CountLampPole     int                    `json:"countLampPole"`
	LightRelMap       IntelligentLightSimple `json:"lightRelMap"`
}

type IntelligentLightSimple struct {
	TimeConditionList []TimeConditionSimple `json:"timeConditionList"` //时间条件列表
	LightName         string                `json:"lightName"`         //灯控名称
	LightSn           string                `json:"lightSn"`           //灯控SN
	EffectiveDate     string                `json:"effectiveDate"`     //生效日期
}

type TimeConditionSimple struct {
	Luminance string `json:"luminance"`
	Times     string `json:"times"`
}

type RspIntelligentLightListDetail struct {
	LightControlState int    `json:"lightControlState"` //灯控状态
	RunState          string `json:"runState"`          //运行状态
	PublicName        string `json:"publicName"`        //设备名称(灯杆与灯杆分组公用)
	PublicId          int    `json:"publicId"`          //设备Id(灯杆与灯杆分组公用ID)
	LampPoleName      string `json:"lampPoleName"`      //灯杆名称
	LampPoleSn        string `json:"lampPoleSn"`        //灯杆编码
	StrategyName      string `json:"strategyName"`      //策略名称
	DeviceSn          string `json:"deviceSn"`          //灯控设备编码
	ControlType       int    `json:"controlType"`       //灯控类型
	IsShowOpts        bool   `json:"isShowOpts"`        //页面是否显示操作按钮
}

type RspIntelligentLightList struct {
	Records []dao.LightrelationVo `json:"records"` //记录列表
	Current int                   `json:"current"` //当前分页
	Size    int                   `json:"size"`    //每页数量
	Pages   int                   `json:"pages"`   //总页数
	Total   int                   `json:"total"`
}
