//
//  ZYJQNRecord.h
//  ZYJHappyDNS
//
//  Created by bailong on 15/6/23.
//  Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved.
//

#import <Foundation/Foundation.h>

/**
 *    A 记录
 */
extern const int kZYJQNTypeA;

/**
 *    AAAA 记录
 */
extern const int kZYJQNTypeAAAA;

/**
 *  Cname 记录
 */
extern const int kZYJQNTypeCname;

/**
 *  Txt 记录
 */
extern const int kZYJQNTypeTXT;

typedef NS_ENUM(NSUInteger, ZYJQNRecordSource) {
    ZYJQNRecordSourceUnknown,
    ZYJQNRecordSourceDnspodFree,
    ZYJQNRecordSourceDnspodEnterprise,
    ZYJQNRecordSourceSystem,
};

@interface ZYJQNRecord : NSObject

@property (nonatomic, strong, readonly) NSString *value;
@property (nonatomic, readonly) int ttl;
@property (nonatomic, readonly) int type;
@property (nonatomic, readonly) long long timeStamp;
@property (nonatomic, readonly) ZYJQNRecordSource source;

- (instancetype)init:(NSString *)value
                 ttl:(int)ttl
                type:(int)type
              source:(ZYJQNRecordSource)source;

- (BOOL)expired:(long long)time;

@end
